WtView class abstract

Base class for a screen's view: a small template-style holder that carries assigned variables and builds a widget tree, with ready-made scaffold/loading/error/empty helpers.

Implementers

Constructors

WtView()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
title String
The assigned title variable (empty string if unset).
no setter

Methods

assign(String key, dynamic value) → void
Assigns a template variable value under key (read back with get).
build(BuildContext context) Widget
Builds this view's widget tree. Implement in your subclass.
empty({String message = 'No data found'}) Widget
A centered empty-state panel with an optional message.
error(String message) Widget
A centered error panel showing message.
get<T>(String key) → T?
Reads an assigned variable as T, or null if absent/mistyped.
loading() Widget
A centered progress indicator for loading states.
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.
toString() String
A string representation of this object.
inherited

Operators

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