Localstore class
This is the entry point for accessing a Localstore.
You can obtain an instance by calling Localstore.instance. For example:
final db = Localstore.instance;
To create an instance with a custom save path or to use the support directory, use the getInstance method. For example:
final db = Localstore.getInstance(customPath: '/your/custom/path');
// or to use the support directory
final db = Localstore.getInstance(useSupportDir: true);
Note: When useSupportDir
is set to true
, customPath
must be null or empty.
- Implemented types
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
-
collection(
String path) → CollectionRef -
Gets a CollectionRef for the specified Localstore path.
override
-
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 Properties
- instance → Localstore
-
Returns an instance using the default Localstore.
no setter
Static Methods
-
getInstance(
{String? customPath, bool useSupportDir = false}) → Localstore -
Returns an instance of Localstore with a custom save path or using the support directory.
If
useSupportDir
is true,customPath
must be null or empty.