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

Constructors

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.
factory
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.
factory

Properties

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.
final
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

Methods

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

Operators

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