Mindinventory / flutter-retrofit

API calls using the retrofit client.
https://www.mindinventory.com/flutter-app-development.php
MIT License
51 stars 21 forks source link

AppRepository utility ? #5

Closed Gobmichet closed 2 years ago

Gobmichet commented 3 years ago

Hi,

Can you please explain the utility of "AppRepository" class in the project ? Since i couldn't figure it out, i just deleted it and everything still work fine... So what's the point ?

Thanks in advance,

deep-mindinventory commented 3 years ago

Hi @Gobmichet Normally repository class is responsible for the operation of the remote server or local database. It is part of the architecture. It is not necessary to create unless you expect its use in architecture like Bloc-based architecture in a flutter. This is an example of a repository which can be used in actual project ex. AuthRepository, ProductRepository etc.