AmDataProvider<T> class

A data provider accessed in the whole program if it's created with id. You can access its data by AmDataProvider<T>.of("providerId").data


AmDataProvider({T? initialData, String? providerId, ProviderDoFirst providerDoFirst = ProviderDoFirst.FireTriggerFunctionFirst})
Creates a provider. You may initialize its data or leave it null. If you want to access this provider in other pages you should create it with Id.
AmDataProvider.of(String providerId)
Returns a provider by it's id. The provider must be initialized first otherwise it returns a new provider with no id.


activeFunction ← void Function()
Receives a function that instantinously called then (RefreshWidget)s related to this provider are refreshed.
no getter
data ↔ T?
To get the data stored in the provider.
getter/setter pair
doFirst ProviderDoFirst
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
initialize → void
you need to use this getter if you want to access the provider with its id at first time.
no setter
previousData → T?
To get the data stored in the provider just before the last update.
no setter
providerId String?
To get the provider id.
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
silentDataSet ← T?
Changes the provider data only (No RefreshWidget is refreshed).
no getter


noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
refresh() → void
Fires all TriggerFunctions and Refreshes all (RefreshWidget)s related to this provider.
toString() String
A string representation of this object.


operator ==(Object other) bool
The equality operator.