of<T extends Sampod> static method
Implementation
static T of<T extends Sampod>(BuildContext context) {
final SampodProvider<T>? result =
context.dependOnInheritedWidgetOfExactType<SampodProvider<T>>();
if (result == null) {
throw FlutterError('SampodProvider<$T> not found in the widget tree.');
}
return result.controller;
}