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
671926db
Unverified
Commit
671926db
authored
Mar 31, 2021
by
Alexandre Ardhuin
Committed by
GitHub
Mar 31, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add missing trailing commas (#79434)
parent
54c0e7a4
Changes
49
Hide whitespace changes
Inline
Side-by-side
Showing
49 changed files
with
135 additions
and
124 deletions
+135
-124
animation_controller.dart
packages/flutter/lib/src/animation/animation_controller.dart
+7
-7
nav_bar.dart
packages/flutter/lib/src/cupertino/nav_bar.dart
+3
-3
refresh.dart
packages/flutter/lib/src/cupertino/refresh.dart
+1
-1
tab_scaffold.dart
packages/flutter/lib/src/cupertino/tab_scaffold.dart
+2
-2
assertions.dart
packages/flutter/lib/src/foundation/assertions.dart
+2
-2
diagnostics.dart
packages/flutter/lib/src/foundation/diagnostics.dart
+1
-1
stack_frame.dart
packages/flutter/lib/src/foundation/stack_frame.dart
+1
-1
force_press.dart
packages/flutter/lib/src/gestures/force_press.dart
+1
-1
hit_test.dart
packages/flutter/lib/src/gestures/hit_test.dart
+1
-1
app_bar_theme.dart
packages/flutter/lib/src/material/app_bar_theme.dart
+4
-2
bottom_navigation_bar.dart
packages/flutter/lib/src/material/bottom_navigation_bar.dart
+1
-1
calendar_date_picker.dart
packages/flutter/lib/src/material/calendar_date_picker.dart
+4
-4
chip.dart
packages/flutter/lib/src/material/chip.dart
+8
-6
date_picker.dart
packages/flutter/lib/src/material/date_picker.dart
+17
-17
dropdown.dart
packages/flutter/lib/src/material/dropdown.dart
+1
-1
expansion_panel.dart
packages/flutter/lib/src/material/expansion_panel.dart
+1
-1
ink_decoration.dart
packages/flutter/lib/src/material/ink_decoration.dart
+1
-1
input_date_picker_form_field.dart
...lutter/lib/src/material/input_date_picker_form_field.dart
+4
-4
list_tile.dart
packages/flutter/lib/src/material/list_tile.dart
+2
-2
material.dart
packages/flutter/lib/src/material/material.dart
+1
-1
scaffold.dart
packages/flutter/lib/src/material/scaffold.dart
+1
-1
text_form_field.dart
packages/flutter/lib/src/material/text_form_field.dart
+1
-1
text_theme.dart
packages/flutter/lib/src/material/text_theme.dart
+6
-2
toggle_buttons.dart
packages/flutter/lib/src/material/toggle_buttons.dart
+3
-3
box_decoration.dart
packages/flutter/lib/src/painting/box_decoration.dart
+1
-1
decoration_image.dart
packages/flutter/lib/src/painting/decoration_image.dart
+1
-1
image_provider.dart
packages/flutter/lib/src/painting/image_provider.dart
+1
-1
box.dart
packages/flutter/lib/src/rendering/box.dart
+1
-1
flex.dart
packages/flutter/lib/src/rendering/flex.dart
+1
-1
semantics.dart
packages/flutter/lib/src/semantics/semantics.dart
+1
-1
actions.dart
packages/flutter/lib/src/widgets/actions.dart
+1
-1
app.dart
packages/flutter/lib/src/widgets/app.dart
+6
-6
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+2
-2
container.dart
packages/flutter/lib/src/widgets/container.dart
+1
-1
focus_manager.dart
packages/flutter/lib/src/widgets/focus_manager.dart
+10
-8
focus_traversal.dart
packages/flutter/lib/src/widgets/focus_traversal.dart
+5
-4
form.dart
packages/flutter/lib/src/widgets/form.dart
+2
-2
heroes.dart
packages/flutter/lib/src/widgets/heroes.dart
+1
-1
implicit_animations.dart
packages/flutter/lib/src/widgets/implicit_animations.dart
+1
-1
list_wheel_scroll_view.dart
packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart
+2
-2
navigator.dart
packages/flutter/lib/src/widgets/navigator.dart
+12
-12
overlay.dart
packages/flutter/lib/src/widgets/overlay.dart
+4
-4
restoration.dart
packages/flutter/lib/src/widgets/restoration.dart
+2
-2
router.dart
packages/flutter/lib/src/widgets/router.dart
+1
-1
scroll_activity.dart
packages/flutter/lib/src/widgets/scroll_activity.dart
+1
-1
scroll_view.dart
packages/flutter/lib/src/widgets/scroll_view.dart
+1
-1
single_child_scroll_view.dart
...ges/flutter/lib/src/widgets/single_child_scroll_view.dart
+1
-1
sliver.dart
packages/flutter/lib/src/widgets/sliver.dart
+1
-1
visibility.dart
packages/flutter/lib/src/widgets/visibility.dart
+1
-1
No files found.
packages/flutter/lib/src/animation/animation_controller.dart
View file @
671926db
...
...
@@ -454,7 +454,7 @@ class AnimationController extends Animation<double>
assert
(
_ticker
!=
null
,
'AnimationController.forward() called after AnimationController.dispose()
\n
'
'AnimationController methods should not be used after calling dispose.'
'AnimationController methods should not be used after calling dispose.'
,
);
_direction
=
_AnimationDirection
.
forward
;
if
(
from
!=
null
)
...
...
@@ -487,7 +487,7 @@ class AnimationController extends Animation<double>
assert
(
_ticker
!=
null
,
'AnimationController.reverse() called after AnimationController.dispose()
\n
'
'AnimationController methods should not be used after calling dispose.'
'AnimationController methods should not be used after calling dispose.'
,
);
_direction
=
_AnimationDirection
.
reverse
;
if
(
from
!=
null
)
...
...
@@ -526,7 +526,7 @@ class AnimationController extends Animation<double>
assert
(
_ticker
!=
null
,
'AnimationController.animateTo() called after AnimationController.dispose()
\n
'
'AnimationController methods should not be used after calling dispose.'
'AnimationController methods should not be used after calling dispose.'
,
);
_direction
=
_AnimationDirection
.
forward
;
return
_animateToInternal
(
target
,
duration:
duration
,
curve:
curve
);
...
...
@@ -559,7 +559,7 @@ class AnimationController extends Animation<double>
assert
(
_ticker
!=
null
,
'AnimationController.animateBack() called after AnimationController.dispose()
\n
'
'AnimationController methods should not be used after calling dispose.'
'AnimationController methods should not be used after calling dispose.'
,
);
_direction
=
_AnimationDirection
.
reverse
;
return
_animateToInternal
(
target
,
duration:
duration
,
curve:
curve
);
...
...
@@ -704,7 +704,7 @@ class AnimationController extends Animation<double>
assert
(
simulation
.
type
!=
SpringType
.
underDamped
,
'The resulting spring simulation is of type SpringType.underDamped.
\n
'
'This can lead to unexpected look of the animation, please adjust the springDescription parameter'
'This can lead to unexpected look of the animation, please adjust the springDescription parameter'
,
);
stop
();
return
_startSimulation
(
simulation
);
...
...
@@ -728,7 +728,7 @@ class AnimationController extends Animation<double>
assert
(
_ticker
!=
null
,
'AnimationController.animateWith() called after AnimationController.dispose()
\n
'
'AnimationController methods should not be used after calling dispose.'
'AnimationController methods should not be used after calling dispose.'
,
);
stop
();
_direction
=
_AnimationDirection
.
forward
;
...
...
@@ -770,7 +770,7 @@ class AnimationController extends Animation<double>
assert
(
_ticker
!=
null
,
'AnimationController.stop() called after AnimationController.dispose()
\n
'
'AnimationController methods should not be used after calling dispose.'
'AnimationController methods should not be used after calling dispose.'
,
);
_simulation
=
null
;
_lastElapsedDuration
=
null
;
...
...
packages/flutter/lib/src/cupertino/nav_bar.dart
View file @
671926db
...
...
@@ -238,12 +238,12 @@ class CupertinoNavigationBar extends StatefulWidget implements ObstructingPrefer
assert
(
heroTag
!=
null
,
'heroTag cannot be null. Use transitionBetweenRoutes = false to '
'disable Hero transition on this navigation bar.'
'disable Hero transition on this navigation bar.'
,
),
assert
(
!
transitionBetweenRoutes
||
identical
(
heroTag
,
_defaultHeroTag
),
'Cannot specify a heroTag override if this navigation bar does not '
'transition due to transitionBetweenRoutes = false.'
'transition due to transitionBetweenRoutes = false.'
,
),
super
(
key:
key
);
...
...
@@ -574,7 +574,7 @@ class CupertinoSliverNavigationBar extends StatefulWidget {
automaticallyImplyTitle
==
true
||
largeTitle
!=
null
,
'No largeTitle has been provided but automaticallyImplyTitle is also '
'false. Either provide a largeTitle or set automaticallyImplyTitle to '
'true.'
'true.'
,
),
super
(
key:
key
);
...
...
packages/flutter/lib/src/cupertino/refresh.dart
View file @
671926db
...
...
@@ -351,7 +351,7 @@ class CupertinoSliverRefreshControl extends StatefulWidget {
assert
(
refreshTriggerPullDistance
>=
refreshIndicatorExtent
,
'The refresh indicator cannot take more space in its final state '
'than the amount initially created by overscrolling.'
'than the amount initially created by overscrolling.'
,
),
super
(
key:
key
);
...
...
packages/flutter/lib/src/cupertino/tab_scaffold.dart
View file @
671926db
...
...
@@ -220,7 +220,7 @@ class CupertinoTabScaffold extends StatefulWidget {
assert
(
controller
==
null
||
controller
.
index
<
tabBar
.
items
.
length
,
"The CupertinoTabController's current index
${controller.index}
is "
'out of bounds for the tab bar with
${tabBar.items.length}
tabs'
'out of bounds for the tab bar with
${tabBar.items.length}
tabs'
,
),
super
(
key:
key
);
...
...
@@ -367,7 +367,7 @@ class _CupertinoTabScaffoldState extends State<CupertinoTabScaffold> with Restor
assert
(
_controller
.
index
>=
0
&&
_controller
.
index
<
widget
.
tabBar
.
items
.
length
,
"The
$runtimeType
's current index
${_controller.index}
is "
'out of bounds for the tab bar with
${widget.tabBar.items.length}
tabs'
'out of bounds for the tab bar with
${widget.tabBar.items.length}
tabs'
,
);
// The value of `_controller.index` has already been updated at this point.
...
...
packages/flutter/lib/src/foundation/assertions.dart
View file @
671926db
...
...
@@ -811,8 +811,8 @@ class FlutterError extends Error with DiagnosticableTreeMixin implements Asserti
'framework by filing a bug on GitHub:
\n
'
' https://github.com/flutter/flutter/issues/new?template=2_bug.md'
,
),
],
)
)
;
]
)
,
);
assert
(()
{
final
Iterable
<
DiagnosticsNode
>
summaries
=
diagnostics
.
where
((
DiagnosticsNode
node
)
=>
node
.
level
==
DiagnosticLevel
.
summary
);
if
(
summaries
.
length
>
1
)
{
...
...
packages/flutter/lib/src/foundation/diagnostics.dart
View file @
671926db
...
...
@@ -1436,7 +1436,7 @@ abstract class DiagnosticsNode {
name
==
null
||
!
name
.
endsWith
(
':'
),
'Names of diagnostic nodes must not end with colons.
\n
'
'name:
\n
'
' "
$name
"'
' "
$name
"'
,
);
/// Diagnostics containing just a string `message` and not a concrete name or
...
...
packages/flutter/lib/src/foundation/stack_frame.dart
View file @
671926db
...
...
@@ -194,7 +194,7 @@ class StackFrame {
line
!=
'===== asynchronous gap ==========================='
,
'Got a stack frame from package:stack_trace, where a vm or web frame was expected. '
'This can happen if FlutterError.demangleStackTrace was not set in an environment '
'that propagates non-standard stack traces to the framework, such as during tests.'
'that propagates non-standard stack traces to the framework, such as during tests.'
,
);
// Web frames.
...
...
packages/flutter/lib/src/gestures/force_press.dart
View file @
671926db
...
...
@@ -230,7 +230,7 @@ class ForcePressGestureRecognizer extends OneSequenceGestureRecognizer {
final
double
pressure
=
interpolation
(
event
.
pressureMin
,
event
.
pressureMax
,
event
.
pressure
);
assert
(
(
pressure
>=
0.0
&&
pressure
<=
1.0
)
||
// Interpolated pressure must be between 1.0 and 0.0...
pressure
.
isNaN
// and interpolation may return NaN for values it doesn't want to support...
pressure
.
isNaN
,
// and interpolation may return NaN for values it doesn't want to support...
);
_lastPosition
=
OffsetPair
.
fromEventPosition
(
event
);
...
...
packages/flutter/lib/src/gestures/hit_test.dart
View file @
671926db
...
...
@@ -216,7 +216,7 @@ class HitTestResult {
'events must be Vector4(0, 0, 1, 0) to ensure that a transformed '
'point is directly under the pointing device. Did you forget to run the paint '
'matrix through PointerEvent.removePerspectiveTransform? '
'The provided matrix is:
\n
$transform
'
'The provided matrix is:
\n
$transform
'
,
);
_localTransforms
.
add
(
_MatrixTransformPart
(
transform
));
}
...
...
packages/flutter/lib/src/material/app_bar_theme.dart
View file @
671926db
...
...
@@ -45,7 +45,8 @@ class AppBarTheme with Diagnosticable {
this
.
backwardsCompatibility
,
})
:
assert
(
color
==
null
||
backgroundColor
==
null
,
'The color and backgroundColor parameters mean the same thing. Only specify one.'
),
'The color and backgroundColor parameters mean the same thing. Only specify one.'
,
),
backgroundColor
=
backgroundColor
??
color
;
/// This property is obsolete, please use [systemOverlayStyle] instead.
...
...
@@ -190,7 +191,8 @@ class AppBarTheme with Diagnosticable {
})
{
assert
(
color
==
null
||
backgroundColor
==
null
,
'The color and backgroundColor parameters mean the same thing. Only specify one.'
);
'The color and backgroundColor parameters mean the same thing. Only specify one.'
,
);
return
AppBarTheme
(
brightness:
brightness
??
this
.
brightness
,
backgroundColor:
backgroundColor
??
color
??
this
.
backgroundColor
,
...
...
packages/flutter/lib/src/material/bottom_navigation_bar.dart
View file @
671926db
...
...
@@ -290,7 +290,7 @@ class BottomNavigationBar extends StatefulWidget {
assert
(
iconSize
!=
null
&&
iconSize
>=
0.0
),
assert
(
selectedItemColor
==
null
||
fixedColor
==
null
,
'Either selectedItemColor or fixedColor can be specified, but not both'
'Either selectedItemColor or fixedColor can be specified, but not both'
,
),
assert
(
selectedFontSize
!=
null
&&
selectedFontSize
>=
0.0
),
assert
(
unselectedFontSize
!=
null
&&
unselectedFontSize
>=
0.0
),
...
...
packages/flutter/lib/src/material/calendar_date_picker.dart
View file @
671926db
...
...
@@ -105,19 +105,19 @@ class CalendarDatePicker extends StatefulWidget {
super
(
key:
key
)
{
assert
(
!
this
.
lastDate
.
isBefore
(
this
.
firstDate
),
'lastDate
${this.lastDate}
must be on or after firstDate
${this.firstDate}
.'
'lastDate
${this.lastDate}
must be on or after firstDate
${this.firstDate}
.'
,
);
assert
(
!
this
.
initialDate
.
isBefore
(
this
.
firstDate
),
'initialDate
${this.initialDate}
must be on or after firstDate
${this.firstDate}
.'
'initialDate
${this.initialDate}
must be on or after firstDate
${this.firstDate}
.'
,
);
assert
(
!
this
.
initialDate
.
isAfter
(
this
.
lastDate
),
'initialDate
${this.initialDate}
must be on or before lastDate
${this.lastDate}
.'
'initialDate
${this.initialDate}
must be on or before lastDate
${this.lastDate}
.'
,
);
assert
(
selectableDayPredicate
==
null
||
selectableDayPredicate
!(
this
.
initialDate
),
'Provided initialDate
${this.initialDate}
must satisfy provided selectableDayPredicate.'
'Provided initialDate
${this.initialDate}
must satisfy provided selectableDayPredicate.'
,
);
}
...
...
packages/flutter/lib/src/material/chip.dart
View file @
671926db
...
...
@@ -2779,13 +2779,15 @@ class _RenderChip extends RenderBox {
);
size
=
constraints
.
constrain
(
paddedSize
);
assert
(
size
.
height
==
constraints
.
constrainHeight
(
paddedSize
.
height
),
"Constrained height
${size.height}
doesn't match expected height "
'
${constraints.constrainWidth(paddedSize.height)}
'
);
size
.
height
==
constraints
.
constrainHeight
(
paddedSize
.
height
),
"Constrained height
${size.height}
doesn't match expected height "
'
${constraints.constrainWidth(paddedSize.height)}
'
,
);
assert
(
size
.
width
==
constraints
.
constrainWidth
(
paddedSize
.
width
),
"Constrained width
${size.width}
doesn't match expected width "
'
${constraints.constrainWidth(paddedSize.width)}
'
);
size
.
width
==
constraints
.
constrainWidth
(
paddedSize
.
width
),
"Constrained width
${size.width}
doesn't match expected width "
'
${constraints.constrainWidth(paddedSize.width)}
'
,
);
}
static
final
ColorTween
selectionScrimTween
=
ColorTween
(
...
...
packages/flutter/lib/src/material/date_picker.dart
View file @
671926db
...
...
@@ -223,19 +223,19 @@ Future<DateTime?> showDatePicker({
lastDate
=
DateUtils
.
dateOnly
(
lastDate
);
assert
(
!
lastDate
.
isBefore
(
firstDate
),
'lastDate
$lastDate
must be on or after firstDate
$firstDate
.'
'lastDate
$lastDate
must be on or after firstDate
$firstDate
.'
,
);
assert
(
!
initialDate
.
isBefore
(
firstDate
),
'initialDate
$initialDate
must be on or after firstDate
$firstDate
.'
'initialDate
$initialDate
must be on or after firstDate
$firstDate
.'
,
);
assert
(
!
initialDate
.
isAfter
(
lastDate
),
'initialDate
$initialDate
must be on or before lastDate
$lastDate
.'
'initialDate
$initialDate
must be on or before lastDate
$lastDate
.'
,
);
assert
(
selectableDayPredicate
==
null
||
selectableDayPredicate
(
initialDate
),
'Provided initialDate
$initialDate
must satisfy provided selectableDayPredicate.'
'Provided initialDate
$initialDate
must satisfy provided selectableDayPredicate.'
,
);
assert
(
initialEntryMode
!=
null
);
assert
(
useRootNavigator
!=
null
);
...
...
@@ -324,19 +324,19 @@ class DatePickerDialog extends StatefulWidget {
super
(
key:
key
)
{
assert
(
!
this
.
lastDate
.
isBefore
(
this
.
firstDate
),
'lastDate
${this.lastDate}
must be on or after firstDate
${this.firstDate}
.'
'lastDate
${this.lastDate}
must be on or after firstDate
${this.firstDate}
.'
,
);
assert
(
!
this
.
initialDate
.
isBefore
(
this
.
firstDate
),
'initialDate
${this.initialDate}
must be on or after firstDate
${this.firstDate}
.'
'initialDate
${this.initialDate}
must be on or after firstDate
${this.firstDate}
.'
,
);
assert
(
!
this
.
initialDate
.
isAfter
(
this
.
lastDate
),
'initialDate
${this.initialDate}
must be on or before lastDate
${this.lastDate}
.'
'initialDate
${this.initialDate}
must be on or before lastDate
${this.lastDate}
.'
,
);
assert
(
selectableDayPredicate
==
null
||
selectableDayPredicate
!(
this
.
initialDate
),
'Provided initialDate
${this.initialDate}
must satisfy provided selectableDayPredicate'
'Provided initialDate
${this.initialDate}
must satisfy provided selectableDayPredicate'
,
);
}
...
...
@@ -1052,11 +1052,11 @@ Future<DateTimeRange?> showDateRangePicker({
assert
(
context
!=
null
);
assert
(
initialDateRange
==
null
||
(
initialDateRange
.
start
!=
null
&&
initialDateRange
.
end
!=
null
),
'initialDateRange must be null or have non-null start and end dates.'
'initialDateRange must be null or have non-null start and end dates.'
,
);
assert
(
initialDateRange
==
null
||
!
initialDateRange
.
start
.
isAfter
(
initialDateRange
.
end
),
'initialDateRange
\'
s start date must not be after it
\'
s end date.'
'initialDateRange
\'
s start date must not be after it
\'
s end date.'
,
);
initialDateRange
=
initialDateRange
==
null
?
null
:
DateUtils
.
datesOnly
(
initialDateRange
);
assert
(
firstDate
!=
null
);
...
...
@@ -1065,23 +1065,23 @@ Future<DateTimeRange?> showDateRangePicker({
lastDate
=
DateUtils
.
dateOnly
(
lastDate
);
assert
(
!
lastDate
.
isBefore
(
firstDate
),
'lastDate
$lastDate
must be on or after firstDate
$firstDate
.'
'lastDate
$lastDate
must be on or after firstDate
$firstDate
.'
,
);
assert
(
initialDateRange
==
null
||
!
initialDateRange
.
start
.
isBefore
(
firstDate
),
'initialDateRange
\'
s start date must be on or after firstDate
$firstDate
.'
'initialDateRange
\'
s start date must be on or after firstDate
$firstDate
.'
,
);
assert
(
initialDateRange
==
null
||
!
initialDateRange
.
end
.
isBefore
(
firstDate
),
'initialDateRange
\'
s end date must be on or after firstDate
$firstDate
.'
'initialDateRange
\'
s end date must be on or after firstDate
$firstDate
.'
,
);
assert
(
initialDateRange
==
null
||
!
initialDateRange
.
start
.
isAfter
(
lastDate
),
'initialDateRange
\'
s start date must be on or before lastDate
$lastDate
.'
'initialDateRange
\'
s start date must be on or before lastDate
$lastDate
.'
,
);
assert
(
initialDateRange
==
null
||
!
initialDateRange
.
end
.
isAfter
(
lastDate
),
'initialDateRange
\'
s end date must be on or before lastDate
$lastDate
.'
'initialDateRange
\'
s end date must be on or before lastDate
$lastDate
.'
,
);
currentDate
=
DateUtils
.
dateOnly
(
currentDate
??
DateTime
.
now
());
assert
(
initialEntryMode
!=
null
);
...
...
@@ -1703,11 +1703,11 @@ class _CalendarDateRangePicker extends StatefulWidget {
super
(
key:
key
)
{
assert
(
this
.
initialStartDate
==
null
||
this
.
initialEndDate
==
null
||
!
this
.
initialStartDate
!.
isAfter
(
initialEndDate
!),
'initialStartDate must be on or before initialEndDate.'
'initialStartDate must be on or before initialEndDate.'
,
);
assert
(
!
this
.
lastDate
.
isBefore
(
this
.
firstDate
),
'firstDate must be on or before lastDate.'
'firstDate must be on or before lastDate.'
,
);
}
...
...
packages/flutter/lib/src/material/dropdown.dart
View file @
671926db
...
...
@@ -1530,7 +1530,7 @@ class DropdownButtonFormField<T> extends FormField<T> {
assert
(
autovalidate
==
false
||
autovalidate
==
true
&&
autovalidateMode
==
null
,
'autovalidate and autovalidateMode should not be used together.'
'autovalidate and autovalidateMode should not be used together.'
,
),
decoration
=
decoration
??
InputDecoration
(
focusColor:
focusColor
),
super
(
...
...
packages/flutter/lib/src/material/expansion_panel.dart
View file @
671926db
...
...
@@ -475,7 +475,7 @@ class _ExpansionPanelListState extends State<ExpansionPanelList> {
Widget
build
(
BuildContext
context
)
{
assert
(
kElevationToShadow
.
containsKey
(
widget
.
elevation
),
'Invalid value for elevation. See the kElevationToShadow constant for'
' possible elevation values.'
' possible elevation values.'
,
);
final
List
<
MergeableMaterialItem
>
items
=
<
MergeableMaterialItem
>[];
...
...
packages/flutter/lib/src/material/ink_decoration.dart
View file @
671926db
...
...
@@ -136,7 +136,7 @@ class Ink extends StatefulWidget {
assert
(
decoration
==
null
||
decoration
.
debugAssertIsValid
()),
assert
(
color
==
null
||
decoration
==
null
,
'Cannot provide both a color and a decoration
\n
'
'The color argument is just a shorthand for "decoration: BoxDecoration(color: color)".'
'The color argument is just a shorthand for "decoration: BoxDecoration(color: color)".'
,
),
decoration
=
decoration
??
(
color
!=
null
?
BoxDecoration
(
color:
color
)
:
null
),
super
(
key:
key
);
...
...
packages/flutter/lib/src/material/input_date_picker_form_field.dart
View file @
671926db
...
...
@@ -66,19 +66,19 @@ class InputDatePickerFormField extends StatefulWidget {
super
(
key:
key
)
{
assert
(
!
this
.
lastDate
.
isBefore
(
this
.
firstDate
),
'lastDate
${this.lastDate}
must be on or after firstDate
${this.firstDate}
.'
'lastDate
${this.lastDate}
must be on or after firstDate
${this.firstDate}
.'
,
);
assert
(
initialDate
==
null
||
!
this
.
initialDate
!.
isBefore
(
this
.
firstDate
),
'initialDate
${this.initialDate}
must be on or after firstDate
${this.firstDate}
.'
'initialDate
${this.initialDate}
must be on or after firstDate
${this.firstDate}
.'
,
);
assert
(
initialDate
==
null
||
!
this
.
initialDate
!.
isAfter
(
this
.
lastDate
),
'initialDate
${this.initialDate}
must be on or before lastDate
${this.lastDate}
.'
'initialDate
${this.initialDate}
must be on or before lastDate
${this.lastDate}
.'
,
);
assert
(
selectableDayPredicate
==
null
||
initialDate
==
null
||
selectableDayPredicate
!(
this
.
initialDate
!),
'Provided initialDate
${this.initialDate}
must satisfy provided selectableDayPredicate.'
'Provided initialDate
${this.initialDate}
must satisfy provided selectableDayPredicate.'
,
);
}
...
...
packages/flutter/lib/src/material/list_tile.dart
View file @
671926db
...
...
@@ -1722,13 +1722,13 @@ class _RenderListTile extends RenderBox {
tileWidth
!=
leadingSize
.
width
||
tileWidth
==
0.0
,
'Leading widget consumes entire tile width. Please use a sized widget, '
'or consider replacing ListTile with a custom widget '
'(see https://api.flutter.dev/flutter/material/ListTile-class.html#material.ListTile.4)'
'(see https://api.flutter.dev/flutter/material/ListTile-class.html#material.ListTile.4)'
,
);
assert
(
tileWidth
!=
trailingSize
.
width
||
tileWidth
==
0.0
,
'Trailing widget consumes entire tile width. Please use a sized widget, '
'or consider replacing ListTile with a custom widget '
'(see https://api.flutter.dev/flutter/material/ListTile-class.html#material.ListTile.4)'
'(see https://api.flutter.dev/flutter/material/ListTile-class.html#material.ListTile.4)'
,
);
final
double
titleStart
=
hasLeading
...
...
packages/flutter/lib/src/material/material.dart
View file @
671926db
...
...
@@ -363,7 +363,7 @@ class _MaterialState extends State<Material> with TickerProviderStateMixin {
'If Material type is not MaterialType.transparency, a color must '
'either be passed in through the `color` property, or be defined '
'in the theme (ex. canvasColor != null if type is set to '
'MaterialType.canvas)'
'MaterialType.canvas)'
,
);
Widget
?
contents
=
widget
.
child
;
if
(
contents
!=
null
)
{
...
...
packages/flutter/lib/src/material/scaffold.dart
View file @
671926db
...
...
@@ -3059,7 +3059,7 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
assert
(
_snackBars
.
isEmpty
||
_messengerSnackBar
==
null
,
'Only one API should be used to manage SnackBars. The ScaffoldMessenger is '
'the preferred API instead of the Scaffold methods.'
'the preferred API instead of the Scaffold methods.'
,
);
if
(
_currentBottomSheet
!=
null
||
_dismissedBottomSheets
.
isNotEmpty
)
{
...
...
packages/flutter/lib/src/material/text_form_field.dart
View file @
671926db
...
...
@@ -207,7 +207,7 @@ class TextFormField extends FormField<String> {
assert
(
autovalidate
==
false
||
autovalidate
==
true
&&
autovalidateMode
==
null
,
'autovalidate and autovalidateMode should not be used together.'
'autovalidate and autovalidateMode should not be used together.'
,
),
assert
(
maxLengthEnforced
!=
null
),
assert
(
...
...
packages/flutter/lib/src/material/text_theme.dart
View file @
671926db
...
...
@@ -180,7 +180,9 @@ class TextTheme with Diagnosticable {
bodyText1
==
null
&&
bodyText2
==
null
)
||
(
display4
==
null
&&
display3
==
null
&&
display2
==
null
&&
display1
==
null
&&
headline
==
null
&&
title
==
null
&&
subhead
==
null
&&
subtitle
==
null
&&
body2
==
null
&&
body1
==
null
),
'Cannot mix 2014 and 2018 terms in call to TextTheme() constructor.'
),
body2
==
null
&&
body1
==
null
),
'Cannot mix 2014 and 2018 terms in call to TextTheme() constructor.'
,
),
headline1
=
headline1
??
display4
,
headline2
=
headline2
??
display3
,
headline3
=
headline3
??
display2
,
...
...
@@ -451,7 +453,9 @@ class TextTheme with Diagnosticable {
bodyText1
==
null
&&
bodyText2
==
null
)
||
(
display4
==
null
&&
display3
==
null
&&
display2
==
null
&&
display1
==
null
&&
headline
==
null
&&
title
==
null
&&
subhead
==
null
&&
subtitle
==
null
&&
body2
==
null
&&
body1
==
null
),
'Cannot mix 2014 and 2018 terms in call to TextTheme.copyWith().'
);
body2
==
null
&&
body1
==
null
),
'Cannot mix 2014 and 2018 terms in call to TextTheme.copyWith().'
,
);
return
TextTheme
(
headline1:
headline1
??
display4
??
this
.
headline1
,
headline2:
headline2
??
display3
??
this
.
headline2
,
...
...
packages/flutter/lib/src/material/toggle_buttons.dart
View file @
671926db
...
...
@@ -617,13 +617,13 @@ class ToggleButtons extends StatelessWidget {
!
isSelected
.
any
((
bool
val
)
=>
val
==
null
),
'All elements of isSelected must be non-null.
\n
'
'The current list of isSelected values is as follows:
\n
'
'
$isSelected
'
'
$isSelected
'
,
);
assert
(
focusNodes
==
null
||
!
focusNodes
!.
any
((
FocusNode
val
)
=>
val
==
null
),
'All elements of focusNodes must be non-null.
\n
'
'The current list of focus node values is as follows:
\n
'
'
$focusNodes
'
'
$focusNodes
'
,
);
assert
(
()
{
...
...
@@ -633,7 +633,7 @@ class ToggleButtons extends StatelessWidget {
}(),
'focusNodes.length must match children.length.
\n
'
'There are
${focusNodes!.length}
focus nodes, while '
'there are
${children.length}
children.'
'there are
${children.length}
children.'
,
);
final
ThemeData
theme
=
Theme
.
of
(
context
);
final
ToggleButtonsThemeData
toggleButtonsTheme
=
ToggleButtonsTheme
.
of
(
context
);
...
...
packages/flutter/lib/src/painting/box_decoration.dart
View file @
671926db
...
...
@@ -99,7 +99,7 @@ class BoxDecoration extends Decoration {
assert
(
backgroundBlendMode
==
null
||
color
!=
null
||
gradient
!=
null
,
"backgroundBlendMode applies to BoxDecoration's background color or "
'gradient, but no color or gradient was provided.'
'gradient, but no color or gradient was provided.'
,
);
/// Creates a copy of this object but with the given fields replaced with the
...
...
packages/flutter/lib/src/painting/decoration_image.dart
View file @
671926db
...
...
@@ -440,7 +440,7 @@ void paintImage({
image
.
debugGetOpenHandleStackTraces
()?.
isNotEmpty
??
true
,
'Cannot paint an image that is disposed.
\n
'
'The caller of paintImage is expected to wait to dispose the image until '
'after painting has completed.'
'after painting has completed.'
,
);
if
(
rect
.
isEmpty
)
return
;
...
...
packages/flutter/lib/src/painting/image_provider.dart
View file @
671926db
...
...
@@ -764,7 +764,7 @@ class ResizeImage extends ImageProvider<_SizeAwareCacheKey> {
assert
(
cacheWidth
==
null
&&
cacheHeight
==
null
&&
allowUpscaling
==
null
,
'ResizeImage cannot be composed with another ImageProvider that applies '
'cacheWidth, cacheHeight, or allowUpscaling.'
'cacheWidth, cacheHeight, or allowUpscaling.'
,
);
return
decode
(
bytes
,
cacheWidth:
width
,
cacheHeight:
height
,
allowUpscaling:
this
.
allowUpscaling
);
}
...
...
packages/flutter/lib/src/rendering/box.dart
View file @
671926db
...
...
@@ -1940,7 +1940,7 @@ abstract class RenderBox extends RenderObject {
'otherwise, the only object that is allowed to read RenderBox.size '
'is its parent, if they have said they will. It you hit this assert '
'trying to access a child
\'
s size, pass "parentUsesSize: true" to '
'that child
\'
s layout().'
'that child
\'
s layout().'
,
);
}
assert
(
_size
==
this
.
_size
);
...
...
packages/flutter/lib/src/rendering/flex.dart
View file @
671926db
...
...
@@ -521,7 +521,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
// on [RenderBox.computeMinIntrinsicWidth].
assert
(
RenderObject
.
debugCheckingIntrinsics
,
'Intrinsics are not available for CrossAxisAlignment.baseline.'
'Intrinsics are not available for CrossAxisAlignment.baseline.'
,
);
return
0.0
;
}
...
...
packages/flutter/lib/src/semantics/semantics.dart
View file @
671926db
...
...
@@ -1885,7 +1885,7 @@ class SemanticsNode extends AbstractNode with DiagnosticableTreeMixin {
assert
(
config
.
platformViewId
==
null
||
childrenInInversePaintOrder
==
null
||
childrenInInversePaintOrder
.
isEmpty
,
'SemanticsNodes with children must not specify a platformViewId.'
'SemanticsNodes with children must not specify a platformViewId.'
,
);
_label
=
config
.
label
;
...
...
packages/flutter/lib/src/widgets/actions.dart
View file @
671926db
...
...
@@ -857,7 +857,7 @@ class Actions extends StatefulWidget {
'The type passed to "find" resolved to "Intent": either a non-Intent '
'generic type argument or an example intent derived from Intent must be '
'specified. Intent may be used as the generic type as long as the optional '
'"intent" argument is passed.'
'"intent" argument is passed.'
,
);
_visitActionsAncestors
(
context
,
(
InheritedElement
element
)
{
...
...
packages/flutter/lib/src/widgets/app.dart
View file @
671926db
...
...
@@ -205,13 +205,13 @@ class WidgetsApp extends StatefulWidget {
home
==
null
||
onGenerateInitialRoutes
==
null
,
'If onGenerateInitialRoutes is specified, the home argument will be '
'redundant.'
'redundant.'
,
),
assert
(
home
==
null
||
!
routes
.
containsKey
(
Navigator
.
defaultRouteName
),
'If the home property is specified, the routes table '
'cannot include an entry for "/", since it would be redundant.'
'cannot include an entry for "/", since it would be redundant.'
,
),
assert
(
builder
!=
null
||
...
...
@@ -225,7 +225,7 @@ class WidgetsApp extends StatefulWidget {
'or there must be an onUnknownRoute callback specified, '
'or the builder property must be specified, '
'because otherwise there is nothing to fall back on if the '
'app is started with an intent that specifies an unknown route.'
'app is started with an intent that specifies an unknown route.'
,
),
assert
(
(
home
!=
null
||
...
...
@@ -243,7 +243,7 @@ class WidgetsApp extends StatefulWidget {
'and the other navigator-related properties, '
'navigatorKey, initialRoute, and navigatorObservers, '
'must have their initial values '
'(null, null, and the empty list, respectively).'
'(null, null, and the empty list, respectively).'
,
),
assert
(
builder
!=
null
||
...
...
@@ -251,7 +251,7 @@ class WidgetsApp extends StatefulWidget {
pageRouteBuilder
!=
null
,
'If neither builder nor onGenerateRoute are provided, the '
'pageRouteBuilder must be specified so that the default handler '
'will know what kind of PageRoute transition to build.'
'will know what kind of PageRoute transition to build.'
,
),
assert
(
title
!=
null
),
assert
(
color
!=
null
),
...
...
@@ -298,7 +298,7 @@ class WidgetsApp extends StatefulWidget {
})
:
assert
(
routeInformationParser
!=
null
&&
routerDelegate
!=
null
,
'The routeInformationParser and routerDelegate cannot be null.'
'The routeInformationParser and routerDelegate cannot be null.'
,
),
assert
(
title
!=
null
),
assert
(
color
!=
null
),
...
...
packages/flutter/lib/src/widgets/basic.dart
View file @
671926db
...
...
@@ -5990,7 +5990,7 @@ class RawImage extends LeafRenderObjectWidget {
assert
(
image
?.
debugGetOpenHandleStackTraces
()?.
isNotEmpty
??
true
,
'Creator of a RawImage disposed of the image when the RawImage still '
'needed it.'
'needed it.'
,
);
return
RenderImage
(
image:
image
?.
clone
(),
...
...
@@ -6017,7 +6017,7 @@ class RawImage extends LeafRenderObjectWidget {
assert
(
image
?.
debugGetOpenHandleStackTraces
()?.
isNotEmpty
??
true
,
'Creator of a RawImage disposed of the image when the RawImage still '
'needed it.'
'needed it.'
,
);
renderObject
..
image
=
image
?.
clone
()
...
...
packages/flutter/lib/src/widgets/container.dart
View file @
671926db
...
...
@@ -273,7 +273,7 @@ class Container extends StatelessWidget {
assert
(
decoration
!=
null
||
clipBehavior
==
Clip
.
none
),
assert
(
color
==
null
||
decoration
==
null
,
'Cannot provide both a color and a decoration
\n
'
'To provide both, use "decoration: BoxDecoration(color: color)".'
'To provide both, use "decoration: BoxDecoration(color: color)".'
,
),
constraints
=
(
width
!=
null
||
height
!=
null
)
...
...
packages/flutter/lib/src/widgets/focus_manager.dart
View file @
671926db
...
...
@@ -729,10 +729,11 @@ class FocusNode with DiagnosticableTreeMixin, ChangeNotifier {
/// Offset is the offset of the transformed widget in global coordinates.
Offset
get
offset
{
assert
(
context
!=
null
,
"Tried to get the offset of a focus node that didn't have its context set yet.
\n
"
'The context needs to be set before trying to evaluate traversal policies. '
'Setting the context is typically done with the attach method.'
);
context
!=
null
,
"Tried to get the offset of a focus node that didn't have its context set yet.
\n
"
'The context needs to be set before trying to evaluate traversal policies. '
'Setting the context is typically done with the attach method.'
,
);
final
RenderObject
object
=
context
!.
findRenderObject
()!;
return
MatrixUtils
.
transformPoint
(
object
.
getTransformTo
(
null
),
object
.
semanticBounds
.
topLeft
);
}
...
...
@@ -743,10 +744,11 @@ class FocusNode with DiagnosticableTreeMixin, ChangeNotifier {
/// Rect is the rectangle of the transformed widget in global coordinates.
Rect
get
rect
{
assert
(
context
!=
null
,
"Tried to get the bounds of a focus node that didn't have its context set yet.
\n
"
'The context needs to be set before trying to evaluate traversal policies. '
'Setting the context is typically done with the attach method.'
);
context
!=
null
,
"Tried to get the bounds of a focus node that didn't have its context set yet.
\n
"
'The context needs to be set before trying to evaluate traversal policies. '
'Setting the context is typically done with the attach method.'
,
);
final
RenderObject
object
=
context
!.
findRenderObject
()!;
final
Offset
topLeft
=
MatrixUtils
.
transformPoint
(
object
.
getTransformTo
(
null
),
object
.
semanticBounds
.
topLeft
);
final
Offset
bottomRight
=
MatrixUtils
.
transformPoint
(
object
.
getTransformTo
(
null
),
object
.
semanticBounds
.
bottomRight
);
...
...
packages/flutter/lib/src/widgets/focus_traversal.dart
View file @
671926db
...
...
@@ -352,7 +352,7 @@ abstract class FocusTraversalPolicy with Diagnosticable {
assert
(
sortedDescendants
.
length
<=
scope
.
traversalDescendants
.
length
&&
sortedDescendants
.
toSet
().
difference
(
scope
.
traversalDescendants
.
toSet
()).
isEmpty
,
'Sorted descendants contains different nodes than FocusScopeNode.traversalDescendants would. '
'These are the different nodes:
${sortedDescendants.toSet().difference(scope.traversalDescendants.toSet())}
'
'These are the different nodes:
${sortedDescendants.toSet().difference(scope.traversalDescendants.toSet())}
'
,
);
return
sortedDescendants
;
}
...
...
@@ -1161,9 +1161,10 @@ abstract class FocusOrder with Diagnosticable implements Comparable<FocusOrder>
@nonVirtual
int
compareTo
(
FocusOrder
other
)
{
assert
(
runtimeType
==
other
.
runtimeType
,
"The sorting algorithm must not compare incomparable keys, since they don't "
'know how to order themselves relative to each other. Comparing
$this
with
$other
'
);
runtimeType
==
other
.
runtimeType
,
"The sorting algorithm must not compare incomparable keys, since they don't "
'know how to order themselves relative to each other. Comparing
$this
with
$other
'
,
);
return
doCompare
(
other
);
}
...
...
packages/flutter/lib/src/widgets/form.dart
View file @
671926db
...
...
@@ -90,7 +90,7 @@ class Form extends StatefulWidget {
assert
(
autovalidate
==
false
||
autovalidate
==
true
&&
autovalidateMode
==
null
,
'autovalidate and autovalidateMode should not be used together.'
'autovalidate and autovalidateMode should not be used together.'
,
),
autovalidateMode
=
autovalidateMode
??
(
autovalidate
?
AutovalidateMode
.
always
:
AutovalidateMode
.
disabled
),
...
...
@@ -335,7 +335,7 @@ class FormField<T> extends StatefulWidget {
assert
(
autovalidate
==
false
||
autovalidate
==
true
&&
autovalidateMode
==
null
,
'autovalidate and autovalidateMode should not be used together.'
'autovalidate and autovalidateMode should not be used together.'
,
),
autovalidateMode
=
autovalidateMode
??
(
autovalidate
?
AutovalidateMode
.
always
:
AutovalidateMode
.
disabled
),
...
...
packages/flutter/lib/src/widgets/heroes.dart
View file @
671926db
...
...
@@ -437,7 +437,7 @@ class _HeroState extends State<Hero> {
Widget
build
(
BuildContext
context
)
{
assert
(
context
.
findAncestorWidgetOfExactType
<
Hero
>()
==
null
,
'A Hero widget cannot be the descendant of another Hero widget.'
'A Hero widget cannot be the descendant of another Hero widget.'
,
);
final
bool
showPlaceholder
=
_placeholderSize
!=
null
;
...
...
packages/flutter/lib/src/widgets/implicit_animations.dart
View file @
671926db
...
...
@@ -646,7 +646,7 @@ class AnimatedContainer extends ImplicitlyAnimatedWidget {
assert
(
constraints
==
null
||
constraints
.
debugAssertIsValid
()),
assert
(
color
==
null
||
decoration
==
null
,
'Cannot provide both a color and a decoration
\n
'
'The color argument is just a shorthand for "decoration: BoxDecoration(color: color)".'
'The color argument is just a shorthand for "decoration: BoxDecoration(color: color)".'
,
),
decoration
=
decoration
??
(
color
!=
null
?
BoxDecoration
(
color:
color
)
:
null
),
constraints
=
...
...
packages/flutter/lib/src/widgets/list_wheel_scroll_view.dart
View file @
671926db
...
...
@@ -372,7 +372,7 @@ class _FixedExtentScrollPosition extends ScrollPositionWithSingleContext impleme
String
?
debugLabel
,
})
:
assert
(
context
is
_FixedExtentScrollableState
,
'FixedExtentScrollController can only be used with ListWheelScrollViews'
'FixedExtentScrollController can only be used with ListWheelScrollViews'
,
),
super
(
physics:
physics
,
...
...
@@ -480,7 +480,7 @@ class FixedExtentScrollPhysics extends ScrollPhysics {
assert
(
position
is
_FixedExtentScrollPosition
,
'FixedExtentScrollPhysics can only be used with Scrollables that uses '
'the FixedExtentScrollController'
'the FixedExtentScrollController'
,
);
final
_FixedExtentScrollPosition
metrics
=
position
as
_FixedExtentScrollPosition
;
...
...
packages/flutter/lib/src/widgets/navigator.dart
View file @
671926db
...
...
@@ -878,7 +878,7 @@ abstract class TransitionDelegate<T> {
indexOfNextRouteInNewHistory
==
newPageRouteHistory
.
length
&&
exitingPageRoutes
.
isEmpty
,
'The merged result from the
$runtimeType
.resolve does not include all '
'required routes. Do you remember to merge all exiting routes?'
'required routes. Do you remember to merge all exiting routes?'
,
);
return
true
;
}());
...
...
@@ -2941,7 +2941,7 @@ class _RouteEntry extends RouteTransitionRecord {
initialState
==
_RouteLifecycle
.
add
||
initialState
==
_RouteLifecycle
.
push
||
initialState
==
_RouteLifecycle
.
pushReplace
||
initialState
==
_RouteLifecycle
.
replace
initialState
==
_RouteLifecycle
.
replace
,
),
currentState
=
initialState
;
...
...
@@ -3095,7 +3095,7 @@ class _RouteEntry extends RouteTransitionRecord {
assert
(
!
hasPage
||
isWaitingForExitingDecision
,
'A page-based route cannot be completed using imperative api, provide a '
'new list without the corresponding Page to Navigator.pages instead. '
'new list without the corresponding Page to Navigator.pages instead. '
,
);
if
(
currentState
.
index
>=
_RouteLifecycle
.
remove
.
index
)
return
;
...
...
@@ -3109,7 +3109,7 @@ class _RouteEntry extends RouteTransitionRecord {
assert
(
!
hasPage
||
isWaitingForExitingDecision
,
'A page-based route cannot be completed using imperative api, provide a '
'new list without the corresponding Page to Navigator.pages instead. '
'new list without the corresponding Page to Navigator.pages instead. '
,
);
if
(
currentState
.
index
>=
_RouteLifecycle
.
remove
.
index
)
return
;
...
...
@@ -3214,7 +3214,7 @@ class _RouteEntry extends RouteTransitionRecord {
assert
(
isWaitingForEnteringDecision
&&
!
isWaitingForExitingDecision
,
'This route cannot be marked for push. Either a decision has already been '
'made or it does not require an explicit decision on how to transition in.'
'made or it does not require an explicit decision on how to transition in.'
,
);
currentState
=
_RouteLifecycle
.
push
;
}
...
...
@@ -3224,7 +3224,7 @@ class _RouteEntry extends RouteTransitionRecord {
assert
(
isWaitingForEnteringDecision
&&
!
isWaitingForExitingDecision
,
'This route cannot be marked for add. Either a decision has already been '
'made or it does not require an explicit decision on how to transition in.'
'made or it does not require an explicit decision on how to transition in.'
,
);
currentState
=
_RouteLifecycle
.
add
;
}
...
...
@@ -3234,7 +3234,7 @@ class _RouteEntry extends RouteTransitionRecord {
assert
(
!
isWaitingForEnteringDecision
&&
isWaitingForExitingDecision
&&
isPresent
,
'This route cannot be marked for pop. Either a decision has already been '
'made or it does not require an explicit decision on how to transition out.'
'made or it does not require an explicit decision on how to transition out.'
,
);
pop
<
dynamic
>(
result
);
_isWaitingForExitingDecision
=
false
;
...
...
@@ -3246,7 +3246,7 @@ class _RouteEntry extends RouteTransitionRecord {
!
isWaitingForEnteringDecision
&&
isWaitingForExitingDecision
&&
isPresent
,
'This route cannot be marked for complete. Either a decision has already '
'been made or it does not require an explicit decision on how to transition '
'out.'
'out.'
,
);
complete
<
dynamic
>(
result
);
_isWaitingForExitingDecision
=
false
;
...
...
@@ -3258,7 +3258,7 @@ class _RouteEntry extends RouteTransitionRecord {
!
isWaitingForEnteringDecision
&&
isWaitingForExitingDecision
&&
isPresent
,
'This route cannot be marked for remove. Either a decision has already '
'been made or it does not require an explicit decision on how to transition '
'out.'
'out.'
,
);
remove
();
_isWaitingForExitingDecision
=
false
;
...
...
@@ -3422,7 +3422,7 @@ class NavigatorState extends State<Navigator> with TickerProviderStateMixin, Res
assert
(
entry
.
route
.
settings
==
page
,
'The settings getter of a page-based Route must return a Page object. '
'Please set the settings to the Page in the Page.createRoute method.'
'Please set the settings to the Page in the Page.createRoute method.'
,
);
_history
.
add
(
entry
);
_history
.
addAll
(
_serializableHistory
.
restoreEntriesForPage
(
entry
,
this
));
...
...
@@ -3768,7 +3768,7 @@ class NavigatorState extends State<Navigator> with TickerProviderStateMixin, Res
oldEntriesBottomToScan
+=
1
;
assert
(
oldEntry
!=
null
&&
oldEntry
.
currentState
!=
_RouteLifecycle
.
disposed
oldEntry
.
currentState
!=
_RouteLifecycle
.
disposed
,
);
// Pageless routes will be recorded when we update the middle of the old
// list.
...
...
@@ -3805,7 +3805,7 @@ class NavigatorState extends State<Navigator> with TickerProviderStateMixin, Res
assert
(
newEntry
.
route
.
settings
==
nextPage
,
'The settings getter of a page-based Route must return a Page object. '
'Please set the settings to the Page in the Page.createRoute method.'
'Please set the settings to the Page in the Page.createRoute method.'
,
);
newHistory
.
add
(
newEntry
);
}
else
{
...
...
packages/flutter/lib/src/widgets/overlay.dart
View file @
671926db
...
...
@@ -364,11 +364,11 @@ class OverlayState extends State<Overlay> with TickerProviderStateMixin {
assert
(
_debugVerifyInsertPosition
(
above
,
below
));
assert
(
entries
.
every
((
OverlayEntry
entry
)
=>
!
_entries
.
contains
(
entry
)),
'One or more of the specified entries are already present in the Overlay.'
'One or more of the specified entries are already present in the Overlay.'
,
);
assert
(
entries
.
every
((
OverlayEntry
entry
)
=>
entry
.
_overlay
==
null
),
'One or more of the specified entries are already present in another Overlay.'
'One or more of the specified entries are already present in another Overlay.'
,
);
if
(
entries
.
isEmpty
)
return
;
...
...
@@ -419,11 +419,11 @@ class OverlayState extends State<Overlay> with TickerProviderStateMixin {
assert
(
_debugVerifyInsertPosition
(
above
,
below
,
newEntries:
newEntriesList
));
assert
(
newEntriesList
.
every
((
OverlayEntry
entry
)
=>
entry
.
_overlay
==
null
||
entry
.
_overlay
==
this
),
'One or more of the specified entries are already present in another Overlay.'
'One or more of the specified entries are already present in another Overlay.'
,
);
assert
(
newEntriesList
.
every
((
OverlayEntry
entry
)
=>
_entries
.
indexOf
(
entry
)
==
_entries
.
lastIndexOf
(
entry
)),
'One or more of the specified entries are specified multiple times.'
'One or more of the specified entries are specified multiple times.'
,
);
if
(
newEntriesList
.
isEmpty
)
return
;
...
...
packages/flutter/lib/src/widgets/restoration.dart
View file @
671926db
...
...
@@ -842,7 +842,7 @@ mixin RestorationMixin<S extends StatefulWidget> on State<S> {
'Property is already registered under
${property._restorationId}
.'
,
);
assert
(
_debugDoingRestore
||
!
_properties
.
keys
.
map
((
RestorableProperty
<
Object
?>
r
)
=>
r
.
_restorationId
).
contains
(
restorationId
),
'"
$restorationId
" is already registered to another property.'
'"
$restorationId
" is already registered to another property.'
,
);
final
bool
hasSerializedValue
=
bucket
?.
contains
(
restorationId
)
==
true
;
final
Object
?
initialValue
=
hasSerializedValue
...
...
@@ -863,7 +863,7 @@ mixin RestorationMixin<S extends StatefulWidget> on State<S> {
assert
(
property
.
_restorationId
==
restorationId
&&
property
.
_owner
==
this
&&
_properties
.
containsKey
(
property
)
_properties
.
containsKey
(
property
)
,
);
property
.
initWithValue
(
initialValue
);
...
...
packages/flutter/lib/src/widgets/router.dart
View file @
671926db
...
...
@@ -247,7 +247,7 @@ class Router<T> extends StatefulWidget {
(
routeInformationProvider
==
null
)
==
(
routeInformationParser
==
null
),
'Both routeInformationProvider and routeInformationParser must be provided '
'if this router parses route information. Otherwise, they should both '
'be null.'
'be null.'
,
),
assert
(
routerDelegate
!=
null
),
super
(
key:
key
);
...
...
packages/flutter/lib/src/widgets/scroll_activity.dart
View file @
671926db
...
...
@@ -240,7 +240,7 @@ class ScrollDragController implements Drag {
assert
(
details
!=
null
),
assert
(
motionStartDistanceThreshold
==
null
||
motionStartDistanceThreshold
>
0.0
,
'motionStartDistanceThreshold must be a positive number or null'
'motionStartDistanceThreshold must be a positive number or null'
,
),
_delegate
=
delegate
,
_lastDetails
=
details
,
...
...
packages/flutter/lib/src/widgets/scroll_view.dart
View file @
671926db
...
...
@@ -99,7 +99,7 @@ abstract class ScrollView extends StatelessWidget {
assert
(
clipBehavior
!=
null
),
assert
(!(
controller
!=
null
&&
primary
==
true
),
'Primary ScrollViews obtain their ScrollController via inheritance from a PrimaryScrollController widget. '
'You cannot both set primary to true and pass an explicit controller.'
'You cannot both set primary to true and pass an explicit controller.'
,
),
assert
(!
shrinkWrap
||
center
==
null
),
assert
(
anchor
!=
null
),
...
...
packages/flutter/lib/src/widgets/single_child_scroll_view.dart
View file @
671926db
...
...
@@ -232,7 +232,7 @@ class SingleChildScrollView extends StatelessWidget {
assert
(
clipBehavior
!=
null
),
assert
(!(
controller
!=
null
&&
primary
==
true
),
'Primary ScrollViews obtain their ScrollController via inheritance from a PrimaryScrollController widget. '
'You cannot both set primary to true and pass an explicit controller.'
'You cannot both set primary to true and pass an explicit controller.'
,
),
primary
=
primary
??
controller
==
null
&&
identical
(
scrollDirection
,
Axis
.
vertical
),
super
(
key:
key
);
...
...
packages/flutter/lib/src/widgets/sliver.dart
View file @
671926db
...
...
@@ -722,7 +722,7 @@ class SliverChildListDelegate extends SliverChildDelegate {
final
Key
?
key
=
child
.
key
!=
null
?
_SaltedValueKey
(
child
.
key
!)
:
null
;
assert
(
child
!=
null
,
"The sliver's children must not contain null values, but a null value was found at index
$index
"
"The sliver's children must not contain null values, but a null value was found at index
$index
"
,
);
if
(
addRepaintBoundaries
)
child
=
RepaintBoundary
(
child:
child
);
...
...
packages/flutter/lib/src/widgets/visibility.dart
View file @
671926db
...
...
@@ -70,7 +70,7 @@ class Visibility extends StatelessWidget {
assert
(
maintainSize
!=
null
),
assert
(
maintainState
==
true
||
maintainAnimation
==
false
,
'Cannot maintain animations if the state is not also maintained.'
'Cannot maintain animations if the state is not also maintained.'
,
),
assert
(
maintainAnimation
==
true
||
maintainSize
==
false
,
...
...
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