WtAsyncView<T> class
abstract
A WtView that resolves a Future and renders loading/error/empty/data
states automatically via a FutureBuilder. Implement loadData and
buildData.
Constructors
Properties
Methods
-
assign(
String key, dynamic value) → void -
Assigns a template variable
valueunderkey(read back with get).inherited -
build(
BuildContext context) → Widget -
Builds this view's widget tree. Implement in your subclass.
override
-
buildData(
BuildContext context, T data) → Widget -
Builds the view once loadData resolves with
data. -
empty(
{String message = 'No data found'}) → Widget -
A centered empty-state panel with an optional
message.inherited -
error(
String message) → Widget -
A centered error panel showing
message.inherited -
get<
T> (String key) → T? -
Reads an assigned variable as
T, or null if absent/mistyped.inherited -
loadData(
) → Future< T> - Loads the data this view depends on.
-
loading(
) → Widget -
A centered progress indicator for loading states.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
scaffold(
{required BuildContext context, required Widget body, Widget? floatingActionButton, List< Widget> ? actions, Widget? drawer, bool showAppBar = true}) → Widget -
A standard Scaffold with an optional app bar titled by title.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited