rrifafauzikomara / NewsApp

[Flutter SDK V.1] - πŸ“° 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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 (Indonesian and English)

πŸ“Έ 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
  • Unit Testing
  • Integration Testing
  • Code Coverage
  • CI/CD
  • Publish to Play Store

How to run the App

  1. Clone this project.
  2. Open with your favorite tools editor.
  3. Run Pub get on each module sequentially starting from dependencies and ends your root project to generated pubspec.lock file.
  4. Generated *.g.dart file in list_news module. But before you running that, make sure go to list_news module first using cd command. For example cd features and then cd list_news. Then you can run this command: flutter packages pub run build_runner build --delete-conflicting-outputs.
  5. Run the App using this or this. Enjoy your App!.

Run the App using 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 the App using 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

[Flutter SDK V.1] - πŸ“° 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:MIT License


Languages

Language:Dart 97.1%Language:Ruby 2.1%Language:Swift 0.6%Language:Kotlin 0.2%Language:Objective-C 0.1%