of<T> static method
Implementation
static T of<T>(BuildContext? context,
{Object? group, bool useNopGroup = true, int? position = 0}) {
assert(() {
position = position == null ? null : position! + 1;
return true;
}());
if (context == null) {
return _getFromRouteOrCurrent(context,
group: group, useNopGroup: useNopGroup, position: position);
}
return _NopState.getLocal(context, group, position) ??
_getFromRouteOrCurrent<T>(context,
group: group, useNopGroup: useNopGroup, position: position)!;
}