model_notifier library

Package that defines and notifies the model.

To use, import package:model_notifier/model_notifier.dart.

Classes

Api
Provides static methods for making HTTP requests.
ApiCollectionModel<T>
Class that can retrieve data from the RestAPI and store it as a collection of value.
ApiDocumentModel<T>
Class that can retrieve data from the RestAPI and store it as a document.
ApiDynamicCollectionModel
ApiDynamicDocumentModel
CollectionTransactionBuilder
Transaction builder for collection.
Config
Class that handles the app config.
Const
Class that defines a constant value.
ConvertibleValueModel<T>
Abstract class for the convertable value model.
DateDuration
A class that represents a date period.
DateFormat
DateFormat is for formatting and parsing dates in a locale-sensitive manner.
DocumentTransactionBuilder
Transaction builder for document.
DynamicCollectionModel<T extends DynamicDocumentModel>
Collection model for flexibly modifying the contents of an object that is primarily a DynamicMap.
DynamicDocumentModel
Documentation model for flexibly modifying the contents of an object that is primarily a DynamicMap.
DynamicSearchableCollectionModel<T extends DynamicDocumentModel>
Searchable collection model for flexibly modifying the contents of an object that is primarily a DynamicMap.
FontAwesomeIcons
Icons based on font awesome 6.5.1
FutureModel<T>
Abstract class for creating a model that can wait on Future.
GeoData
Stores location data.
Immutable
Used to annotate a class.
LinkedCollectionTransactionBuilder
Transaction builder for collection for linkedCollection.
ListenableList<T>
This is a ChangeNotifier class that can be handled as a list.
ListenableListener<T extends Listenable>
Widget that listens for Listenables and rebuilds the widgets inside when there is an update.
ListenableMap<K, V>
This is a ChangeNotifier class that can be handled as a map.
ListModel<T extends Listenable>
A model that can be treated as a list.
LocalCollectionModel<T extends LocalDocumentModel>
Base class for holding and manipulating data from a local database as a collection of LocalDocumentModel.
LocalCollectionTransactionBuilder
Generates a transaction builder.
LocalDatabase
Local database.
LocalDocumentModel<T>
Base class for holding and manipulating data from a local database as a document of T.
LocalDocumentTransactionBuilder
Generates a transaction builder.
LocalDynamicCollectionModel
Specify the path and use DynamicMap to hold the data LocalCollectionModel.
LocalDynamicDocumentModel
Specify the path and use DynamicMap to hold the data LocalDocumentModel.
LocalDynamicSearchableCollectionModel
Retrieves and retrieves collection data stored in a local database.
Localize
Class to translate.
LocalStore
Define a datastore structure for local use.
LocalStoreCollectionQuery
Query for storing collection in LocalStore.
LocalStoreDocumentQuery
Query for storing documents in LocalStore.
LocalStoreDocumentUpdate
Class for notification of document updates.
LocalTransaction
MapModel<T>
A model that can be treated as a map.
MetaConst
Class that defines a constant value for metadata.
Model<T>
You can create a Model based on a ChangeNotifier.
ModelQuery
Class for sending queries to the model.
Prefs
Save and load data locally.
Required
Used to annotate a named parameter p in a method or function f.
RuntimeCollectionModel<T extends RuntimeDocumentModel>
Base class for holding and manipulating data from a runtime database as a collection of RuntimeDocumentModel.
RuntimeCollectionTransactionBuilder
Generates a transaction builder.
RuntimeDatabase
Runtime database.
RuntimeDocumentModel<T>
Base class for holding and manipulating data from a runtime database as a document of T.
RuntimeDocumentTransactionBuilder
Generates a transaction builder.
RuntimeDynamicCollectionModel
Specify the path and use DynamicMap to hold the data LocalCollectionModel.
RuntimeDynamicDocumentModel
Specify the path and use DynamicMap to hold the data RuntimeDocumentModel.
RuntimeDynamicSearchableCollectionModel
Retrieves and retrieves collection data stored in a runtime database.
RuntimeTransaction
StoredCollectionModel<T>
Abstract class that defines methods on collection model for reading and writing data.
StoredDocumentModel<T>
Abstract class that defines methods on document model for reading and writing data.
UserStateChangedCallback
Callback class to be called when the user's state is changed.
ValueModel<T>
Model which only stores one value.

Enums

Ages
Ages.
ConnectivityResult
Connection status check result.
CounterUpdaterInterval
The period of time for counting up and tallying the values.
Gender
Gender.
LocalStoreDocumentUpdateStatus
Update Status.
ModelQueryOrder
Specifies the order in which queries are ordered.

Mixins

ListModelMixin<T>
This is a mix-in that allows you to treat a model as a List.
LocalDocumentMetaMixin<T>
Mix-in that completes the document metadata (time, UID, etc.) on Save.
LocalSearchQueryMixin<T extends LocalDocumentModel>
A mixin to add search functionality to LocalCollectionModel.
MapModelMixin<K, V>
A mix-in that allows you to use a model as a map.
RuntimeDocumentMetaMixin<T>
Mix-in that completes the document metadata (time, UID, etc.) on Save.
RuntimeSearchQueryMixin<T extends RuntimeDocumentModel>
A mixin to add search functionality to RuntimeDocumentModel.

Extensions

