firebase_model_notifier library Null safety

Package to use model_notifier for Firebase.

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

Classes

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
Blob
Represents binary data stored in Uint8List.
CollectionReference<T extends Object?>
CollectionTransactionBuilder
Transaction builder for collection.
Config
Class that handles the app config.
Const
Class that defines a constant value.
DocumentChange<T extends Object?>
A DocumentChange represents a change to the documents matching a query.
DocumentModel<T>
Abstract class for the document model.
DocumentReference<T extends Object?>
A DocumentReference refers to a document location in a FirebaseFirestore database and can be used to write, read, or listen to the location.
DocumentSnapshot<T extends Object?>
A DocumentSnapshot contains data read from a document in your FirebaseFirestore database.
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.
FieldPath
A FieldPath refers to a field in a document.
FieldValue
Sentinel values that can be used when writing document fields with set() or update().
FirebaseCore
Class that prepares to handle Firebase.
FirebaseFirestore
The entry point for accessing a FirebaseFirestore.
FirebaseFunctionsCollectionModel<T>
Abstract class for retrieving collection data of T through Functions.
FirebaseFunctionsDocumentModel<T>
Abstract class for retrieving document data of T through Functions.
FirebaseFunctionsDynamicCollectionModel
Class for retrieving collection data of DynamicMap list through Functions.
FirebaseFunctionsDynamicDocumentModel
Class for retrieving document data of DynamicMap through Functions.
FirebaseFunctionsDynamicModel
Class for retrieving value data of dynamic through Functions.
FirebaseFunctionsModel<T>
Abstract class for retrieving data of T through Functions.
FirebaseGeoData
GeoData for Firestore.
FirebaseOptions
The options used to configure a Firebase app.
FirestoreCollectionModel<T extends FirestoreDocumentModel>
Base class for holding and manipulating data from a firestore database as a collection of FirestoreDocumentModel.
FirestoreCollectionTransactionBuilder
Generates a transaction builder.
FirestoreDocumentModel<T>
Base class for holding and manipulating data from a firestore database as a document of T.
FirestoreDocumentTransactionBuilder
Generates a transaction builder.
FirestoreDynamicCollectionModel
Specify the path and use DynamicMap to hold the data FirestoreCollectionModel.
FirestoreDynamicDocumentModel
Specify the path and use DynamicMap to hold the data FirestoreDocumentModel.
FirestoreDynamicSearchableCollectionModel
Retrieves and retrieves collection data stored in a firestore database.
FirestoreQuery
Class for sending queries to the model.
FirestoreTransaction
Class for executing Firestore Transaction.
FirestoreUtility
Utility class of Firestore.
FutureModel<T>
Abstract class for creating a model that can wait on Future.
GeoData
Stores location data.
GeoPoint
Represents a geographical point by its longitude and latitude
GetOptions
An options class that configures the behavior of get() calls on DocumentReference and Query.
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.
ListenedModel<T, Result extends Model<T>>
A model class for listening for and retrieving data.
ListEquality<E>
Equality on lists.
ListModel<T extends Listenable>
A model that can be treated as a list.
LoadBundleTask
LoadBundleTaskSnapshot
A LoadBundleTaskSnapshot is returned as the result or on-going process of a LoadBundleTask.
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.
PersistenceSettings
A settings class that can be passed to Firestore.enablePersistence() to configure Firestore persistence. Only supported for Web.
Prefs
Save and load data locally.
Query<T extends Object?>
Represents a Query over the data at a particular location.
QueryDocumentSnapshot<T extends Object?>
A QueryDocumentSnapshot contains data read from a document in your FirebaseFirestore database as part of a query.
QuerySnapshot<T extends Object?>
Contains the results of a query. It can contain zero or more DocumentSnapshot objects.
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
SetOptions
An options class that configures the behavior of set() calls in DocumentReference, WriteBatch and Transaction.
Settings
Specifies custom configurations for your Cloud Firestore instance.
SnapshotMetadata
Metadata about a snapshot, describing the state of the snapshot.
SnapshotOptions
Options that configure how data is retrieved from a DocumentSnapshot (e.g. the desired behavior for server timestamps that have not yet been set to their final value).
StoredModel<T, Result extends Model<T>>
Abstract class that defines methods for reading and writing data.
Timestamp
A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Transaction
Transaction class which is created from a call to runTransaction().
UIEmailAndPasswordFormDialog
Display the login form.
UISMSFormDialog
Display the login form.
UserStateChangedCallback
Callback class to be called when the user's state is changed.
ValueModel<T>
Model which only stores one value.
WriteBatch
A WriteBatch is a series of write operations to be performed as one unit.

Mixins

