katana_model_firestore library
Firestore plugin for katana_model. A package that models data into documents and collections and allows Firestore, local DB, and data mocks to be handled in the same interface.
To use, import package:katana_model_firestore/katana_model_firestore.dart
.
Classes
- Api
- Provides static methods for making HTTP requests.
-
CollectionBase<
TModel extends DocumentBase> - Define a collection model that includes DocumentBase as an element.
- CollectionModelQuery
- Query class for defining Model.
- DatabaseExporter
- Import and export DynamicMap data used in NoSqlDatabase to external files.
- DateDuration
- A class that represents a date period.
- DateFormat
- DateFormat is for formatting and parsing dates in a locale-sensitive manner.
-
DocumentBase<
T> -
Define a document model for storing
T
types that inherit from ChangeNotifier. - DocumentModelQuery
- Query class for defining Model.
- FirebaseCore
- Initialize Firebase.
- FirebaseOptions
- The options used to configure a Firebase app.
- FirestoreModelAdapter
- Model adapter with Firebase Firestore available.
- FirestoreModelTransactionRef
- Immutable
- Used to annotate a class.
- ListenableFirestoreModelAdapter
- Model adapter with Firebase Firestore available.
- ListenableFirestoreModelTransactionRef
-
ListenableListener<
T extends Listenable> - A widget that monitors changes in Listenable and updates the contents of builder when there is a change.
- LocalModelAdapter
- A database adapter that stores data on a local terminal.
- LocalModelTransactionRef
- ModelTransactionRef for LocalModelAdapter. LocalModelAdapter用のModelTransactionRef。
- ModelAdapter
- You can implement adapters that define the internal specifications of the model.
- ModelAdapterCollectionQuery
- Query class to be passed when executing each function of ModelAdapter.
- ModelAdapterDocumentQuery
- Query class to be passed when executing each function of ModelAdapter.
- ModelAdapterScope
- Widget for setting ModelAdapter.
- ModelCounter
- Define the field as a counter.
- ModelCounterConverter
- ModelFieldValueConverter to enable automatic conversion of ModelCounter as ModelFieldValue.
- ModelCounterFilter
- Filter class to make ModelCounter available to ModelQuery.filters.
-
ModelFieldValue<
T> - Class for defining special field values.
-
ModelFieldValueAsMapMixin<
T> - Mix-in to allow Json serialization and deserialization of ModelFieldValue.
-
ModelFieldValueConverter<
T extends ModelFieldValue> - Use this when registering special classes in ModelFieldValue.
-
ModelFieldValueFilter<
T extends ModelFieldValue> - Adapter class for determining the behavior of ModelFieldValue in ModelQuery.filters.
- ModelQuery
- Query class for defining Model.
- ModelQueryFilter
- Definition class for filtering data.
-
ModelRefBase<
T> - Class for defining relationships between models.
-
ModelRefBuilder<
TSource, TResult> - Builder for granting relationships between models and loading data.
-
ModelRefBuilderBase<
TSource> - Base class for defining ModelRefBuilder.
- ModelRefConverter
- ModelFieldValueConverter to enable automatic conversion of ModelRefBase as ModelFieldValue.
-
ModelRefDocumentBase<
T> - Define a document base including ModelRefBase and DocumentBase.
- ModelRefFilter
- Filter class to make ModelRefBase available to ModelQuery.filters.
-
ModelRefLoaderMixin<
T> - It is available by mixing in when using ModelRefBase in DocumentBase.value.
-
ModelRefMixin<
T> - A mix-in to define that it is a relationship between models in DocumentBase, etc.
- ModelTimestamp
- Define the field as a timestamp.
- ModelTimestampConverter
- ModelFieldValueConverter to enable automatic conversion of ModelTimestamp as ModelFieldValue.
- ModelTimestampFilter
- Filter class to make ModelTimestamp available to ModelQuery.filters.
-
ModelTransactionBuilder<
T> - Builder for transactions.
-
ModelTransactionDocument<
T> - Document class for transactions.
- ModelTransactionRef
- Reference class for performing transactions.
- ModelUpdateNotification
- This class contains data for change notifications.
- NoSqlDatabase
- Class for building a NoSql database model within an application.
- Required
-
Used to annotate a named parameter
p
in a method or functionf
. - RuntimeModelAdapter
- Model adapter that uses a database that runs only in the memory of the application. All data will be reset when the application is re-launched.
- RuntimeModelTransactionRef
- ModelTransactionRef for RuntimeModelAdapter. RuntimeModelAdapter用のModelTransactionRef。
Enums
- ModelFieldValueSource
- Defines where the source of the ModelFieldValue is located.
- ModelQueryFilterType
- Define the filter type for ModelQuery.
- ModelUpdateNotificationStatus
- Defines the change status of each model.
Mixins
-
SearchableCollectionMixin<
TModel extends SearchableDocumentMixin> - Mix-ins to create collections for which search functions are available.
-
SearchableDocumentMixin<
T> - Mix-in to make documents searchable.
Extensions
- 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.
-
DynamicMapExtensions
on Map<
String, dynamic> - Provides extended methods for DynamicMap.
- DynamicMapModelFieldValueExtensions on DynamicMap
- Provides extension methods for DynamicMap for ModelFieldValue.
-
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.
-
ListenableIterableExtensions
on Iterable<
T> - Provides an extension method for Iterable that includes Listenable as an element.
-
ListExtensions
on List<
T> -
Provides extended methods for List in
T
. -
MapExtensions
on Map<
K, V> - Provides extended methods for Map.
- NullableDoubleExtensions on double?
- Provides an extension method for double that is nullable.
- 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.
-
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
- kDefaultSearchableFieldKey → const String
- Default field key to form a searchable field.
- kTimeFieldKey → const String
- Field key to store the document update time.
- kTypeFieldKey → const String
- Field key to save the type of the special object in the field.
- kUidFieldKey → const String
-
Field key to store the last part of the document path (
ddd
for aaa/bbb/ccc/ddd). - 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
Functions
-
generateCode(
int length, {int seed = 0, String charSet = "23456789abcdefghjkmnpqrstuvwxy"}) → String -
Generates and returns a random string with the number of characters given by
length
. -
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 thelocale
andignored
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. -
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>? -
wait(
Iterable futures) → Future< void> -
Wait until all Futures given in
futures
are completed.
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>.
-
ModelRef<
T> = ModelRefBase< T> ? - Class for defining relationships between models.