Hi everyone, This code open for learning best practice for clean code architecture by using this plugins:
state managemnt packge
Support with 2 types of bloc:
- Cubit
- Bloc - regualr
https://pub.dev/packages/flutter_bloc
plugin for easy implememnt DI(dependency injection)
note its not pure DI this is service locator that in the background working diff from di but same result :)
https://pub.dev/packages/get_it
plugin for http request this is wrapper for dio plugin
https://pub.dev/packages/retrofit
plugin for create local db
https://pub.dev/packages/floor
For run this project we need to do some things:
1.clone project XD
-
search for server_nodejs.zip extract it and open it with your favorite ide/command line (vs code,web storm,etc... )
-
run at the terminal/cmd from the path of the server proj
npm_install
-
run
npm start server
-
open flutter project and run it with emulator (enjoy)
if you want to run it on a real device you need to change some properties:
-
go to your network setting in your pc and checkout whats your ip of your network/wifi then copy it
-
go to
api_configuration.dart
in your flutter project and change this value :
static const BASE_URL = "http://10.0.0.27:5000/api/";
to your new address ip value
static const BASE_URL = "http://{YOURIP}:5000/api/";
- run the project and enjoy :)