FirestoreCollectionQueryMixin<T extends FirestoreDocumentModel>
This is a mixin for handling Firestore queries.
FirestoreDocumentMetaMixin<T>
A mix-in to save uid, time and locale when saving Firestore documents.
FirestoreLocalizeMixin<T>
A mixin to use Firestore's localization features.
FirestoreSearchQueryMixin<T extends FirestoreDocumentModel>
A mix-in to let the search take place.
FirestoreSearchUpdaterMixin<T>
Data that can be searched is given at the time of data saving.
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
ColorExtensions
Provides general extensions to Color.
CSVListExtensions
Extended method of listing for CSV.
DateTimeExtensions
Provides general extensions to DateTime.
DateTimeIterableExtensions
Provides general extensions to Iterable<DateTime>.
DoubleExtensions
Provides general extensions to double.
DoubleIterableExtensions
Provides general extensions to Iterable<double>.
DurationExtensions
Provides general extensions to Duration.
DynamicDocumentModelExtensions
FirebaseGeoMapExtensions
FirestoreDynamicDocumentModelExtensions
FlutterDateTimeExtensions
Provides flutter extensions to DateTime.
GenderExtensions
GeoMapExtensions
InterableOfIterableExtensions
Provides general extensions to Iterable<Iterable<T>>.
IntExtensions
Provides general extensions to int.
IntIterableExtensions
Provides general extensions to Iterable<int>.
IterableExtensions
Provides general extensions to Iterable<T>.
JsonDynamicListExtensions
Extension method of Dynamic List.
JsonDynamicMapExtensions
Extension method of Dynamic Map.
ListenableListExtensions
ListenableMapExtensions
ListExtensions
Provides general extensions to List<T>.
ListOfDynamicMapExtensions
Extension methods for DynamicMap listings.
LocalizeStringExtensions
Provides localize extensions to String.
MapExtensions
Provides general extensions to Map<K,V>.
MasamuneDynamicMapExtensions
NullableDoubleExtensions
Provides general extensions to double?.
NullableDoubleIterableExtensions
Provides general extensions to Iterable<double>?.
NullableFirebaseGeoMapExtensions
NullableGeoMapExtensions
NullableIntExtensions
Provides general extensions to int?.
NullableIntIterableExtensions
Provides general extensions to Iterable<int>?.
NullableIterableExtensions
Provides general extensions to Iterable<T>?.
NullableListExtensions
Provides general extensions to List<T>?.
NullableLocalizeStringExtensions
Provides general extensions to String?.
NullableMapExtensions
Provides general extensions to Map<K,V>?.
NullableObjectExtensions
Provides general extensions to Object?.
NullableSetExtensions
Provides general extensions to Set<T>?.
NullableStringExtensions
Provides general extensions to String?.
NullableValueIterableExtensions
Provides general extensions to Iterable<T?>.
RandomExtensions
Provides general extensions to Random.
SetExtensions
Provides general extensions to Set<T>.
StringExtensions
Provides general extensions to String.

Constants

nullOfBool → const bool?
Null of bool.
null
nullOfDouble → const double?
Null of double.
null
nullOfDynamicList → const DynamicList?
Null of dynamic list.
null
nullOfDynamicMap → const DynamicMap?
Null of dynamic map.
null
nullOfInt → const int?
Null of int.
null
nullOfNum → const num?
Null of num.
null
nullOfString → const String?
Null of string.
null
zeroOfNum → const num
Zero of num.
0

Properties

sprintf PrintFormat
read / write
uuid String
Get UUID.
read-only

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
Create a code of length length randomly for id.
generateRandomMaterialColor({List<Color>? ignoreColors, int? seed}) MaterialColor
Gets a random material design color (the color available in white text color).
jsonDecodeAsList<T extends Object>(String json, [List<T> defaultValue = const []]) List<T>
json decoding.
jsonDecodeAsMap<T extends Object>(String json, [Map<String, T> defaultValue = const {}]) Map<String, T>
json decoding.
monthlyKey(String key, [DateTime? time]) String
Gets the key of the month associated with key.
nullOfList<T>() List<T>?
Null of List.
nullOfMap<K, V>() Map<K, V>?
Null of Map.
nullOfSet<T>() Set<T>?
Null of Set.
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>
Take out only Future's from futures and wait.
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.

Enums

Ages
Ages.
ConnectivityResult
Connection status check result.
CounterUpdaterInterval
The period of time for counting up and tallying the values.
DocumentChangeType
An enumeration of document change types.
Gender
Gender.
LocalStoreDocumentUpdateStatus
Update Status.
ModelQueryOrder
Specifies the order in which queries are ordered.
Source
An enumeration of firestore source types.

Typedefs

DynamicList = List
Define a list for Json.
DynamicMap = Map<String, dynamic>
Define a map for Json.
FromFirestore<T> = T Function(DocumentSnapshot<Map<String, dynamic>> snapshot, SnapshotOptions? options)
ListenableDynamicList = ListenableList
Define a list for Json.
ListenableDynamicMap = ListenableMap<String, dynamic>
Define a map for Json.
ToFirestore<T> = Map<String, Object?> Function(T value, SetOptions? options)
TransactionHandler<T> = Future<T> Function(Transaction transaction)
The TransactionHandler may be executed multiple times; it should be able to handle multiple executions.

Exceptions / Errors

FirebaseException
A generic class which provides exceptions in a Firebase-friendly format to users.