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