firebase_model_notifier library

Package to use model_notifier for Firebase.

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

Classes

AggregateField
AggregateQuery
AggregateQuery represents the data at a particular location for retrieving metadata without retrieving the actual documents.
AggregateQuerySnapshot
AggregateQuerySnapshot represents a response to an AggregateQuery request.
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
average
Create an object that can be used to compute the average of a specified field over a range of documents in the result set of a query.
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.
ConvertibleValueModel<T>
Abstract class for the convertable value model.
count
Create a CountAggregateField object that can be used to compute the count of documents in the result set of a query.
DateDuration
A class that represents a date period.
DateFormat
DateFormat is for formatting and parsing dates in a locale-sensitive manner.
DocumentChange<T extends Object?>
A DocumentChange represents a change to the documents matching a query.
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.
FieldOverrideIndex
FieldOverrides
The FieldOverrides class follows the FieldOverrides definition.
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().
Filter
A Filter represents a restriction on one or more field values and can be used to refine the results of a Query.
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.
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.
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.
Immutable
Used to annotate a class.
Index
The Index class follows the Index definition.
IndexField
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.
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.
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
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).
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.
sum
Create an object that can be used to compute the sum of a specified field over a range of documents in the result set of a query.
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.

Enums

Ages
Ages.
AggregateSource
AggregateSource represents the source of data for an AggregateQuery.
ArrayConfig
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.
ListenSource
The listener retrieves data and listens to updates from the local Firestore cache only. If the cache is empty, an empty snapshot will be returned. Snapshot events will be triggered on cache updates, like local mutations or load bundles.
LoadBundleTaskState
Represents the state of an on-going LoadBundleTask.
LocalStoreDocumentUpdateStatus
Update Status.
ModelQueryOrder
Specifies the order in which queries are ordered.
Order
QueryScope
ServerTimestampBehavior
Source
An enumeration of firestore source types.

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 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.
FirebaseGeoMapExtensions on Map<K, V>
FirestoreDynamicDocumentModelExtensions on FirestoreDynamicDocumentModel
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.
NullableFirebaseGeoMapExtensions on Map<K, V>?
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>.
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.