extension<T extends Object> static method
Like maybeExtension, but throws a StateError when no extension matches.
Implementation
static T extension<T extends Object>(BuildContext context) {
final extension = maybeExtension<T>(context);
if (extension == null) {
throw StateError('No Fleury app extension of type $T found in context.');
}
return extension;
}