/rick_and_morty_flutter_proj

Flutter showcase project to demonstrate Provider-Bloc solution with MVVM architecture

Primary LanguageDartThe UnlicenseUnlicense

Rick And Morty Showcase Project

GitHub last commit License: MIT

Rick And Morty TP is a Flutter application made in order to demonstrate basic View-ViewModel-Repository architecture by utilizing Provider and BLoC libs.

API used in the project - Rick and Morty API.

Installation

Clone the project and you're ready to go :)

Features

  • Authorization by Google Auth Provider
  • Push notifications
  • Contains three flavors (dev, staging, prod), which were automatically generated by flutter_flavorizr
  • Pagination
  • List sorting
  • Search
  • Communication through REST with Hive DB caching.
  • Mocks
  • Unit tests

Project structure

Screenshot 2021-11-01 at 20 21 02

Data layer architecture

Screenshot 2021-11-01 at 20 17 50

Service

Screenshot 2021-11-01 at 20 18 58

Repository

Screenshot 2021-11-01 at 20 18 08

UI - Data Layer dependency

Screenshot 2021-11-01 at 20 43 21

Tests

To test cubit initialization:

flutter --no-color test --machine --start-paused test/bloc_tests.dart

To test repository functions:

flutter --no-color test --machine --start-paused test/repository_tests.dart

Additional Info

Visual elements that were reused and slightly modified from link.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.