Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
535392bf
Unverified
Commit
535392bf
authored
Jan 08, 2021
by
Michael Goderbauer
Committed by
GitHub
Jan 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added tests, removed API (#69620)
parent
ddc0dc13
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
236 additions
and
89 deletions
+236
-89
fix_data.yaml
packages/flutter/lib/fix_data.yaml
+143
-0
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+31
-87
cupertino.dart
packages/flutter/test_fixes/cupertino.dart
+10
-0
cupertino.dart.expect
packages/flutter/test_fixes/cupertino.dart.expect
+10
-0
material.dart
packages/flutter/test_fixes/material.dart
+10
-0
material.dart.expect
packages/flutter/test_fixes/material.dart.expect
+12
-2
widgets.dart
packages/flutter/test_fixes/widgets.dart
+10
-0
widgets.dart.expect
packages/flutter/test_fixes/widgets.dart.expect
+10
-0
No files found.
packages/flutter/lib/fix_data.yaml
View file @
535392bf
...
...
@@ -11,6 +11,149 @@
version
:
1
transforms
:
# Change made in https://github.com/flutter/flutter/pull/44189.
-
title
:
'
Rename
to
dependOnInheritedElement'
date
:
2019-11-22
element
:
uris
:
[
'
material.dart'
,
'
cupertino.dart'
,
'
widgets.dart'
]
inClass
:
'
BuildContext'
method
:
'
inheritFromElement'
changes
:
-
kind
:
'
rename'
newName
:
'
dependOnInheritedElement'
# Change made in https://github.com/flutter/flutter/pull/44189.
-
title
:
'
Migrate
to
dependOnInheritedWidgetOfExactType'
date
:
2019-11-22
element
:
uris
:
[
'
material.dart'
,
'
cupertino.dart'
,
'
widgets.dart'
]
inClass
:
'
BuildContext'
method
:
'
inheritFromWidgetOfExactType'
changes
:
-
kind
:
'
rename'
newName
:
'
dependOnInheritedWidgetOfExactType'
-
kind
:
'
removeParameter'
index
:
0
-
kind
:
'
addTypeParameter'
index
:
0
name
:
'
T'
argumentValue
:
expression
:
'
{%
type
%}'
variables
:
type
:
kind
:
fragment
value
:
'
arguments[0]'
# Change made in https://github.com/flutter/flutter/pull/44189.
-
title
:
'
Migrate
to
getElementForInheritedWidgetOfExactType'
date
:
2019-11-22
element
:
uris
:
[
'
material.dart'
,
'
cupertino.dart'
,
'
widgets.dart'
]
inClass
:
'
BuildContext'
method
:
'
ancestorInheritedElementForWidgetOfExactType'
changes
:
-
kind
:
'
rename'
newName
:
'
getElementForInheritedWidgetOfExactType'
-
kind
:
'
removeParameter'
index
:
0
-
kind
:
'
addTypeParameter'
index
:
0
name
:
'
T'
argumentValue
:
expression
:
'
{%
type
%}'
variables
:
type
:
kind
:
fragment
value
:
'
arguments[0]'
# Change made in https://github.com/flutter/flutter/pull/44189.
-
title
:
'
Migrate
to
findAncestorWidgetOfExactType'
date
:
2019-11-22
element
:
uris
:
[
'
material.dart'
,
'
cupertino.dart'
,
'
widgets.dart'
]
inClass
:
'
BuildContext'
method
:
'
ancestorWidgetOfExactType'
changes
:
-
kind
:
'
rename'
newName
:
'
findAncestorWidgetOfExactType'
-
kind
:
'
removeParameter'
index
:
0
-
kind
:
'
addTypeParameter'
index
:
0
name
:
'
T'
argumentValue
:
expression
:
'
{%
type
%}'
variables
:
type
:
kind
:
fragment
value
:
'
arguments[0]'
# Change made in https://github.com/flutter/flutter/pull/44189.
-
title
:
'
Migrate
to
findAncestorStateOfType'
date
:
2019-11-22
element
:
uris
:
[
'
material.dart'
,
'
cupertino.dart'
,
'
widgets.dart'
]
inClass
:
'
BuildContext'
method
:
'
ancestorStateOfType'
changes
:
-
kind
:
'
rename'
newName
:
'
findAncestorStateOfType'
-
kind
:
'
removeParameter'
index
:
0
-
kind
:
'
addTypeParameter'
index
:
0
name
:
'
T'
argumentValue
:
expression
:
'
{%
type
%}'
variables
:
type
:
kind
:
fragment
value
:
'
arguments[0].typeArguments[0]'
# Change made in https://github.com/flutter/flutter/pull/44189.
-
title
:
'
Migrate
to
rootAncestorStateOfType'
date
:
2019-11-22
element
:
uris
:
[
'
material.dart'
,
'
cupertino.dart'
,
'
widgets.dart'
]
inClass
:
'
BuildContext'
method
:
'
rootAncestorStateOfType'
changes
:
-
kind
:
'
rename'
newName
:
'
findRootAncestorStateOfType'
-
kind
:
'
removeParameter'
index
:
0
-
kind
:
'
addTypeParameter'
index
:
0
name
:
'
T'
argumentValue
:
expression
:
'
{%
type
%}'
variables
:
type
:
kind
:
fragment
value
:
'
arguments[0].typeArguments[0]'
# Change made in https://github.com/flutter/flutter/pull/44189.
-
title
:
'
Migrate
to
ancestorRenderObjectOfType'
date
:
2019-11-22
element
:
uris
:
[
'
material.dart'
,
'
cupertino.dart'
,
'
widgets.dart'
]
inClass
:
'
BuildContext'
method
:
'
ancestorRenderObjectOfType'
changes
:
-
kind
:
'
rename'
newName
:
'
findAncestorRenderObjectOfType'
-
kind
:
'
removeParameter'
index
:
0
-
kind
:
'
addTypeParameter'
index
:
0
name
:
'
T'
argumentValue
:
expression
:
'
{%
type
%}'
variables
:
type
:
kind
:
fragment
value
:
'
arguments[0].typeArguments[0]'
# Changes made in https://github.com/flutter/flutter/pull/45941
-
title
:
'
Rename
to
deferFirstFrame'
date
:
2020-12-23
...
...
packages/flutter/lib/src/widgets/framework.dart
View file @
535392bf
...
...
@@ -2233,17 +2233,6 @@ abstract class BuildContext {
/// render object is usually short.
Size
?
get
size
;
/// Registers this build context with [ancestor] such that when
/// [ancestor]'s widget changes this build context is rebuilt.
///
/// This method is deprecated. Please use [dependOnInheritedElement] instead.
// TODO(a14n): Remove this when it goes to stable, https://github.com/flutter/flutter/pull/44189
@Deprecated
(
'Use dependOnInheritedElement instead. '
'This feature was deprecated after v1.12.1.'
)
InheritedWidget
inheritFromElement
(
InheritedElement
ancestor
,
{
Object
aspect
});
/// Registers this build context with [ancestor] such that when
/// [ancestor]'s widget changes this build context is rebuilt.
///
...
...
@@ -2257,20 +2246,6 @@ abstract class BuildContext {
/// be called apply to this method as well.
InheritedWidget
dependOnInheritedElement
(
InheritedElement
ancestor
,
{
Object
aspect
});
/// Obtains the nearest widget of the given type, which must be the type of a
/// concrete [InheritedWidget] subclass, and registers this build context with
/// that widget such that when that widget changes (or a new widget of that
/// type is introduced, or the widget goes away), this build context is
/// rebuilt so that it can obtain new values from that widget.
///
/// This method is deprecated. Please use [dependOnInheritedWidgetOfExactType] instead.
// TODO(a14n): Remove this when it goes to stable, https://github.com/flutter/flutter/pull/44189
@Deprecated
(
'Use dependOnInheritedWidgetOfExactType instead. '
'This feature was deprecated after v1.12.1.'
)
InheritedWidget
?
inheritFromWidgetOfExactType
(
Type
targetType
,
{
Object
?
aspect
});
/// Obtains the nearest widget of the given type `T`, which must be the type of a
/// concrete [InheritedWidget] subclass, and registers this build context with
/// that widget such that when that widget changes (or a new widget of that
...
...
@@ -2312,17 +2287,6 @@ abstract class BuildContext {
/// widget this context depends on.
T
?
dependOnInheritedWidgetOfExactType
<
T
extends
InheritedWidget
>({
Object
?
aspect
});
/// Obtains the element corresponding to the nearest widget of the given type,
/// which must be the type of a concrete [InheritedWidget] subclass.
///
/// This method is deprecated. Please use [getElementForInheritedWidgetOfExactType] instead.
// TODO(a14n): Remove this when it goes to stable, https://github.com/flutter/flutter/pull/44189
@Deprecated
(
'Use getElementForInheritedWidgetOfExactType instead. '
'This feature was deprecated after v1.12.1.'
)
InheritedElement
?
ancestorInheritedElementForWidgetOfExactType
(
Type
targetType
);
/// Obtains the element corresponding to the nearest widget of the given type `T`,
/// which must be the type of a concrete [InheritedWidget] subclass.
///
...
...
@@ -2341,17 +2305,6 @@ abstract class BuildContext {
/// the widget is removed from the tree.
InheritedElement
?
getElementForInheritedWidgetOfExactType
<
T
extends
InheritedWidget
>();
/// Returns the nearest ancestor widget of the given type, which must be the
/// type of a concrete [Widget] subclass.
///
/// This method is deprecated. Please use [findAncestorWidgetOfExactType] instead.
// TODO(a14n): Remove this when it goes to stable, https://github.com/flutter/flutter/pull/44189
@Deprecated
(
'Use findAncestorWidgetOfExactType instead. '
'This feature was deprecated after v1.12.1.'
)
Widget
?
ancestorWidgetOfExactType
(
Type
targetType
);
/// Returns the nearest ancestor widget of the given type `T`, which must be the
/// type of a concrete [Widget] subclass.
///
...
...
@@ -2378,17 +2331,6 @@ abstract class BuildContext {
/// ancestors of this context.
T
?
findAncestorWidgetOfExactType
<
T
extends
Widget
>();
/// Returns the [State] object of the nearest ancestor [StatefulWidget] widget
/// that matches the given [TypeMatcher].
///
/// This method is deprecated. Please use [findAncestorStateOfType] instead.
// TODO(a14n): Remove this when it goes to stable, https://github.com/flutter/flutter/pull/44189
@Deprecated
(
'Use findAncestorStateOfType instead. '
'This feature was deprecated after v1.12.1.'
)
State
?
ancestorStateOfType
(
TypeMatcher
matcher
);
/// Returns the [State] object of the nearest ancestor [StatefulWidget] widget
/// that is an instance of the given type `T`.
///
...
...
@@ -2422,17 +2364,6 @@ abstract class BuildContext {
/// {@end-tool}
T
?
findAncestorStateOfType
<
T
extends
State
>();
/// Returns the [State] object of the furthest ancestor [StatefulWidget] widget
/// that matches the given [TypeMatcher].
///
/// This method is deprecated. Please use [findRootAncestorStateOfType] instead.
// TODO(a14n): Remove this when it goes to stable, https://github.com/flutter/flutter/pull/44189
@Deprecated
(
'Use findRootAncestorStateOfType instead. '
'This feature was deprecated after v1.12.1.'
)
State
?
rootAncestorStateOfType
(
TypeMatcher
matcher
);
/// Returns the [State] object of the furthest ancestor [StatefulWidget] widget
/// that is an instance of the given type `T`.
///
...
...
@@ -2444,17 +2375,6 @@ abstract class BuildContext {
/// a subtree.
T
?
findRootAncestorStateOfType
<
T
extends
State
>();
/// Returns the [RenderObject] object of the nearest ancestor [RenderObjectWidget] widget
/// that matches the given [TypeMatcher].
///
/// This method is deprecated. Please use [findAncestorRenderObjectOfType] instead.
// TODO(a14n): Remove this when it goes to stable, https://github.com/flutter/flutter/pull/44189
@Deprecated
(
'Use findAncestorRenderObjectOfType instead. '
'This feature was deprecated after v1.12.1.'
)
RenderObject
?
ancestorRenderObjectOfType
(
TypeMatcher
matcher
);
/// Returns the [RenderObject] object of the nearest ancestor [RenderObjectWidget] widget
/// that is an instance of the given type `T`.
///
...
...
@@ -3959,12 +3879,15 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
return
true
;
}
/// Registers this build context with [ancestor] such that when
/// [ancestor]'s widget changes this build context is rebuilt.
///
/// This method is deprecated. Please use [dependOnInheritedElement] instead.
// TODO(a14n): Remove this when it goes to stable, https://github.com/flutter/flutter/pull/44189
@Deprecated
(
'Use dependOnInheritedElement instead. '
'This feature was deprecated after v1.12.1.'
)
@override
InheritedWidget
inheritFromElement
(
InheritedElement
ancestor
,
{
Object
?
aspect
})
{
return
dependOnInheritedElement
(
ancestor
,
aspect:
aspect
);
}
...
...
@@ -3978,12 +3901,18 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
return
ancestor
.
widget
;
}
/// Obtains the nearest widget of the given type, which must be the type of a
/// concrete [InheritedWidget] subclass, and registers this build context with
/// that widget such that when that widget changes (or a new widget of that
/// type is introduced, or the widget goes away), this build context is
/// rebuilt so that it can obtain new values from that widget.
///
/// This method is deprecated. Please use [dependOnInheritedWidgetOfExactType] instead.
// TODO(a14n): Remove this when it goes to stable, https://github.com/flutter/flutter/pull/44189
@Deprecated
(
'Use dependOnInheritedWidgetOfExactType instead. '
'This feature was deprecated after v1.12.1.'
)
@override
InheritedWidget
?
inheritFromWidgetOfExactType
(
Type
targetType
,
{
Object
?
aspect
})
{
assert
(
_debugCheckStateIsActiveForAncestorLookup
());
final
InheritedElement
?
ancestor
=
_inheritedWidgets
==
null
?
null
:
_inheritedWidgets
![
targetType
];
...
...
@@ -4007,12 +3936,15 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
return
null
;
}
/// Obtains the element corresponding to the nearest widget of the given type,
/// which must be the type of a concrete [InheritedWidget] subclass.
///
/// This method is deprecated. Please use [getElementForInheritedWidgetOfExactType] instead.
// TODO(a14n): Remove this when it goes to stable, https://github.com/flutter/flutter/pull/44189
@Deprecated
(
'Use getElementForInheritedWidgetOfExactType instead. '
'This feature was deprecated after v1.12.1.'
)
@override
InheritedElement
?
ancestorInheritedElementForWidgetOfExactType
(
Type
targetType
)
{
assert
(
_debugCheckStateIsActiveForAncestorLookup
());
final
InheritedElement
?
ancestor
=
_inheritedWidgets
==
null
?
null
:
_inheritedWidgets
![
targetType
];
...
...
@@ -4031,12 +3963,15 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
_inheritedWidgets
=
_parent
?.
_inheritedWidgets
;
}
/// Returns the nearest ancestor widget of the given type, which must be the
/// type of a concrete [Widget] subclass.
///
/// This method is deprecated. Please use [findAncestorWidgetOfExactType] instead.
// TODO(a14n): Remove this when it goes to stable, https://github.com/flutter/flutter/pull/44189
@Deprecated
(
'Use findAncestorWidgetOfExactType instead. '
'This feature was deprecated after v1.12.1.'
)
@override
Widget
?
ancestorWidgetOfExactType
(
Type
targetType
)
{
assert
(
_debugCheckStateIsActiveForAncestorLookup
());
Element
?
ancestor
=
_parent
;
...
...
@@ -4054,12 +3989,15 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
return
ancestor
?.
widget
as
T
?;
}
/// Returns the [State] object of the nearest ancestor [StatefulWidget] widget
/// that matches the given [TypeMatcher].
///
/// This method is deprecated. Please use [findAncestorStateOfType] instead.
// TODO(a14n): Remove this when it goes to stable, https://github.com/flutter/flutter/pull/44189
@Deprecated
(
'Use findAncestorStateOfType instead. '
'This feature was deprecated after v1.12.1.'
)
@override
State
?
ancestorStateOfType
(
TypeMatcher
matcher
)
{
assert
(
_debugCheckStateIsActiveForAncestorLookup
());
Element
?
ancestor
=
_parent
;
...
...
@@ -4085,12 +4023,15 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
return
statefulAncestor
?.
state
as
T
?;
}
/// Returns the [State] object of the furthest ancestor [StatefulWidget] widget
/// that matches the given [TypeMatcher].
///
/// This method is deprecated. Please use [findRootAncestorStateOfType] instead.
// TODO(a14n): Remove this when it goes to stable, https://github.com/flutter/flutter/pull/44189
@Deprecated
(
'Use findRootAncestorStateOfType instead. '
'This feature was deprecated after v1.12.1.'
)
@override
State
?
rootAncestorStateOfType
(
TypeMatcher
matcher
)
{
assert
(
_debugCheckStateIsActiveForAncestorLookup
());
Element
?
ancestor
=
_parent
;
...
...
@@ -4116,12 +4057,15 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
return
statefulAncestor
?.
state
as
T
?;
}
/// Returns the [RenderObject] object of the nearest ancestor [RenderObjectWidget] widget
/// that matches the given [TypeMatcher].
///
/// This method is deprecated. Please use [findAncestorRenderObjectOfType] instead.
// TODO(a14n): Remove this when it goes to stable, https://github.com/flutter/flutter/pull/44189
@Deprecated
(
'Use findAncestorRenderObjectOfType instead. '
'This feature was deprecated after v1.12.1.'
)
@override
RenderObject
?
ancestorRenderObjectOfType
(
TypeMatcher
matcher
)
{
assert
(
_debugCheckStateIsActiveForAncestorLookup
());
Element
?
ancestor
=
_parent
;
...
...
packages/flutter/test_fixes/cupertino.dart
View file @
535392bf
...
...
@@ -17,4 +17,14 @@ void main() {
// Changes made in https://github.com/flutter/flutter/pull/44189
const
StatefulElement
statefulElement
=
StatefulElement
(
myWidget
);
statefulElement
.
inheritFromElement
(
ancestor
);
// Changes made in https://github.com/flutter/flutter/pull/44189
const
BuildContext
buildContext
=
Element
(
myWidget
);
buildContext
.
inheritFromElement
(
ancestor
);
buildContext
.
inheritFromWidgetOfExactType
(
targetType
);
buildContext
.
ancestorInheritedElementForWidgetOfExactType
(
targetType
);
buildContext
.
ancestorWidgetOfExactType
(
targetType
);
buildContext
.
ancestorStateOfType
(
TypeMatcher
<
targetType
>());
buildContext
.
rootAncestorStateOfType
(
TypeMatcher
<
targetType
>());
buildContext
.
ancestorRenderObjectOfType
(
TypeMatcher
<
targetType
>());
}
packages/flutter/test_fixes/cupertino.dart.expect
View file @
535392bf
...
...
@@ -17,4 +17,14 @@ void main() {
// Changes made in https://github.com/flutter/flutter/pull/44189
const StatefulElement statefulElement = StatefulElement(myWidget);
statefulElement.dependOnInheritedElement(ancestor);
// Changes made in https://github.com/flutter/flutter/pull/44189
const BuildContext buildContext = Element(myWidget);
buildContext.dependOnInheritedElement(ancestor);
buildContext.dependOnInheritedWidgetOfExactType<targetType>();
buildContext.getElementForInheritedWidgetOfExactType<targetType>();
buildContext.findAncestorWidgetOfExactType<targetType>();
buildContext.findAncestorStateOfType<targetType>();
buildContext.findRootAncestorStateOfType<targetType>();
buildContext.findAncestorRenderObjectOfType<targetType>();
}
packages/flutter/test_fixes/material.dart
View file @
535392bf
...
...
@@ -16,4 +16,14 @@ void main() {
// Changes made in https://github.com/flutter/flutter/pull/44189
const
StatefulElement
statefulElement
=
StatefulElement
(
myWidget
);
statefulElement
.
inheritFromElement
(
ancestor
);
// Changes made in https://github.com/flutter/flutter/pull/44189
const
BuildContext
buildContext
=
Element
(
myWidget
);
buildContext
.
inheritFromElement
(
ancestor
);
buildContext
.
inheritFromWidgetOfExactType
(
targetType
);
buildContext
.
ancestorInheritedElementForWidgetOfExactType
(
targetType
);
buildContext
.
ancestorWidgetOfExactType
(
targetType
);
buildContext
.
ancestorStateOfType
(
TypeMatcher
<
targetType
>());
buildContext
.
rootAncestorStateOfType
(
TypeMatcher
<
targetType
>());
buildContext
.
ancestorRenderObjectOfType
(
TypeMatcher
<
targetType
>());
}
packages/flutter/test_fixes/material.dart.expect
View file @
535392bf
...
...
@@ -14,6 +14,16 @@ void main() {
binding.allowFirstFrame();
// Changes made in https://github.com/flutter/flutter/pull/44189
const StatefulElement statefulElement = StatefulElement(myWidget);
statefulElement.dependOnInheritedElement(ancestor);
const StatefulElement statefulElement = StatefulElement(myWidget);
statefulElement.dependOnInheritedElement(ancestor);
// Changes made in https://github.com/flutter/flutter/pull/44189
const BuildContext buildContext = Element(myWidget);
buildContext.dependOnInheritedElement(ancestor);
buildContext.dependOnInheritedWidgetOfExactType<targetType>();
buildContext.getElementForInheritedWidgetOfExactType<targetType>();
buildContext.findAncestorWidgetOfExactType<targetType>();
buildContext.findAncestorStateOfType<targetType>();
buildContext.findRootAncestorStateOfType<targetType>();
buildContext.findAncestorRenderObjectOfType<targetType>();
}
packages/flutter/test_fixes/widgets.dart
View file @
535392bf
...
...
@@ -13,4 +13,14 @@ void main() {
// Changes made in https://github.com/flutter/flutter/pull/44189
const
StatefulElement
statefulElement
=
StatefulElement
(
myWidget
);
statefulElement
.
inheritFromElement
(
ancestor
);
// Changes made in https://github.com/flutter/flutter/pull/44189
const
BuildContext
buildContext
=
Element
(
myWidget
);
buildContext
.
inheritFromElement
(
ancestor
);
buildContext
.
inheritFromWidgetOfExactType
(
targetType
);
buildContext
.
ancestorInheritedElementForWidgetOfExactType
(
targetType
);
buildContext
.
ancestorWidgetOfExactType
(
targetType
);
buildContext
.
ancestorStateOfType
(
TypeMatcher
<
targetType
>());
buildContext
.
rootAncestorStateOfType
(
TypeMatcher
<
targetType
>());
buildContext
.
ancestorRenderObjectOfType
(
TypeMatcher
<
targetType
>());
}
packages/flutter/test_fixes/widgets.dart.expect
View file @
535392bf
...
...
@@ -13,4 +13,14 @@ void main() {
// Changes made in https://github.com/flutter/flutter/pull/44189
const StatefulElement statefulElement = StatefulElement(myWidget);
statefulElement.dependOnInheritedElement(ancestor);
// Changes made in https://github.com/flutter/flutter/pull/44189
const BuildContext buildContext = Element(myWidget);
buildContext.dependOnInheritedElement(ancestor);
buildContext.dependOnInheritedWidgetOfExactType<targetType>();
buildContext.getElementForInheritedWidgetOfExactType<targetType>();
buildContext.findAncestorWidgetOfExactType<targetType>();
buildContext.findAncestorStateOfType<targetType>();
buildContext.findRootAncestorStateOfType<targetType>();
buildContext.findAncestorRenderObjectOfType<targetType>();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment