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
bd69fa59
Unverified
Commit
bd69fa59
authored
Jan 26, 2021
by
Alexandre Ardhuin
Committed by
GitHub
Jan 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use predefined constants (#74627)
parent
efe8a397
Changes
25
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
33 additions
and
37 deletions
+33
-37
route.dart
packages/flutter/lib/src/cupertino/route.dart
+1
-1
text_selection_toolbar.dart
...ges/flutter/lib/src/cupertino/text_selection_toolbar.dart
+1
-1
autocomplete.dart
packages/flutter/lib/src/material/autocomplete.dart
+1
-1
button.dart
packages/flutter/lib/src/material/button.dart
+1
-1
date_picker.dart
packages/flutter/lib/src/material/date_picker.dart
+2
-2
dialog.dart
packages/flutter/lib/src/material/dialog.dart
+1
-1
input_decorator.dart
packages/flutter/lib/src/material/input_decorator.dart
+2
-2
list_tile.dart
packages/flutter/lib/src/material/list_tile.dart
+1
-1
reorderable_list.dart
packages/flutter/lib/src/material/reorderable_list.dart
+1
-1
tooltip.dart
packages/flutter/lib/src/material/tooltip.dart
+1
-1
box.dart
packages/flutter/lib/src/rendering/box.dart
+1
-1
debug_overflow_indicator.dart
...s/flutter/lib/src/rendering/debug_overflow_indicator.dart
+1
-1
editable.dart
packages/flutter/lib/src/rendering/editable.dart
+3
-3
flex.dart
packages/flutter/lib/src/rendering/flex.dart
+2
-2
paragraph.dart
packages/flutter/lib/src/rendering/paragraph.dart
+1
-1
proxy_box.dart
packages/flutter/lib/src/rendering/proxy_box.dart
+2
-2
proxy_sliver.dart
packages/flutter/lib/src/rendering/proxy_sliver.dart
+1
-5
shifted_box.dart
packages/flutter/lib/src/rendering/shifted_box.dart
+1
-1
table.dart
packages/flutter/lib/src/rendering/table.dart
+3
-3
text_input.dart
packages/flutter/lib/src/services/text_input.dart
+1
-1
animated_list.dart
packages/flutter/lib/src/widgets/animated_list.dart
+1
-1
layout_builder.dart
packages/flutter/lib/src/widgets/layout_builder.dart
+1
-1
nested_scroll_view.dart
packages/flutter/lib/src/widgets/nested_scroll_view.dart
+1
-1
reorderable_list.dart
packages/flutter/lib/src/widgets/reorderable_list.dart
+1
-1
widget_inspector.dart
packages/flutter/lib/src/widgets/widget_inspector.dart
+1
-1
No files found.
packages/flutter/lib/src/cupertino/route.dart
View file @
bd69fa59
...
@@ -982,7 +982,7 @@ class _CupertinoModalPopupRoute<T> extends PopupRoute<T> {
...
@@ -982,7 +982,7 @@ class _CupertinoModalPopupRoute<T> extends PopupRoute<T> {
);
);
_offsetTween
=
Tween
<
Offset
>(
_offsetTween
=
Tween
<
Offset
>(
begin:
const
Offset
(
0.0
,
1.0
),
begin:
const
Offset
(
0.0
,
1.0
),
end:
const
Offset
(
0.0
,
0.0
)
,
end:
Offset
.
zero
,
);
);
return
_animation
!;
return
_animation
!;
}
}
...
...
packages/flutter/lib/src/cupertino/text_selection_toolbar.dart
View file @
bd69fa59
...
@@ -311,7 +311,7 @@ class _RenderCupertinoTextSelectionToolbarShape extends RenderShiftedBox {
...
@@ -311,7 +311,7 @@ class _RenderCupertinoTextSelectionToolbarShape extends RenderShiftedBox {
_debugPaint
??=
Paint
()
_debugPaint
??=
Paint
()
..
shader
=
ui
.
Gradient
.
linear
(
..
shader
=
ui
.
Gradient
.
linear
(
const
Offset
(
0.0
,
0.0
)
,
Offset
.
zero
,
const
Offset
(
10.0
,
10.0
),
const
Offset
(
10.0
,
10.0
),
const
<
Color
>[
Color
(
0x00000000
),
Color
(
0xFFFF00FF
),
Color
(
0xFFFF00FF
),
Color
(
0x00000000
)],
const
<
Color
>[
Color
(
0x00000000
),
Color
(
0xFFFF00FF
),
Color
(
0xFFFF00FF
),
Color
(
0x00000000
)],
const
<
double
>[
0.25
,
0.25
,
0.75
,
0.75
],
const
<
double
>[
0.25
,
0.25
,
0.75
,
0.75
],
...
...
packages/flutter/lib/src/material/autocomplete.dart
View file @
bd69fa59
...
@@ -231,7 +231,7 @@ class _AutocompleteOptions<T extends Object> extends StatelessWidget {
...
@@ -231,7 +231,7 @@ class _AutocompleteOptions<T extends Object> extends StatelessWidget {
child:
Container
(
child:
Container
(
height:
200.0
,
height:
200.0
,
child:
ListView
.
builder
(
child:
ListView
.
builder
(
padding:
const
EdgeInsets
.
all
(
0.0
)
,
padding:
EdgeInsets
.
zero
,
itemCount:
options
.
length
,
itemCount:
options
.
length
,
itemBuilder:
(
BuildContext
context
,
int
index
)
{
itemBuilder:
(
BuildContext
context
,
int
index
)
{
final
T
option
=
options
.
elementAt
(
index
);
final
T
option
=
options
.
elementAt
(
index
);
...
...
packages/flutter/lib/src/material/button.dart
View file @
bd69fa59
...
@@ -66,7 +66,7 @@ class RawMaterialButton extends StatefulWidget {
...
@@ -66,7 +66,7 @@ class RawMaterialButton extends StatefulWidget {
this
.
highlightElevation
=
8.0
,
this
.
highlightElevation
=
8.0
,
this
.
disabledElevation
=
0.0
,
this
.
disabledElevation
=
0.0
,
this
.
padding
=
EdgeInsets
.
zero
,
this
.
padding
=
EdgeInsets
.
zero
,
this
.
visualDensity
=
const
VisualDensity
()
,
this
.
visualDensity
=
VisualDensity
.
standard
,
this
.
constraints
=
const
BoxConstraints
(
minWidth:
88.0
,
minHeight:
36.0
),
this
.
constraints
=
const
BoxConstraints
(
minWidth:
88.0
,
minHeight:
36.0
),
this
.
shape
=
const
RoundedRectangleBorder
(),
this
.
shape
=
const
RoundedRectangleBorder
(),
this
.
animationDuration
=
kThemeChangeDuration
,
this
.
animationDuration
=
kThemeChangeDuration
,
...
...
packages/flutter/lib/src/material/date_picker.dart
View file @
bd69fa59
...
@@ -1053,9 +1053,9 @@ class _DateRangePickerDialogState extends State<_DateRangePickerDialog> {
...
@@ -1053,9 +1053,9 @@ class _DateRangePickerDialogState extends State<_DateRangePickerDialog> {
helpText:
widget
.
helpText
??
localizations
.
dateRangePickerHelpText
,
helpText:
widget
.
helpText
??
localizations
.
dateRangePickerHelpText
,
);
);
size
=
mediaQuery
.
size
;
size
=
mediaQuery
.
size
;
insetPadding
=
const
EdgeInsets
.
all
(
0.0
)
;
insetPadding
=
EdgeInsets
.
zero
;
shape
=
const
RoundedRectangleBorder
(
shape
=
const
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
all
(
Radius
.
zero
)
borderRadius:
BorderRadius
.
zero
);
);
elevation
=
0
;
elevation
=
0
;
break
;
break
;
...
...
packages/flutter/lib/src/material/dialog.dart
View file @
bd69fa59
...
@@ -128,7 +128,7 @@ class Dialog extends StatelessWidget {
...
@@ -128,7 +128,7 @@ class Dialog extends StatelessWidget {
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
final
DialogTheme
dialogTheme
=
DialogTheme
.
of
(
context
);
final
DialogTheme
dialogTheme
=
DialogTheme
.
of
(
context
);
final
EdgeInsets
effectivePadding
=
MediaQuery
.
of
(
context
).
viewInsets
+
(
insetPadding
??
const
EdgeInsets
.
all
(
0.0
)
);
final
EdgeInsets
effectivePadding
=
MediaQuery
.
of
(
context
).
viewInsets
+
(
insetPadding
??
EdgeInsets
.
zero
);
return
AnimatedPadding
(
return
AnimatedPadding
(
padding:
effectivePadding
,
padding:
effectivePadding
,
duration:
insetAnimationDuration
,
duration:
insetAnimationDuration
,
...
...
packages/flutter/lib/src/material/input_decorator.dart
View file @
bd69fa59
...
@@ -396,7 +396,7 @@ class _HelperErrorState extends State<_HelperError> with SingleTickerProviderSta
...
@@ -396,7 +396,7 @@ class _HelperErrorState extends State<_HelperError> with SingleTickerProviderSta
child:
FractionalTranslation
(
child:
FractionalTranslation
(
translation:
Tween
<
Offset
>(
translation:
Tween
<
Offset
>(
begin:
const
Offset
(
0.0
,
-
0.25
),
begin:
const
Offset
(
0.0
,
-
0.25
),
end:
const
Offset
(
0.0
,
0.0
)
,
end:
Offset
.
zero
,
).
evaluate
(
_controller
.
view
),
).
evaluate
(
_controller
.
view
),
child:
Text
(
child:
Text
(
widget
.
errorText
!,
widget
.
errorText
!,
...
@@ -1284,7 +1284,7 @@ class _RenderDecoration extends RenderBox {
...
@@ -1284,7 +1284,7 @@ class _RenderDecoration extends RenderBox {
assert
(
debugCannotComputeDryLayout
(
assert
(
debugCannotComputeDryLayout
(
reason:
'Layout requires baseline metrics, which are only available after a full layout.'
,
reason:
'Layout requires baseline metrics, which are only available after a full layout.'
,
));
));
return
const
Size
(
0
,
0
)
;
return
Size
.
zero
;
}
}
@override
@override
...
...
packages/flutter/lib/src/material/list_tile.dart
View file @
bd69fa59
...
@@ -1691,7 +1691,7 @@ class _RenderListTile extends RenderBox {
...
@@ -1691,7 +1691,7 @@ class _RenderListTile extends RenderBox {
assert
(
debugCannotComputeDryLayout
(
assert
(
debugCannotComputeDryLayout
(
reason:
'Layout requires baseline metrics, which are only available after a full layout.'
reason:
'Layout requires baseline metrics, which are only available after a full layout.'
));
));
return
const
Size
(
0
,
0
)
;
return
Size
.
zero
;
}
}
// All of the dimensions below were taken from the Material Design spec:
// All of the dimensions below were taken from the Material Design spec:
...
...
packages/flutter/lib/src/material/reorderable_list.dart
View file @
bd69fa59
...
@@ -419,7 +419,7 @@ class _ReorderableListContentState extends State<_ReorderableListContent> {
...
@@ -419,7 +419,7 @@ class _ReorderableListContentState extends State<_ReorderableListContent> {
// so we wrap the CustomScrollView in the padding for the top, left and right
// so we wrap the CustomScrollView in the padding for the top, left and right
// and only add the padding from the bottom to the sliver list (or the equivalent
// and only add the padding from the bottom to the sliver list (or the equivalent
// for other axis directions).
// for other axis directions).
final
EdgeInsets
padding
=
widget
.
padding
??
const
EdgeInsets
.
all
(
0
)
;
final
EdgeInsets
padding
=
widget
.
padding
??
EdgeInsets
.
zero
;
late
EdgeInsets
outerPadding
;
late
EdgeInsets
outerPadding
;
late
EdgeInsets
listPadding
;
late
EdgeInsets
listPadding
;
switch
(
widget
.
scrollDirection
)
{
switch
(
widget
.
scrollDirection
)
{
...
...
packages/flutter/lib/src/material/tooltip.dart
View file @
bd69fa59
...
@@ -228,7 +228,7 @@ class _TooltipState extends State<Tooltip> with SingleTickerProviderStateMixin {
...
@@ -228,7 +228,7 @@ class _TooltipState extends State<Tooltip> with SingleTickerProviderStateMixin {
static
const
Duration
_fadeInDuration
=
Duration
(
milliseconds:
150
);
static
const
Duration
_fadeInDuration
=
Duration
(
milliseconds:
150
);
static
const
Duration
_fadeOutDuration
=
Duration
(
milliseconds:
75
);
static
const
Duration
_fadeOutDuration
=
Duration
(
milliseconds:
75
);
static
const
Duration
_defaultShowDuration
=
Duration
(
milliseconds:
1500
);
static
const
Duration
_defaultShowDuration
=
Duration
(
milliseconds:
1500
);
static
const
Duration
_defaultWaitDuration
=
Duration
(
milliseconds:
0
)
;
static
const
Duration
_defaultWaitDuration
=
Duration
.
zero
;
static
const
bool
_defaultExcludeFromSemantics
=
false
;
static
const
bool
_defaultExcludeFromSemantics
=
false
;
late
double
height
;
late
double
height
;
...
...
packages/flutter/lib/src/rendering/box.dart
View file @
bd69fa59
...
@@ -1884,7 +1884,7 @@ abstract class RenderBox extends RenderObject {
...
@@ -1884,7 +1884,7 @@ abstract class RenderBox extends RenderObject {
),
),
]),
]),
));
));
return
const
Size
(
0
,
0
)
;
return
Size
.
zero
;
}
}
static
bool
_dryLayoutCalculationValid
=
true
;
static
bool
_dryLayoutCalculationValid
=
true
;
...
...
packages/flutter/lib/src/rendering/debug_overflow_indicator.dart
View file @
bd69fa59
...
@@ -100,7 +100,7 @@ mixin DebugOverflowIndicatorMixin on RenderObject {
...
@@ -100,7 +100,7 @@ mixin DebugOverflowIndicatorMixin on RenderObject {
);
);
static
final
Paint
_indicatorPaint
=
Paint
()
static
final
Paint
_indicatorPaint
=
Paint
()
..
shader
=
ui
.
Gradient
.
linear
(
..
shader
=
ui
.
Gradient
.
linear
(
const
Offset
(
0.0
,
0.0
)
,
Offset
.
zero
,
const
Offset
(
10.0
,
10.0
),
const
Offset
(
10.0
,
10.0
),
<
Color
>[
_black
,
_yellow
,
_yellow
,
_black
],
<
Color
>[
_black
,
_yellow
,
_yellow
,
_black
],
<
double
>[
0.25
,
0.25
,
0.75
,
0.75
],
<
double
>[
0.25
,
0.25
,
0.75
,
0.75
],
...
...
packages/flutter/lib/src/rendering/editable.dart
View file @
bd69fa59
...
@@ -2193,7 +2193,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin {
...
@@ -2193,7 +2193,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin {
assert
(
boundedOffset
!=
null
);
assert
(
boundedOffset
!=
null
);
assert
(
lastTextPosition
!=
null
);
assert
(
lastTextPosition
!=
null
);
if
(
state
==
FloatingCursorDragState
.
Start
)
{
if
(
state
==
FloatingCursorDragState
.
Start
)
{
_relativeOrigin
=
const
Offset
(
0
,
0
)
;
_relativeOrigin
=
Offset
.
zero
;
_previousOffset
=
null
;
_previousOffset
=
null
;
_resetOriginOnBottom
=
false
;
_resetOriginOnBottom
=
false
;
_resetOriginOnTop
=
false
;
_resetOriginOnTop
=
false
;
...
@@ -2242,7 +2242,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin {
...
@@ -2242,7 +2242,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin {
// The relative origin in relation to the distance the user has theoretically
// The relative origin in relation to the distance the user has theoretically
// dragged the floating cursor offscreen. This value is used to account for the
// dragged the floating cursor offscreen. This value is used to account for the
// difference in the rendering position and the raw offset value.
// difference in the rendering position and the raw offset value.
Offset
_relativeOrigin
=
const
Offset
(
0
,
0
)
;
Offset
_relativeOrigin
=
Offset
.
zero
;
Offset
?
_previousOffset
;
Offset
?
_previousOffset
;
bool
_resetOriginOnLeft
=
false
;
bool
_resetOriginOnLeft
=
false
;
bool
_resetOriginOnRight
=
false
;
bool
_resetOriginOnRight
=
false
;
...
@@ -2252,7 +2252,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin {
...
@@ -2252,7 +2252,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin {
/// Returns the position within the text field closest to the raw cursor offset.
/// Returns the position within the text field closest to the raw cursor offset.
Offset
calculateBoundedFloatingCursorOffset
(
Offset
rawCursorOffset
)
{
Offset
calculateBoundedFloatingCursorOffset
(
Offset
rawCursorOffset
)
{
Offset
deltaPosition
=
const
Offset
(
0
,
0
)
;
Offset
deltaPosition
=
Offset
.
zero
;
final
double
topBound
=
-
floatingCursorAddedMargin
.
top
;
final
double
topBound
=
-
floatingCursorAddedMargin
.
top
;
final
double
bottomBound
=
_textPainter
.
height
-
preferredLineHeight
+
floatingCursorAddedMargin
.
bottom
;
final
double
bottomBound
=
_textPainter
.
height
-
preferredLineHeight
+
floatingCursorAddedMargin
.
bottom
;
final
double
leftBound
=
-
floatingCursorAddedMargin
.
left
;
final
double
leftBound
=
-
floatingCursorAddedMargin
.
left
;
...
...
packages/flutter/lib/src/rendering/flex.dart
View file @
bd69fa59
...
@@ -677,7 +677,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
...
@@ -677,7 +677,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
assert
(
debugCannotComputeDryLayout
(
assert
(
debugCannotComputeDryLayout
(
reason:
'Dry layout cannot be computed for CrossAxisAlignment.baseline, which requires a full layout.'
reason:
'Dry layout cannot be computed for CrossAxisAlignment.baseline, which requires a full layout.'
));
));
return
const
Size
(
0
,
0
)
;
return
Size
.
zero
;
}
}
FlutterError
?
constraintsError
;
FlutterError
?
constraintsError
;
assert
(()
{
assert
(()
{
...
@@ -689,7 +689,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
...
@@ -689,7 +689,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
}());
}());
if
(
constraintsError
!=
null
)
{
if
(
constraintsError
!=
null
)
{
assert
(
debugCannotComputeDryLayout
(
error:
constraintsError
));
assert
(
debugCannotComputeDryLayout
(
error:
constraintsError
));
return
const
Size
(
0
,
0
)
;
return
Size
.
zero
;
}
}
final
_LayoutSizes
sizes
=
_computeSizes
(
final
_LayoutSizes
sizes
=
_computeSizes
(
...
...
packages/flutter/lib/src/rendering/paragraph.dart
View file @
bd69fa59
...
@@ -637,7 +637,7 @@ class RenderParagraph extends RenderBox
...
@@ -637,7 +637,7 @@ class RenderParagraph extends RenderBox
assert
(
debugCannotComputeDryLayout
(
assert
(
debugCannotComputeDryLayout
(
reason:
'Dry layout not available for alignments that require baseline.'
,
reason:
'Dry layout not available for alignments that require baseline.'
,
));
));
return
const
Size
(
0
,
0
)
;
return
Size
.
zero
;
}
}
_textPainter
.
setPlaceholderDimensions
(
_layoutChildren
(
constraints
,
dry:
true
));
_textPainter
.
setPlaceholderDimensions
(
_layoutChildren
(
constraints
,
dry:
true
));
_layoutText
(
minWidth:
constraints
.
minWidth
,
maxWidth:
constraints
.
maxWidth
);
_layoutText
(
minWidth:
constraints
.
minWidth
,
maxWidth:
constraints
.
maxWidth
);
...
...
packages/flutter/lib/src/rendering/proxy_box.dart
View file @
bd69fa59
...
@@ -1389,7 +1389,7 @@ abstract class _RenderCustomClip<T> extends RenderProxyBox {
...
@@ -1389,7 +1389,7 @@ abstract class _RenderCustomClip<T> extends RenderProxyBox {
assert
(()
{
assert
(()
{
_debugPaint
??=
Paint
()
_debugPaint
??=
Paint
()
..
shader
=
ui
.
Gradient
.
linear
(
..
shader
=
ui
.
Gradient
.
linear
(
const
Offset
(
0.0
,
0.0
)
,
Offset
.
zero
,
const
Offset
(
10.0
,
10.0
),
const
Offset
(
10.0
,
10.0
),
<
Color
>[
const
Color
(
0x00000000
),
const
Color
(
0xFFFF00FF
),
const
Color
(
0xFFFF00FF
),
const
Color
(
0x00000000
)],
<
Color
>[
const
Color
(
0x00000000
),
const
Color
(
0xFFFF00FF
),
const
Color
(
0xFFFF00FF
),
const
Color
(
0x00000000
)],
<
double
>[
0.25
,
0.25
,
0.75
,
0.75
],
<
double
>[
0.25
,
0.25
,
0.75
,
0.75
],
...
@@ -2502,7 +2502,7 @@ class RenderFittedBox extends RenderProxyBox {
...
@@ -2502,7 +2502,7 @@ class RenderFittedBox extends RenderProxyBox {
assert
(
debugCannotComputeDryLayout
(
assert
(
debugCannotComputeDryLayout
(
reason:
'Child provided invalid size of
$childSize
.'
,
reason:
'Child provided invalid size of
$childSize
.'
,
));
));
return
const
Size
(
0
,
0
)
;
return
Size
.
zero
;
}
}
switch
(
fit
)
{
switch
(
fit
)
{
...
...
packages/flutter/lib/src/rendering/proxy_sliver.dart
View file @
bd69fa59
...
@@ -317,11 +317,7 @@ class RenderSliverOffstage extends RenderProxySliver {
...
@@ -317,11 +317,7 @@ class RenderSliverOffstage extends RenderProxySliver {
if
(!
offstage
)
if
(!
offstage
)
geometry
=
child
!.
geometry
;
geometry
=
child
!.
geometry
;
else
else
geometry
=
const
SliverGeometry
(
geometry
=
SliverGeometry
.
zero
;
scrollExtent:
0.0
,
visible:
false
,
maxPaintExtent:
0.0
,
);
}
}
@override
@override
...
...
packages/flutter/lib/src/rendering/shifted_box.dart
View file @
bd69fa59
...
@@ -1287,7 +1287,7 @@ class RenderBaseline extends RenderShiftedBox {
...
@@ -1287,7 +1287,7 @@ class RenderBaseline extends RenderShiftedBox {
assert
(
debugCannotComputeDryLayout
(
assert
(
debugCannotComputeDryLayout
(
reason:
'Baseline metrics are only available after a full layout.'
,
reason:
'Baseline metrics are only available after a full layout.'
,
));
));
return
const
Size
(
0
,
0
)
;
return
Size
.
zero
;
}
}
return
constraints
.
smallest
;
return
constraints
.
smallest
;
}
}
...
...
packages/flutter/lib/src/rendering/table.dart
View file @
bd69fa59
...
@@ -1002,7 +1002,7 @@ class RenderTable extends RenderBox {
...
@@ -1002,7 +1002,7 @@ class RenderTable extends RenderBox {
@override
@override
Size
computeDryLayout
(
BoxConstraints
constraints
)
{
Size
computeDryLayout
(
BoxConstraints
constraints
)
{
if
(
rows
*
columns
==
0
)
{
if
(
rows
*
columns
==
0
)
{
return
constraints
.
constrain
(
const
Size
(
0.0
,
0.0
)
);
return
constraints
.
constrain
(
Size
.
zero
);
}
}
final
List
<
double
>
widths
=
_computeColumnWidths
(
constraints
);
final
List
<
double
>
widths
=
_computeColumnWidths
(
constraints
);
final
double
tableWidth
=
widths
.
fold
(
0.0
,
(
double
a
,
double
b
)
=>
a
+
b
);
final
double
tableWidth
=
widths
.
fold
(
0.0
,
(
double
a
,
double
b
)
=>
a
+
b
);
...
@@ -1020,7 +1020,7 @@ class RenderTable extends RenderBox {
...
@@ -1020,7 +1020,7 @@ class RenderTable extends RenderBox {
assert
(
debugCannotComputeDryLayout
(
assert
(
debugCannotComputeDryLayout
(
reason:
'TableCellVerticalAlignment.baseline requires a full layout for baseline metrics to be available.'
reason:
'TableCellVerticalAlignment.baseline requires a full layout for baseline metrics to be available.'
));
));
return
const
Size
(
0
,
0
)
;
return
Size
.
zero
;
case
TableCellVerticalAlignment
.
top
:
case
TableCellVerticalAlignment
.
top
:
case
TableCellVerticalAlignment
.
middle
:
case
TableCellVerticalAlignment
.
middle
:
case
TableCellVerticalAlignment
.
bottom
:
case
TableCellVerticalAlignment
.
bottom
:
...
@@ -1046,7 +1046,7 @@ class RenderTable extends RenderBox {
...
@@ -1046,7 +1046,7 @@ class RenderTable extends RenderBox {
if
(
rows
*
columns
==
0
)
{
if
(
rows
*
columns
==
0
)
{
// TODO(ianh): if columns is zero, this should be zero width
// TODO(ianh): if columns is zero, this should be zero width
// TODO(ianh): if columns is not zero, this should be based on the column width specifications
// TODO(ianh): if columns is not zero, this should be based on the column width specifications
size
=
constraints
.
constrain
(
const
Size
(
0.0
,
0.0
)
);
size
=
constraints
.
constrain
(
Size
.
zero
);
return
;
return
;
}
}
final
List
<
double
>
widths
=
_computeColumnWidths
(
constraints
);
final
List
<
double
>
widths
=
_computeColumnWidths
(
constraints
);
...
...
packages/flutter/lib/src/services/text_input.dart
View file @
bd69fa59
...
@@ -1070,7 +1070,7 @@ RawFloatingCursorPoint _toTextPoint(FloatingCursorDragState state, Map<String, d
...
@@ -1070,7 +1070,7 @@ RawFloatingCursorPoint _toTextPoint(FloatingCursorDragState state, Map<String, d
assert
(
encoded
[
'Y'
]
!=
null
,
'You must provide a value for the vertical location of the floating cursor.'
);
assert
(
encoded
[
'Y'
]
!=
null
,
'You must provide a value for the vertical location of the floating cursor.'
);
final
Offset
offset
=
state
==
FloatingCursorDragState
.
Update
final
Offset
offset
=
state
==
FloatingCursorDragState
.
Update
?
Offset
(
encoded
[
'X'
]
as
double
,
encoded
[
'Y'
]
as
double
)
?
Offset
(
encoded
[
'X'
]
as
double
,
encoded
[
'Y'
]
as
double
)
:
const
Offset
(
0
,
0
)
;
:
Offset
.
zero
;
return
RawFloatingCursorPoint
(
offset:
offset
,
state:
state
);
return
RawFloatingCursorPoint
(
offset:
offset
,
state:
state
);
}
}
...
...
packages/flutter/lib/src/widgets/animated_list.dart
View file @
bd69fa59
...
@@ -495,7 +495,7 @@ class AnimatedListState extends State<AnimatedList> with TickerProviderStateMixi
...
@@ -495,7 +495,7 @@ class AnimatedListState extends State<AnimatedList> with TickerProviderStateMixi
shrinkWrap:
widget
.
shrinkWrap
,
shrinkWrap:
widget
.
shrinkWrap
,
slivers:
<
Widget
>[
slivers:
<
Widget
>[
SliverPadding
(
SliverPadding
(
padding:
widget
.
padding
??
const
EdgeInsets
.
all
(
0
)
,
padding:
widget
.
padding
??
EdgeInsets
.
zero
,
sliver:
SliverAnimatedList
(
sliver:
SliverAnimatedList
(
key:
_sliverAnimatedListKey
,
key:
_sliverAnimatedListKey
,
itemBuilder:
widget
.
itemBuilder
,
itemBuilder:
widget
.
itemBuilder
,
...
...
packages/flutter/lib/src/widgets/layout_builder.dart
View file @
bd69fa59
...
@@ -351,7 +351,7 @@ class _RenderLayoutBuilder extends RenderBox with RenderObjectWithChildMixin<Ren
...
@@ -351,7 +351,7 @@ class _RenderLayoutBuilder extends RenderBox with RenderObjectWithChildMixin<Ren
'Calculating the dry layout would require running the layout callback '
'Calculating the dry layout would require running the layout callback '
'speculatively, which might mutate the live render object tree.'
,
'speculatively, which might mutate the live render object tree.'
,
));
));
return
const
Size
(
0
,
0
)
;
return
Size
.
zero
;
}
}
@override
@override
...
...
packages/flutter/lib/src/widgets/nested_scroll_view.dart
View file @
bd69fa59
...
@@ -1895,7 +1895,7 @@ class RenderSliverOverlapAbsorber extends RenderSliver with RenderObjectWithChil
...
@@ -1895,7 +1895,7 @@ class RenderSliverOverlapAbsorber extends RenderSliver with RenderObjectWithChil
'A SliverOverlapAbsorberHandle cannot be passed to multiple RenderSliverOverlapAbsorber objects at the same time.'
,
'A SliverOverlapAbsorberHandle cannot be passed to multiple RenderSliverOverlapAbsorber objects at the same time.'
,
);
);
if
(
child
==
null
)
{
if
(
child
==
null
)
{
geometry
=
const
SliverGeometry
()
;
geometry
=
SliverGeometry
.
zero
;
return
;
return
;
}
}
child
!.
layout
(
constraints
,
parentUsesSize:
true
);
child
!.
layout
(
constraints
,
parentUsesSize:
true
);
...
...
packages/flutter/lib/src/widgets/reorderable_list.dart
View file @
bd69fa59
...
@@ -336,7 +336,7 @@ class ReorderableListState extends State<ReorderableList> {
...
@@ -336,7 +336,7 @@ class ReorderableListState extends State<ReorderableList> {
shrinkWrap:
widget
.
shrinkWrap
,
shrinkWrap:
widget
.
shrinkWrap
,
slivers:
<
Widget
>[
slivers:
<
Widget
>[
SliverPadding
(
SliverPadding
(
padding:
widget
.
padding
??
const
EdgeInsets
.
all
(
0
)
,
padding:
widget
.
padding
??
EdgeInsets
.
zero
,
sliver:
SliverReorderableList
(
sliver:
SliverReorderableList
(
key:
_sliverReorderableListKey
,
key:
_sliverReorderableListKey
,
itemBuilder:
widget
.
itemBuilder
,
itemBuilder:
widget
.
itemBuilder
,
...
...
packages/flutter/lib/src/widgets/widget_inspector.dart
View file @
bd69fa59
...
@@ -2492,7 +2492,7 @@ class _RenderInspectorOverlay extends RenderBox {
...
@@ -2492,7 +2492,7 @@ class _RenderInspectorOverlay extends RenderBox {
@override
@override
Size
computeDryLayout
(
BoxConstraints
constraints
)
{
Size
computeDryLayout
(
BoxConstraints
constraints
)
{
return
constraints
.
constrain
(
const
Size
(
double
.
infinity
,
double
.
infinity
)
);
return
constraints
.
constrain
(
Size
.
infinite
);
}
}
@override
@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