DataModelExtension<T extends DataModelMixin<T> > extension
Extension that adds syntax-sugar to data classes, linking them to common Adapter methods such as save and delete.
- on
Methods
-
delete(
{bool remote = true, Map< String, dynamic> ? params, Map<String, String> ? headers, OnSuccessOne<T> ? onSuccess, OnErrorOne<T> ? onError}) → Future<T?> -
Available on DataModelMixin<
Deletes this model through a call equivalent toT> , provided by the DataModelExtension extensionAdapter.delete
. -
deleteLocal(
) → void -
Available on DataModelMixin<
Deletes this model from local storage.T> , provided by the DataModelExtension extension -
reload(
{bool remote = true, Map< String, dynamic> ? params, Map<String, String> ? headers, bool background = false, DataRequestLabel? label}) → Future<T?> -
Available on DataModelMixin<
Reload this model through a call equivalent toT> , provided by the DataModelExtension extensionAdapter.findOne
. with the current object/id -
reloadLocal(
) → T? -
Available on DataModelMixin<
Reload model from local storage.T> , provided by the DataModelExtension extension -
save(
{bool remote = true, Map< String, dynamic> ? params, Map<String, String> ? headers, OnSuccessOne<T> ? onSuccess, OnErrorOne<T> ? onError}) → Future<T> -
Available on DataModelMixin<
Saves this model through a call equivalent to save.T> , provided by the DataModelExtension extension -
saveLocal(
) → T -
Available on DataModelMixin<
Saves this model to local storage.T> , provided by the DataModelExtension extension