HotReloadable mixin
Mixin to add HMR support to modules
Example:
class MyModule extends AppModule with HotReloadable {
@override
List<String> get stateKeysToPreserve => ['my_module.data', 'my_module.user'];
@override
Future<void> onHotReload() async {
// Re-subscribe to events, etc.
}
}
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stateKeysToPreserve
→ List<
String> -
State keys that should be preserved during hot reload
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onHotReload(
) → Future< void> - Called after hot reload completes
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited