optionsOf<T extends Object> static method
Looks up the InteractiveOptions from the nearest ancestor scope.
Throws FlutterError if no ancestor scope is found.
Implementation
static InteractiveOptions<T> optionsOf<T extends Object>(
BuildContext context,
String scopeName,
) {
final options = maybeOptionsOf<T>(context);
if (options == null) {
throw FlutterError(
'InteractiveOptions.of() called without an `$scopeName` ancestor.',
);
}
return options;
}