make some BuildContext methods generics (#44189)
* make BuildContext.{ancestorStateOfType,ancestorRenderObjectOfType,rootAncestorStateOfType} generic
* make BuildContext.inheritFromWidgetOfExactType generic
* make BuildContext.ancestorInheritedElementForWidgetOfExactType generic
* make BuildContext.ancestorWidgetOfExactType generic
* fix snippet
* bump scoped_model on temp version
* update names
* Revert "bump scoped_model on temp version"
This reverts commit d1fcbba028cdb07f44738d1652391692d1ea5ec0.
* address review comments
* fix ci
* address review comments
* repeat the deprecation notice
* fix uppercase
* use of recommanded deprecation syntax
* address review comment
This commit is contained in:
committed by
GitHub
parent
7fcf030610
commit
fcb40a05bb
@@ -50,9 +50,7 @@ class ExpandingBottomSheet extends StatefulWidget {
|
||||
static _ExpandingBottomSheetState of(BuildContext context, {bool isNullOk = false}) {
|
||||
assert(isNullOk != null);
|
||||
assert(context != null);
|
||||
final _ExpandingBottomSheetState result = context.ancestorStateOfType(
|
||||
const TypeMatcher<_ExpandingBottomSheetState>()
|
||||
);
|
||||
final _ExpandingBottomSheetState result = context.findAncestorStateOfType<_ExpandingBottomSheetState>();
|
||||
if (isNullOk || result != null) {
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user