BinaryMapFile class
BinaryMapFile is used to file based key-value serialization
Supported messages are acyclic values of these forms:
Constructors
- BinaryMapFile({required String path, bool secured = false})
- Creates a BinaryMapFile. If file does not exist, it will be in memory only until serialize is called
Properties
- existed → bool
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
map
→ Map<
String, dynamic> -
Return the internal map
no setter
- path → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- saved ↔ bool
-
getter/setter pair
- secured → bool
-
final
Methods
-
containsKey(
String key) → bool - Check if key is set
-
ensureInitialized(
) → Future< void> - Ensure initialize before using
-
getDefaultValue<
T extends Object> (String key, [T? defaultValue]) → T? - Get value for given key, if key is not set, set default value
-
getValue<
T extends Object> (String key) → T? - Get value for given key
-
hashKey(
String key) → String -
Hash the key before lookup or serialize, works only if
secured
is set to true -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
serialize(
) → Future< void> - Save data to file
-
setValue<
T extends Object> (String key, T? value) → void - Set value for key
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited