ReactterBuildContextExtension extension

Exposes methods to helps to get and listen the Object instance.

on

Methods

select<T extends Object?, R>(Selector<T, R> selector, [String? id]) → R
Uses the selector callback(first argument), for determining if the widget tree of context needs to be rebuild by comparing the previous and new result of selector, and returns it. This evaluation only occurs if one of the selected ReactterStates gets updated, or by the instance if the selector does not have any selected ReactterStates.
use<T extends Object?>([String? id]) → T
Gets the instance of T type with/without id from the closest ancestor ReactterProvider.
watch<T extends Object?>([ListenStates<T>? listenStates]) → T
Gets the instance of T type from the closest ancestor ReactterProvider and listens changes to the instance or the states(ReactterState) defined in first parameter(listenStates) to trigger rebuild of the Widget tree.
watchId<T extends Object?>(String id, [ListenStates<T>? listenStates]) → T
Gets the instance of T type by id from the closest ancestor of ReactterProvider and watchs changes to the instance or the states(ReactterState) defined in first parameter(listenStates) to trigger rebuild of the Widget tree.