WtController class abstract

Base class for a screen's controller: owns the route settings, exposes route params, returns the screen's WtView, and offers navigation helpers. Subclass it and implement view.

Constructors

WtController(RouteSettings settings)
Creates the controller for the given route settings.

Properties

hashCode int
The hash code for this object.
no setterinherited
params Map<String, String>
Route arguments passed as a Map<String,String> (empty if none).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
settings RouteSettings
The route settings this controller was dispatched with.
final

Methods

back(BuildContext context) → void
Pops the current route.
loadModel<T>(WtModel<T> model) Future<T>
Convenience: awaits model.fetch().
Pushes route onto the stack, optionally passing args.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
redirect(BuildContext context, String route, {Object? args}) → void
Replaces the current route with route (no back stack entry).
render(BuildContext context) Widget
Builds the controller's view into a widget (called by WtRouter).
toString() String
A string representation of this object.
inherited
view(BuildContext context) WtView
The view this controller renders. Implement in your subclass.

Operators

operator ==(Object other) bool
The equality operator.
inherited