AFDocumentIDGenerator class
Utility for generating temporary ids for new objects.
Using 'null' for new objects can be inconvenient (e.g. you cannot place them in Maps by id). This class provides a standard way to create a recognizable "new" identifier prior to an object recieving a real identifier from a persistent store.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
createNewId(
String suffix) → String - Creates a temporary object id for an object that has not yet been saved to firestore.
-
createTestIdIncreasing(
String suffix) → String - Returns a new unique ID useful intesting.
-
isNewId(
String? id) → bool - Returns true of the specified id was returned by createNewId