of<T> static method
Retrieves the dependency of type T from the nearest ancestor Binder widget.
Implementation
static T of<T>(
BuildContext context, {
bool rebuild = false,
// Object Function(T value)? filter,
}) =>
switch (context.getElementForInheritedWidgetOfExactType<Binder<T>>()
as BindElement<T>?) {
null => throw BindError<String>(controller: "$T"),
var element => () {
if (rebuild) context.dependOnInheritedElement(element);
return element.controller;
}()
};