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
925ff2dc
Unverified
Commit
925ff2dc
authored
Jan 07, 2021
by
Kate Lovett
Committed by
GitHub
Jan 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated StatefulElement.inheritFromElement (#72901)
parent
ed66037f
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
50 additions
and
10 deletions
+50
-10
fix_data.yaml
packages/flutter/lib/fix_data.yaml
+12
-0
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+0
-10
cupertino.dart
packages/flutter/test_fixes/cupertino.dart
+4
-0
cupertino.dart.expect
packages/flutter/test_fixes/cupertino.dart.expect
+4
-0
material.dart
packages/flutter/test_fixes/material.dart
+4
-0
material.dart.expect
packages/flutter/test_fixes/material.dart.expect
+4
-0
widgets.dart
packages/flutter/test_fixes/widgets.dart
+11
-0
widgets.dart.expect
packages/flutter/test_fixes/widgets.dart.expect
+11
-0
No files found.
packages/flutter/lib/fix_data.yaml
View file @
925ff2dc
...
...
@@ -11,6 +11,17 @@
version
:
1
transforms
:
# Changes made in https://github.com/flutter/flutter/pull/44189
-
title
:
'
Rename
to
dependOnInheritedElement'
date
:
2020-12-23
element
:
uris
:
[
'
material.dart'
,
'
cupertino.dart'
,
'
widgets.dart'
]
method
:
'
inheritFromElement'
inClass
:
'
StatefulElement'
changes
:
-
kind
:
'
rename'
newName
:
'
dependOnInheritedElement'
# Changes made in https://github.com/flutter/flutter/pull/15303
-
title
:
'
Replace
child
with
builder'
date
:
2020-12-17
...
...
@@ -31,6 +42,7 @@ transforms:
value
:
'
arguments[child]'
-
kind
:
'
removeParameter'
name
:
'
child'
# Changes made in https://github.com/flutter/flutter/pull/28602
-
title
:
'
Rename
to
fromMouseEvent'
date
:
2020-12-15
...
...
packages/flutter/lib/src/widgets/framework.dart
View file @
925ff2dc
...
...
@@ -4919,16 +4919,6 @@ class StatefulElement extends ComponentElement {
state
.
_element
=
null
;
}
// 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
(
Element
ancestor
,
{
Object
?
aspect
})
{
return
dependOnInheritedElement
(
ancestor
,
aspect:
aspect
);
}
@override
InheritedWidget
dependOnInheritedElement
(
Element
ancestor
,
{
Object
?
aspect
})
{
assert
(
ancestor
!=
null
);
...
...
packages/flutter/test_fixes/cupertino.dart
View file @
925ff2dc
...
...
@@ -8,4 +8,8 @@ void main() {
// Change made in https://github.com/flutter/flutter/pull/41859
const
CupertinoTextThemeData
themeData
=
CupertinoTextThemeData
(
brightness:
Brightness
.
dark
);
themeData
.
copyWith
(
brightness:
Brightness
.
light
);
// Changes made in https://github.com/flutter/flutter/pull/44189
const
StatefulElement
statefulElement
=
StatefulElement
(
myWidget
);
statefulElement
.
inheritFromElement
(
ancestor
);
}
packages/flutter/test_fixes/cupertino.dart.expect
View file @
925ff2dc
...
...
@@ -8,4 +8,8 @@ void main() {
// Change made in https://github.com/flutter/flutter/pull/41859
const CupertinoTextThemeData themeData = CupertinoTextThemeData();
themeData.copyWith();
// Changes made in https://github.com/flutter/flutter/pull/44189
const StatefulElement statefulElement = StatefulElement(myWidget);
statefulElement.dependOnInheritedElement(ancestor);
}
packages/flutter/test_fixes/material.dart
View file @
925ff2dc
...
...
@@ -7,4 +7,8 @@ import 'package:flutter/material.dart';
void
main
(
)
{
// Change made in https://github.com/flutter/flutter/pull/15303
showDialog
(
child:
Text
(
'Fix me.'
));
// Changes made in https://github.com/flutter/flutter/pull/44189
const
StatefulElement
statefulElement
=
StatefulElement
(
myWidget
);
statefulElement
.
inheritFromElement
(
ancestor
);
}
packages/flutter/test_fixes/material.dart.expect
View file @
925ff2dc
...
...
@@ -7,4 +7,8 @@ import 'package:flutter/material.dart';
void main() {
// Change made in https://github.com/flutter/flutter/pull/15303
showDialog(builder: (context) => Text('Fix me.'));
// Changes made in https://github.com/flutter/flutter/pull/44189
const StatefulElement statefulElement = StatefulElement(myWidget);
statefulElement.dependOnInheritedElement(ancestor);
}
packages/flutter/test_fixes/widgets.dart
0 → 100644
View file @
925ff2dc
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:flutter/widgets.dart'
;
void
main
(
)
{
// Changes made in https://github.com/flutter/flutter/pull/44189
const
StatefulElement
statefulElement
=
StatefulElement
(
myWidget
);
statefulElement
.
inheritFromElement
(
ancestor
);
}
packages/flutter/test_fixes/widgets.dart.expect
0 → 100644
View file @
925ff2dc
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/widgets.dart';
void main() {
// Changes made in https://github.com/flutter/flutter/pull/44189
const StatefulElement statefulElement = StatefulElement(myWidget);
statefulElement.dependOnInheritedElement(ancestor);
}
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