Last active
June 26, 2020 17:31
-
-
Save kauemurakami/cd8b0e4b5741f9cd77cb0015843d4f58 to your computer and use it in GitHub Desktop.
Repositório da entidade posts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:getx_pattern/app/data/provider/api.dart'; | |
import 'package:meta/meta.dart'; | |
//Repositório responsável pela entidade post !! | |
//lembrando que cada entidade que persiste de alguma forma com o banco de dados, seja ela uma api ou sqlite | |
//deve possuir um repositório excluisivo | |
class MyRepository { | |
final MyApiClient apiClient; | |
MyRepository({@required this.apiClient}) : assert(apiClient != null); | |
getAll() { | |
return apiClient.getAll(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment