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
4a3584af
Unverified
Commit
4a3584af
authored
Jan 21, 2022
by
Alberto
Committed by
GitHub
Jan 21, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: Moved didUpdateWidget calls first (#96944)
parent
c1e24765
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
9 deletions
+9
-9
picker.dart
packages/flutter/lib/src/cupertino/picker.dart
+1
-1
sliding_segmented_control.dart
.../flutter/lib/src/cupertino/sliding_segmented_control.dart
+2
-2
text_selection_toolbar.dart
...ges/flutter/lib/src/cupertino/text_selection_toolbar.dart
+1
-1
banner.dart
packages/flutter/lib/src/material/banner.dart
+1
-1
scaffold.dart
packages/flutter/lib/src/material/scaffold.dart
+1
-1
snack_bar.dart
packages/flutter/lib/src/material/snack_bar.dart
+1
-1
router.dart
packages/flutter/lib/src/widgets/router.dart
+1
-1
value_listenable_builder.dart
...ges/flutter/lib/src/widgets/value_listenable_builder.dart
+1
-1
No files found.
packages/flutter/lib/src/cupertino/picker.dart
View file @
4a3584af
...
...
@@ -218,13 +218,13 @@ class _CupertinoPickerState extends State<CupertinoPicker> {
@override
void
didUpdateWidget
(
CupertinoPicker
oldWidget
)
{
super
.
didUpdateWidget
(
oldWidget
);
if
(
widget
.
scrollController
!=
null
&&
oldWidget
.
scrollController
==
null
)
{
_controller
=
null
;
}
else
if
(
widget
.
scrollController
==
null
&&
oldWidget
.
scrollController
!=
null
)
{
assert
(
_controller
==
null
);
_controller
=
FixedExtentScrollController
();
}
super
.
didUpdateWidget
(
oldWidget
);
}
@override
...
...
packages/flutter/lib/src/cupertino/sliding_segmented_control.dart
View file @
4a3584af
...
...
@@ -123,8 +123,8 @@ class _SegmentState<T> extends State<_Segment<T>> with TickerProviderStateMixin<
@override
void
didUpdateWidget
(
_Segment
<
T
>
oldWidget
)
{
assert
(
oldWidget
.
key
==
widget
.
key
);
super
.
didUpdateWidget
(
oldWidget
);
assert
(
oldWidget
.
key
==
widget
.
key
);
if
(
oldWidget
.
shouldScaleContent
!=
widget
.
shouldScaleContent
)
{
highlightPressScaleAnimation
=
highlightPressScaleController
.
drive
(
...
...
@@ -213,8 +213,8 @@ class _SegmentSeparatorState extends State<_SegmentSeparator> with TickerProvide
@override
void
didUpdateWidget
(
_SegmentSeparator
oldWidget
)
{
assert
(
oldWidget
.
key
==
widget
.
key
);
super
.
didUpdateWidget
(
oldWidget
);
assert
(
oldWidget
.
key
==
widget
.
key
);
if
(
oldWidget
.
highlighted
!=
widget
.
highlighted
)
{
separatorOpacityController
.
animateTo
(
...
...
packages/flutter/lib/src/cupertino/text_selection_toolbar.dart
View file @
4a3584af
...
...
@@ -422,6 +422,7 @@ class _CupertinoTextSelectionToolbarContentState extends State<_CupertinoTextSel
@override
void
didUpdateWidget
(
_CupertinoTextSelectionToolbarContent
oldWidget
)
{
super
.
didUpdateWidget
(
oldWidget
);
// If the children are changing, the current page should be reset.
if
(
widget
.
children
!=
oldWidget
.
children
)
{
_page
=
0
;
...
...
@@ -429,7 +430,6 @@ class _CupertinoTextSelectionToolbarContentState extends State<_CupertinoTextSel
_controller
.
forward
();
_controller
.
removeStatusListener
(
_statusListener
);
}
super
.
didUpdateWidget
(
oldWidget
);
}
@override
...
...
packages/flutter/lib/src/material/banner.dart
View file @
4a3584af
...
...
@@ -230,11 +230,11 @@ class _MaterialBannerState extends State<MaterialBanner> {
@override
void
didUpdateWidget
(
MaterialBanner
oldWidget
)
{
super
.
didUpdateWidget
(
oldWidget
);
if
(
widget
.
animation
!=
oldWidget
.
animation
)
{
oldWidget
.
animation
?.
removeStatusListener
(
_onAnimationStatusChanged
);
widget
.
animation
?.
addStatusListener
(
_onAnimationStatusChanged
);
}
super
.
didUpdateWidget
(
oldWidget
);
}
@override
...
...
packages/flutter/lib/src/material/scaffold.dart
View file @
4a3584af
...
...
@@ -2596,6 +2596,7 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
@override
void
didUpdateWidget
(
Scaffold
oldWidget
)
{
super
.
didUpdateWidget
(
oldWidget
);
// Update the Floating Action Button Animator, and then schedule the Floating Action Button for repositioning.
if
(
widget
.
floatingActionButtonAnimator
!=
oldWidget
.
floatingActionButtonAnimator
)
{
_floatingActionButtonAnimator
=
widget
.
floatingActionButtonAnimator
??
_kDefaultFloatingActionButtonAnimator
;
...
...
@@ -2628,7 +2629,6 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
_updatePersistentBottomSheet
();
}
}
super
.
didUpdateWidget
(
oldWidget
);
}
@override
...
...
packages/flutter/lib/src/material/snack_bar.dart
View file @
4a3584af
...
...
@@ -385,11 +385,11 @@ class _SnackBarState extends State<SnackBar> {
@override
void
didUpdateWidget
(
SnackBar
oldWidget
)
{
super
.
didUpdateWidget
(
oldWidget
);
if
(
widget
.
animation
!=
oldWidget
.
animation
)
{
oldWidget
.
animation
!.
removeStatusListener
(
_onAnimationStatusChanged
);
widget
.
animation
!.
addStatusListener
(
_onAnimationStatusChanged
);
}
super
.
didUpdateWidget
(
oldWidget
);
}
@override
...
...
packages/flutter/lib/src/widgets/router.dart
View file @
4a3584af
...
...
@@ -1087,12 +1087,12 @@ class _BackButtonListenerState extends State<BackButtonListener> {
@override
void
didUpdateWidget
(
covariant
BackButtonListener
oldWidget
)
{
super
.
didUpdateWidget
(
oldWidget
);
if
(
oldWidget
.
onBackButtonPressed
!=
widget
.
onBackButtonPressed
)
{
dispatcher
?.
removeCallback
(
oldWidget
.
onBackButtonPressed
);
dispatcher
?.
addCallback
(
widget
.
onBackButtonPressed
);
dispatcher
?.
takePriority
();
}
super
.
didUpdateWidget
(
oldWidget
);
}
@override
...
...
packages/flutter/lib/src/widgets/value_listenable_builder.dart
View file @
4a3584af
...
...
@@ -164,12 +164,12 @@ class _ValueListenableBuilderState<T> extends State<ValueListenableBuilder<T>> {
@override
void
didUpdateWidget
(
ValueListenableBuilder
<
T
>
oldWidget
)
{
super
.
didUpdateWidget
(
oldWidget
);
if
(
oldWidget
.
valueListenable
!=
widget
.
valueListenable
)
{
oldWidget
.
valueListenable
.
removeListener
(
_valueChanged
);
value
=
widget
.
valueListenable
.
value
;
widget
.
valueListenable
.
addListener
(
_valueChanged
);
}
super
.
didUpdateWidget
(
oldWidget
);
}
@override
...
...
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