sulthanalihsan / NewsApp

πŸ“° Simple News app with the implementation of Clean Architecture, Modularization, 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)

πŸ“Έ 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

Todo

  • Dynamic Theme (Light and Dark by App)
  • Localization by App (ID, EN)
  • Favorite News using Moor
  • Flavoring (Development and Production)
  • CI/CD
  • Unit Testing
  • Integration Testing
  • Code Coverage
  • Publish to Play Store

How to run Flutter App

Before run the app, make sure to generate file *.g.dart, 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

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

πŸ“° Simple News app with the implementation of Clean Architecture, Modularization, BLoC, etc.

License:MIT License


Languages

Language:Dart 95.9%Language:Ruby 2.9%Language:Swift 0.9%Language:Kotlin 0.3%Language:Objective-C 0.1%