WidgetRef class

A reference scoped to the widget passed from ScopedWidget.build or Scoped.builder.

RefHasApp, RefHasPage and RefHasWidget are implemented to manage state for the scopes app, page and widget.

ScopedWidget.buildScoped.builderから渡されるウィジェットにスコープしたリファレンス。

RefHasAppRefHasPageRefHasWidgetを実装しておりapppagewidgetのスコープに対して状態を管理できます。

Implemented types
Available extensions
Annotations

Properties

app AppScopedValueRef
Ref in the application scope.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
page PageScopedValueRef
Ref in the page scope.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
widget WidgetScopedValueRef
Ref in the widget scope.
no setteroverride

Methods

cache<T>(T callback(QueryScopedValueRef<PageScopedValueRef> ref), {List<Object> keys = const [], Object? name}) → T

Available on RefHasPage, provided by the RefHasPageCacheExtensions extension

controller<TController extends Listenable>(ControllerQueryBase<TController> query, {bool? autoDisposeWhenUnreferenced}) → TController

Available on RefHasApp, provided by the MasamuneControllerRefHasAppExtensions extension

fetch<T>([Object? name]) → T?

Available on RefHasPage, provided by the RefHasPageFetchExtensions extension

form<TModel>(ChangeNotifierScopedQueryBase<FormController<TModel>, PageScopedValueRef> query, {bool? autoDisposeWhenUnreferenced}) FormController<TModel>

Available on RefHasPage, provided by the MasamuneFormRefHasPageExtensions extension

future<T>(FutureOr<T> callback(), {List<Object> keys = const [], Object? name}) FutureContext<T>

Available on RefHasPage, provided by the RefHasPageFutureExtensions extension

global<TController extends Listenable>(TController globalChangeNotifier, {Object? name}) → TController

Available on RefHasApp, provided by the MasamuneChangeNotifierScopedValueRefExtensions extension

model<TModel extends Listenable>(ModelQueryBase<TModel> query) → TModel

Available on RefHasApp, provided by the MasamuneModelRefHasAppExtensions extension

nestedRouter({Object? name}) NestedAppRouter

Available on RefHasPage, provided by the MasamuneRouterRefHasPageExtensions extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
on({FutureOr<void> initOrUpdate()?, VoidCallback? disposed, List<Object> keys = const []}) OnContext

Available on RefHasPage, provided by the RefHasPageOnExtensions extension

periodic(FutureOr<void> callback(DateTime currentTime, DateTime startTime), {required Duration duration, Object? name}) Timer

Available on RefHasPage, provided by the RefHasPagePeriodicExtensions extension

query<T>(ScopedQueryBase<T, AppScopedValueRef> query, {bool? autoDisposeWhenUnreferenced}) → T

Available on RefHasApp, provided by the RefHasAppQueryExtensions extension

refresh() → void

Available on RefHasPage, provided by the RefHasPageRefreshExtensions extension

router({required RouteQuery? initialQuery, required List<RouteQueryBuilder> pages, TransitionQuery? defaultTransitionQuery, Object? name}) NestedAppRouter

Available on RefHasPage, provided by the MasamuneRouterRefHasPageExtensions extension

schedule(FutureOr<void> callback(DateTime currentTime, DateTime startTime), {required DateTime dateTime, Object? name}) ScheduleContext

Available on RefHasPage, provided by the RefHasPageScheduleExtensions extension

timer(FutureOr<void> callback(DateTime currentTime, DateTime startTime), {required Duration duration, Object? name}) Timer?

Available on RefHasPage, provided by the RefHasPageTimerExtensions extension

toString() String
A string representation of this object.
inherited
watch<T extends Listenable?>(T callback(QueryScopedValueRef<PageScopedValueRef> ref), {List<Object> keys = const [], Object? name, bool disposal = true, bool autoDisposeWhenUnreferenced = false}) → T

Available on RefHasPage, provided by the RefHasPageWatchExtensions extension

Operators

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