of static method
ExpandableController?
of(
- BuildContext context, {
- bool rebuildOnChange = true,
- bool required = false,
Implementation
static ExpandableController? of(BuildContext context,
{bool rebuildOnChange = true, bool required = false}) {
final notifier = rebuildOnChange
? context
.dependOnInheritedWidgetOfExactType<_ExpandableControllerNotifier>()
: context
.findAncestorWidgetOfExactType<_ExpandableControllerNotifier>();
assert(notifier != null || !required,
"ExpandableNotifier is not found in widget tree");
return notifier?.notifier;
}