martynvalenz / flutter_cinemapedia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flutter_cinemapedia

Dev

  1. Copy .env.example to .env and fill in your API keys
  2. Run flutter pub get
  3. Run flutter run

How to integrate a new request

  1. Add Domain -> Entities -> model
  2. Add Infrastructure -> models -> model_folder -> model with the response to json function (quicktype)
  3. Add Infrastructure -> Mappers -> model_mapper
  4. Add Domain -> Datasources -> model_datasource
  5. Add Future to abstract class Datasource
  6. Add the same Future function to Domain -> Repositories -> model_repository
  7. Go to Infrastructure -> Datasources -> model_datasource and add missing @override function
  8. Add await http request to created fucntion
  9. Go to Infrastructure -> Repositories -> model_repository_impl and add missing @override function
  10. Go to Presentation -> Providers -> model -> model_repository_provider add reference to modal_repository_impl and connect it with Infrascrutucture -> Datasources -> model_datasource
  11. Go to Presentation -> Providers -> model -> model_provider and add reference to model_repository_provider
  12. Go to Presentation -> Screens -> custom screen and use the provider in the state widget, change widget to ConsumerStatefulWidget or ConsumerWidget
  13. Add the provider in the initState function with the ref.read function
  14. Add the provider in the build function with the ref.watch function

Cambios en la entidad, hay que ejecutar el comando

flutter pub run build_runner build

About


Languages

Language:Dart 60.9%Language:C++ 18.3%Language:CMake 14.8%Language:Ruby 2.1%Language:HTML 1.5%Language:C 1.1%Language:Swift 1.1%Language:Kotlin 0.1%Language:Objective-C 0.0%