of<T> static method
Implementation
static GenericItemForm<T>? of<T>(
BuildContext context, {
bool listen = true,
}) {
if (listen) {
return context
.dependOnInheritedWidgetOfExactType<
GenericItemFormInheritedStreamer<T>>()
?.form;
}
final element = context.getElementForInheritedWidgetOfExactType<
GenericItemFormInheritedStreamer<T>>();
return element == null
? null
: (element.widget as GenericItemFormInheritedStreamer<T>).form;
}