ControllerGadget class abstract
A Gadget that represents a controller associated to a ViewGadget.
It provides some useful shortcuts like getting a reference to the ObservableModel or to some declared service.
To create a new controller, it's sufficient to extend this abstract class:
class MyController extends ControllerGadget {
void onPressed() {
final value = model.getValue<MyValue>();
// Do some stuff with value...
}
}
Constructors
Properties
- context → BuildContext
-
no setter
- contextGetter ↔ BuildContextGetter
-
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
- model → ObservableModel
-
Gets a reference to the ObservableModel.
no setter
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scaffold → ScaffoldMessengerState?
-
no setter
- theme → ThemeData
-
no setter
- viewMounted → bool
-
no setter
- viewMountedGetter ↔ ViewMountedGetter
-
latefinal
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read<
T> () → T -
Gets a reference to the requested service identified by type
T
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited