Sheet class

Register your sheet to use, another method is SheetProvider. You can register sheet and call it in any workplace in your app.

Constructors

Sheet({bool hotReload = false})

Properties

hashCode int
The hash code for this object.
no setterinherited
hotReload bool
if true, the instance will be re-create when you rebuild widget such as hot reload or set state.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

manager<T>() SheetManager<T>?
return SheetManager<T>, null if it not register.
managerNonNull<T>() SheetManager<T>
return SheetManager<T>, throw SheetNotRegisterException if it not register.
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

shared Sheet
Return a single ton of Sheet
no setter

Static Methods

apply<T>(String name) → void
Change the current sheet of T sheet
clear<T>() → void
Clear all sheets in T sheet manager, the T sheet was not unregister, but you must be re-register if want to use T sheet a again
collectionClear() → void
Remove all registered sheet, you must be re-register if want to use T sheet a again
isRegistered<T>([String? name]) bool
return true if T sheet is registered and exist name if name != null
read<T>([String? name]) → T
return current sheet of T sheet if name == null, else return T sheet with name, throw SheetNotFoundException if name does not exists
register<T>(T value, {String name = ''}) → void
Register sheet with T type, with value instance with name
registerLazy<T>(Creator<T> value, {String name = ''}) → void
Register sheet with T type, with value creator with name
registerLazyCollection<T>(Map<String, Creator<T>> create) → void
Register sheet with T type, with many creator in one times
setup({required bool hotReload}) → dynamic
setup hotReload field in one time, if the Sheet was setup or call any method before, the [hotReload cannot change
unregister<T>([String name = '']) → void
Unregister sheet with T type, after that, you must be re-register if want to use T sheet a again