Skip to content

πŸ“° News is a Flutter application built to demonstrate the use of Modern development tools with best practices implementation like Clean Architecture, Modularization, Dependency Injection, BLoC, etc.

License

Notifications You must be signed in to change notification settings

winklesen/NewsApp

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

84 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

News App

GitHub stars GitHub forks GitHub watchers

GitHub license platform Open Source Love

Features

  • Headline
  • Detail News
  • Dynamic Behavior (Cupertino for iOS, Material for Android)
  • Dynamic Theme (Light and Dark)
  • Localization (Still needs a little improvement 😣)

πŸ“Έ Example iOS

                         

πŸ“Έ Example Android

                         

Quick start

This is a normal flutter app. You should follow the instructions in the official documentation. This project uses BLoC (business logic component) to separate the business logic with UI itself and uses Modularization approach to separate each modules. It's recommended to do self-study about it in here (BLoC: here, Modularization: here and here).

Modularization Structure πŸ”₯

# Root Project
.
β”œβ”€β”€ features               # Name of directory
|   β”œβ”€β”€ feature A          # Feature module with a clean architecture inside it.
|   β”œβ”€β”€ feature B
|   └── feature etc
|
β”œβ”€β”€ lib                    # Name of module (default from Flutter)
|
└── libraries              # Name of directory
    β”œβ”€β”€ core               # Core module.
    β”œβ”€β”€ dependencies       # Handle dependency version updates.
    └── shared             # Handle common utility class and custom widget.

Clean Architecture Flow (Feature Module) πŸ”₯


Built With πŸ› 

  • Modularization with flutter_modular packages - Separate functionality into independent, interchangeable modules.
  • Equatable - Being able to compare objects in Dart often involves having to override the == operator.
  • Json Serializable - Builders for handling JSON.
  • Dio - A type-safe HTTP client.
  • BLoC Pattern - Business logic component to separate the business logic with UI.
  • State - (Loading, No Data, Has Data, No Internet Connection, Request Timeout, Error)
  • Flutter Screenutil - Responsive UI.
  • Flavor - Handling different environments for development and production.
  • Localization - Easy to change language between English and Indonesian.

Todo

  • Favorite News using Moor
  • CI/CD
  • Unit Testing
  • Integration Testing
  • Code Coverage
  • Publish to Play Store

How to run Flutter App

Generated *.g.dart file

Before run the app, make sure to generate *.g.dart file, you can use this command on terminal. But before you running that, make sure go to list_news feature module first using cd command. For example cd features then cd list_news. Then you can run the command below.

One time build:

flutter pub run build_runner build

or you can watch for changes and rebuild automatically

flutter pub run build_runner watch

Run Flutter with command prompt

Development

flutter run --flavor development --target=lib/ui/launcher/main-dev.dart

Production

flutter run --flavor production --target=lib/ui/launcher/main-prod.dart

Run Flutter with green button

Just follow this instruction.

Author

  • R Rifa Fauzi Komara

Don't forget to follow me, fork and give me a ⭐

License

MIT License

Copyright (c) [2020] [R Rifa Fauzi Komara]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

πŸ“° News is a Flutter application built to demonstrate the use of Modern development tools with best practices implementation like Clean Architecture, Modularization, Dependency Injection, BLoC, etc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 96.5%
  • Ruby 2.5%
  • Other 1.0%