AgesExtensions on Ages
ColorExtensions on Color
Provides general extensions to Color.
CSVListExtensions on List<List>
Extended method of listing for CSV.
DateTimeExtensions on DateTime
Provides extended methods for DateTime.
DateTimeIterableExtensions on Iterable<DateTime>
Provides extended methods for DateTime arrays.
DoubleExtensions on double
Provides extended methods for double.
DoubleIterableExtensions on Iterable<double>
Provides extended methods for double arrays.
DurationExtensions on Duration
Provides extended methods for Duration.
DynamicDocumentModelExtensions on DynamicDocumentModel
DynamicMapExtensions on Map<String, dynamic>
Provides extended methods for DynamicMap.
FlutterDateTimeExtensions on DateTime
Provides flutter extensions to DateTime.
GenderExtensions on Gender
GeoMapExtensions on Map<K, V>
InterableOfIterableExtensions on Iterable<Iterable<T>>
Provides extended methods for Iterable arrays.
IntExtensions on int
Provides extended methods for int.
IntIterableExtensions on Iterable<int>
Provides extended methods for int arrays.
IterableExtensions on Iterable<T>
Provides extended methods for T arrays.
JsonDynamicListExtensions on DynamicList
Provides Json extension methods for DynamicList.
JsonDynamicMapExtensions on DynamicMap
Provides Json extension methods for DynamicMap.
ListenableListExtensions on Iterable<T>
ListenableMapExtensions on ValueListenable<Map<K, V>>
ListExtensions on List<T>
Provides extended methods for List in T.
ListOfDynamicMapExtensions on List<DynamicMap>
Extension methods for DynamicMap listings.
LocalizeStringExtensions on String
Provides localize extensions to String.
MapExtensions on Map<K, V>
Provides extended methods for Map.
MasamuneDynamicMapExtensions on DynamicMap
NullableDoubleExtensions on double?
Provides an extension method for double that is nullable.
NullableGeoMapExtensions on Map<K, V>?
NullableIntExtensions on int?
Provides an extension method for int that is nullable.
NullableIterableExtensions on Iterable<T>?
Provides an extension method for Iterable that is nullable.
NullableListExtensions on List<T>?
Provides an extension method for List that is nullable.
NullableLocalizeStringExtensions on String?
Provides general extensions to String?.
NullableMapExtensions on Map<K, V>?
Provides an extension method for Map that is nullable.
NullableNumExtensions on num?
Provides an extension method for num that is nullable.
NullableObjectExtensions on Object?
Provides an extension method for List that is nullable.
NullableSetExtensions on Set<T>?
Provides an extension method for Set that is nullable.
NullableStringExtensions on String?
Provides an extension method for String that is nullable.
NullableValueIterableExtensions on Iterable<T?>
Provides an extension method for Iterable whose value is nullable.
RandomExtensions on Random
Provides extended methods for Random.
SetExtensions on Set<T>
Provides extended methods for Set.
StringExtensions on String
Provides extended methods for String.

Constants

nullOfBool → const bool?
A null object with a defined type of bool?
nullOfDouble → const double?
A null object with a defined type of double?
nullOfDynamicList → const DynamicList?
A null object with a defined type of DynamicList?
nullOfDynamicMap → const DynamicMap?
A null object with a defined type of DynamicMap?
nullOfInt → const int?
A null object with a defined type of int?
nullOfNum → const num?
A null object with a defined type of num?
nullOfString → const String?
A null object with a defined type of String?
zeroOfNum → const num
A 0 object with a defined type of num?

Properties

sprintf ↔ PrintFormat
getter/setter pair
uuid String
Generate and retrieve the UUID for Version 4.
no setter

Functions

dailyKey(String key, [DateTime? time]) String
Gets the key for the date associated with key.
generateCode(int length, {int seed = 0, String charSet = "23456789abcdefghjkmnpqrstuvwxy"}) String
Generates and returns a random string with the number of characters given by length.
generateRandomMaterialColor({List<Color>? ignoreColors, int? seed}) MaterialColor
Gets a random material design color (the color available in white text color).
initializeDateFormatting([String? locale, String? ignored]) Future<void>
This should be called for at least one locale before any date formatting methods are called. It sets up the lookup for date symbols. Both the locale and ignored parameter are ignored, as the data for all locales is directly available.
jsonDecodeAsList<T extends Object?>(String json, [List<T> defaultValue = const []]) List<T>
Converts json to a Json-decoded List
jsonDecodeAsMap<T extends Object?>(String json, [Map<String, T> defaultValue = const {}]) Map<String, T>
Converts json to a Json-decoded Map<String, dynamic> object.
jsonEncodable(Object? o) bool
If this object is Json encodable, true is returned.
monthlyKey(String key, [DateTime? time]) String
Gets the key of the month associated with key.
nullOfList<T>() List<T>?
A null object with a defined type of List<T>?
nullOfMap<K, V>() Map<K, V>?
A null object with a defined type of Map<K, V>?
nullOfSet<T>() Set<T>?
A null object with a defined type of Set<T>?
openURL(String url) Future<void>
Open a new external url.
share({String? text, String? title, List<String> files = const []}) Future<void>
Share text and files with external applications.
wait(Iterable futures) Future<void>
Wait until all Futures given in futures are completed.
weeklyKey(String key, [DateTime? time]) String
Gets the key for the week associated with key.
yearlyKey(String key, [DateTime? time]) String
Gets the key for the year associated with key.

Typedefs

ApiResponse = Response
An HTTP response where the entire response body is known in advance.
ApiResquest = Request
An HTTP request where the entire request body is known in advance.
DynamicList = List
Represents the type of List<dynamic>.
DynamicMap = Map<String, dynamic>
Represents the type of Map<String, dynamic>.
ListenableDynamicList = ListenableList
Define a list for Json.
ListenableDynamicMap = ListenableMap<String, dynamic>
Define a map for Json.