A simple mobile client app for browsing movies listed under YTS website.
To get started, first clone or download the repository to your pc or laptop. Then run flutter pub get command in your terminal to download and cache all the dependencies. After that make sure to run flutter pub run build_runner build --delete-conflicting-outputs command to execute the code generator to generate necessary files related to freezed and json serialization. And you are good to go π.
The code of the app implements clean architecture to separate the UI, domain and data layers with a features-first approach for folder structure.
lib
βββ app
βββ core
β βββ animations
β βββ app_state
β βββ configs
β βββ errors
β βββ extensions
β βββ models
β βββ routes
β βββ services
β β βββ http
β β βββ storage
β βββ theme
β βββ utils
β βββ widgets
β β βββ loaders
βββ features
β βββ auth
β β βββ application
β β βββ infrastructure
β β β βββ models
β β β βββ repositories
β β βββ presentation
β β βββ pages
β β βββ widgets
β βββ movies
β β βββ application
β β βββ infrastructure
β β β βββ models
β β β βββ repositories
β β βββ presentation
β β βββ pages
β β βββ widgets
βββ firebase_options.dart
βββ main.dart
-
main.dartfile has services initialization code and wraps the rootYtsAppwith aProviderScope. -
firebase_options.dartis auto-generated file byflutterfire CLIwhich contains all the nessary configuration forfirebase. integration. -
The
appfolder withyts_apphas the rootMaterialAppwhich injects thetheme dataandnavigation dataentire all the widget tree. -
The
corefolder contains code shared across features :-
animationsfolder contains the code to animate the widgets. -
app_statefolder contains the model that represents the state of app during api calli.e initial, loading, loaded, success, error. -
configscontains the configuration of app such asbase_urlfor api call. -
constantsfolder is where all the constant values used across the app such asapp_assetswith list of the path forassetsare declared. -
errorsfolder contains the model that parsesexceptionsanddio_errorand returnsfailureobject. -
extensionsfolder contains all the extension methods such assnackbar_extensionthat shows snackbar when called likecontext.showSnackbar(). -
modelsfolder contains the core models forpaginationandcachingthe api response. -
routesfolders contains the list ofroute_pathsandgo_routernavigation configurations. -
servicesfolder abstract app-level services with their implementations -
themefolder contain general styles (colors, themes & text styles) -
utilsfolder contain the helper methods such asvalidatorsforforms. -
widgetsfolder contains all thecore-widgetsthat are rendered in similar state across the app, such asshimmer,error_view,buttons,text-fields,loading-indicators, etc.
-
-
The
featuresfolder: the repository pattern is used to decouple logic required to access data sources from the domain layer.applicationfolder also known asdomain layerthat contains all the business logic of the particular feature for examplelatest_movie_providercontrols theapp statefromloadingtosuccessorerrorbased onAPIresponse and sends it back toUIwhere thelistenersandbuildersrenders the components based on data provided.intrastructurefolder also known asdata layer: The repository pattern is used to decouple logic required to access data sources from the domain layer.modelsfolder contains all the data class model generated usingFreezedwith support for parsingjsontodart object,copy-withmethod, and more.repositoriesfolder contains theabstract-classand it'simplementationwhich interact withnetwork callsparses data and sends back todomainlayer.
-
The
presentationfolder also known aspresentation layerwhich contains all theUIcomponents.
- lottie: ^2.1.0
- flutter_vector_icons: ^2.0.0
- flutter_svg: ^1.1.6
- flex_color_scheme: ^6.1.1
- flutter_launcher_icons: ^0.11.0
- dartz: ^0.10.1
- freezed_annotation: ^2.2.0
- freezed: ^2.2.0
- json_annotation: ^4.4.0
- json_serializable: ^6.1.4
- json_annotation: ^4.7.0
- build_runner: ^2.3.0
- hive_test: ^1.0.1
- http_mock_adapter: ^0.3.3
- mocktail: ^0.3.0
- mocktail_image_network: ^0.3.1
- equatable: ^2.0.5
- url_launcher: ^6.1.7
- shimmer: ^2.0.0
- pull_to_refresh: ^2.0.0
- flutter_keyboard_visibility: ^5.4.0
- another_flushbar: ^1.12.29
- clock: ^1.1.1
- cached_network_image: ^3.2.3
- very_good_analysis: ^3.1.0
| Light Mode | Dark Mode |
|
|
|
|
|
|
π§ This project is still under development phase π§
- If encountered any bugs feel free to report here
- If you want to contribute to the project you can send Pull request.





