- Copy
.env.example
to.env
and fill in your API keys - Run
flutter pub get
- Run
flutter run
- Add
Domain -> Entities -> model
- Add
Infrastructure -> models -> model_folder -> model
with the response to json function (quicktype) - Add
Infrastructure -> Mappers -> model_mapper
- Add
Domain -> Datasources -> model_datasource
- Add Future to abstract class Datasource
- Add the same Future function to
Domain -> Repositories -> model_repository
- Go to
Infrastructure -> Datasources -> model_datasource
and add missing @override function - Add await http request to created fucntion
- Go to
Infrastructure -> Repositories -> model_repository_impl
and add missing @override function - Go to
Presentation -> Providers -> model -> model_repository_provider
add reference to modal_repository_impl and connect it withInfrascrutucture -> Datasources -> model_datasource
- Go to
Presentation -> Providers -> model -> model_provider
and add reference tomodel_repository_provider
- Go to
Presentation -> Screens -> custom screen
and use the provider in the state widget, change widget toConsumerStatefulWidget
orConsumerWidget
- Add the provider in the
initState
function with theref.read
function - Add the provider in the
build
function with theref.watch
function
flutter pub run build_runner build