This package includes all necessary basics to make comunications between UI, BL and Data layers.
This is a singleton class that contains basic REST methods and a little auth logic.
It should be initialized before used.
ApiClient inits itself automatically in
Store constructor (see below).
init method has the following arguments:
releaseBaseHost- URI which will be used in release build;
forceUseReleaseHost- tells it to use release uri even in debug mode (default false);
androidDegubHost- URI for Android Emulator in debug mode (default 10.0.2.2)
BaseModel and BaseModalApi
These two are useful for mapping backend entities to your flutter application.
BaseModelApi can request a
paginatedList) of items,
retreive a single item by id,
create a new item and
delete an existing one.
You should implement
fromJson method and the
url field which is a relative path (e.g. 'products', 'orders' etc.).
rootList parameter set to true is needed if response's data doesn't have a pagination.
Is needed to create a centralized
Store which contains all the repositories.
Subscriptable so you can call
notify(event) methods to help repos communicate with each other.
This class is needed to create your repositories. It's also
All the repos should be initialized in
Store's constructor and pass
Store instance to