State constructor
State(
- DataStorage storage,
- String name
Implementation
State(this.storage, this.name) {
if (!DataStorage.isValidKeyName(name)) {
throw ArgumentError('Invalid State name: $name');
}
if (!storage.registerState(this)) {
throw StateError(
'DataStorage[${storage.id}] already have a registered State[$name]!');
}
_load();
}