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
323ffe12
Unverified
Commit
323ffe12
authored
Jun 12, 2021
by
Alexandre Ardhuin
Committed by
GitHub
Jun 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix indentation issues (#84374)
parent
62633210
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
106 additions
and
103 deletions
+106
-103
curves.dart
packages/flutter/lib/src/animation/curves.dart
+9
-9
collections.dart
packages/flutter/lib/src/foundation/collections.dart
+7
-7
binding.dart
packages/flutter/lib/src/gestures/binding.dart
+2
-2
resampler.dart
packages/flutter/lib/src/gestures/resampler.dart
+5
-5
about.dart
packages/flutter/lib/src/material/about.dart
+18
-18
chip.dart
packages/flutter/lib/src/material/chip.dart
+1
-1
ink_well.dart
packages/flutter/lib/src/material/ink_well.dart
+1
-1
input_decorator.dart
packages/flutter/lib/src/material/input_decorator.dart
+1
-1
range_slider.dart
packages/flutter/lib/src/material/range_slider.dart
+10
-10
scrollbar_theme.dart
packages/flutter/lib/src/material/scrollbar_theme.dart
+1
-1
slider_theme.dart
packages/flutter/lib/src/material/slider_theme.dart
+7
-7
binding.dart
packages/flutter/lib/src/painting/binding.dart
+2
-1
image_cache.dart
packages/flutter/lib/src/painting/image_cache.dart
+1
-1
box.dart
packages/flutter/lib/src/rendering/box.dart
+1
-1
layer.dart
packages/flutter/lib/src/rendering/layer.dart
+4
-2
sliver_persistent_header.dart
...s/flutter/lib/src/rendering/sliver_persistent_header.dart
+8
-7
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+1
-1
navigator.dart
packages/flutter/lib/src/widgets/navigator.dart
+16
-16
scroll_aware_image_provider.dart
.../flutter/lib/src/widgets/scroll_aware_image_provider.dart
+4
-4
scrollbar.dart
packages/flutter/lib/src/widgets/scrollbar.dart
+4
-4
shortcuts.dart
packages/flutter/lib/src/widgets/shortcuts.dart
+3
-4
No files found.
packages/flutter/lib/src/animation/curves.dart
View file @
323ffe12
...
@@ -745,11 +745,11 @@ class CatmullRomSpline extends Curve2D {
...
@@ -745,11 +745,11 @@ class CatmullRomSpline extends Curve2D {
static
List
<
List
<
Offset
>>
_computeSegments
(
static
List
<
List
<
Offset
>>
_computeSegments
(
List
<
Offset
>
controlPoints
,
List
<
Offset
>
controlPoints
,
double
tension
,
{
double
tension
,
{
Offset
?
startHandle
,
Offset
?
startHandle
,
Offset
?
endHandle
,
Offset
?
endHandle
,
})
{
})
{
// If not specified, select the first and last control points (which are
// If not specified, select the first and last control points (which are
// handles: they are not intersected by the resulting curve) so that they
// handles: they are not intersected by the resulting curve) so that they
// extend the first and last segments, respectively.
// extend the first and last segments, respectively.
...
@@ -989,10 +989,10 @@ class CatmullRomCurve extends Curve {
...
@@ -989,10 +989,10 @@ class CatmullRomCurve extends Curve {
/// In release mode, this function can be used to decide if a proposed
/// In release mode, this function can be used to decide if a proposed
/// modification to the curve will result in a valid curve.
/// modification to the curve will result in a valid curve.
static
bool
validateControlPoints
(
static
bool
validateControlPoints
(
List
<
Offset
>?
controlPoints
,
{
List
<
Offset
>?
controlPoints
,
{
double
tension
=
0.0
,
double
tension
=
0.0
,
List
<
String
>?
reasons
,
List
<
String
>?
reasons
,
})
{
})
{
assert
(
tension
!=
null
);
assert
(
tension
!=
null
);
if
(
controlPoints
==
null
)
{
if
(
controlPoints
==
null
)
{
assert
(()
{
assert
(()
{
...
...
packages/flutter/lib/src/foundation/collections.dart
View file @
323ffe12
...
@@ -269,13 +269,13 @@ void _movingInsertionSort<T>(
...
@@ -269,13 +269,13 @@ void _movingInsertionSort<T>(
/// Allows target to be the same list as `list`, as long as it's not overlapping
/// Allows target to be the same list as `list`, as long as it's not overlapping
/// the `start..end` range.
/// the `start..end` range.
void
_mergeSort
<
T
>(
void
_mergeSort
<
T
>(
List
<
T
>
list
,
List
<
T
>
list
,
int
Function
(
T
,
T
)
compare
,
int
Function
(
T
,
T
)
compare
,
int
start
,
int
start
,
int
end
,
int
end
,
List
<
T
>
target
,
List
<
T
>
target
,
int
targetOffset
,
int
targetOffset
,
)
{
)
{
final
int
length
=
end
-
start
;
final
int
length
=
end
-
start
;
if
(
length
<
_kMergeSortLimit
)
{
if
(
length
<
_kMergeSortLimit
)
{
_movingInsertionSort
<
T
>(
list
,
compare
,
start
,
end
,
target
,
targetOffset
);
_movingInsertionSort
<
T
>(
list
,
compare
,
start
,
end
,
target
,
targetOffset
);
...
...
packages/flutter/lib/src/gestures/binding.dart
View file @
323ffe12
...
@@ -108,7 +108,7 @@ class _Resampler {
...
@@ -108,7 +108,7 @@ class _Resampler {
// Schedule periodic resampling if `_timer` is not already active.
// Schedule periodic resampling if `_timer` is not already active.
if
(
_timer
?.
isActive
!=
true
)
{
if
(
_timer
?.
isActive
!=
true
)
{
_timer
=
Timer
.
periodic
(
_samplingInterval
,
(
_
)
=>
_onSampleTimeChanged
());
_timer
=
Timer
.
periodic
(
_samplingInterval
,
(
_
)
=>
_onSampleTimeChanged
());
}
}
// Calculate the effective frame time by taking the number
// Calculate the effective frame time by taking the number
...
@@ -185,7 +185,7 @@ class _Resampler {
...
@@ -185,7 +185,7 @@ class _Resampler {
assert
(()
{
assert
(()
{
if
(
debugPrintResamplingMargin
)
{
if
(
debugPrintResamplingMargin
)
{
final
Duration
resamplingMargin
=
_lastEventTime
-
_lastSampleTime
;
final
Duration
resamplingMargin
=
_lastEventTime
-
_lastSampleTime
;
debugPrint
(
'
$resamplingMargin
'
);
debugPrint
(
'
$resamplingMargin
'
);
}
}
return
true
;
return
true
;
}());
}());
...
...
packages/flutter/lib/src/gestures/resampler.dart
View file @
323ffe12
...
@@ -169,9 +169,9 @@ class PointerEventResampler {
...
@@ -169,9 +169,9 @@ class PointerEventResampler {
}
}
void
_dequeueAndSampleNonHoverOrMovePointerEventsUntil
(
void
_dequeueAndSampleNonHoverOrMovePointerEventsUntil
(
Duration
sampleTime
,
Duration
sampleTime
,
Duration
nextSampleTime
,
Duration
nextSampleTime
,
HandleEventCallback
callback
,
HandleEventCallback
callback
,
)
{
)
{
Duration
endTime
=
sampleTime
;
Duration
endTime
=
sampleTime
;
// Scan queued events to determine end time.
// Scan queued events to determine end time.
...
@@ -260,8 +260,8 @@ class PointerEventResampler {
...
@@ -260,8 +260,8 @@ class PointerEventResampler {
}
}
void
_samplePointerPosition
(
void
_samplePointerPosition
(
Duration
sampleTime
,
Duration
sampleTime
,
HandleEventCallback
callback
,
HandleEventCallback
callback
,
)
{
)
{
// Position at `sampleTime`.
// Position at `sampleTime`.
final
Offset
position
=
_positionAt
(
sampleTime
);
final
Offset
position
=
_positionAt
(
sampleTime
);
...
...
packages/flutter/lib/src/material/about.dart
View file @
323ffe12
...
@@ -675,23 +675,23 @@ class _PackagesViewState extends State<_PackagesView> {
...
@@ -675,23 +675,23 @@ class _PackagesViewState extends State<_PackagesView> {
.
asMap
()
.
asMap
()
.
entries
.
entries
.
map
<
Widget
>((
MapEntry
<
int
,
String
>
entry
)
{
.
map
<
Widget
>((
MapEntry
<
int
,
String
>
entry
)
{
final
String
packageName
=
entry
.
value
;
final
String
packageName
=
entry
.
value
;
final
int
index
=
entry
.
key
;
final
int
index
=
entry
.
key
;
final
List
<
int
>
bindings
=
data
.
packageLicenseBindings
[
packageName
]!;
final
List
<
int
>
bindings
=
data
.
packageLicenseBindings
[
packageName
]!;
return
_PackageListTile
(
return
_PackageListTile
(
packageName:
packageName
,
packageName:
packageName
,
index:
index
,
index:
index
,
isSelected:
drawSelection
&&
entry
.
key
==
(
selectedId
??
0
),
isSelected:
drawSelection
&&
entry
.
key
==
(
selectedId
??
0
),
numberLicenses:
bindings
.
length
,
numberLicenses:
bindings
.
length
,
onTap:
()
{
onTap:
()
{
widget
.
selectedId
.
value
=
index
;
widget
.
selectedId
.
value
=
index
;
_MasterDetailFlow
.
of
(
context
)!.
openDetailPage
(
_DetailArguments
(
_MasterDetailFlow
.
of
(
context
)!.
openDetailPage
(
_DetailArguments
(
packageName
,
packageName
,
bindings
.
map
((
int
i
)
=>
data
.
licenses
[
i
]).
toList
(
growable:
false
),
bindings
.
map
((
int
i
)
=>
data
.
licenses
[
i
]).
toList
(
growable:
false
),
));
));
},
},
);
);
}),
}),
],
],
);
);
}
}
...
@@ -1419,7 +1419,7 @@ class _MasterPage extends StatelessWidget {
...
@@ -1419,7 +1419,7 @@ class _MasterPage extends StatelessWidget {
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
appBar:
AppBar
(
title:
title
,
title:
title
,
leading:
leading
,
leading:
leading
,
...
...
packages/flutter/lib/src/material/chip.dart
View file @
323ffe12
...
@@ -1869,7 +1869,7 @@ class _RawChipState extends State<RawChip> with MaterialStateMixin, TickerProvid
...
@@ -1869,7 +1869,7 @@ class _RawChipState extends State<RawChip> with MaterialStateMixin, TickerProvid
?
()
{
?
()
{
Feedback
.
forTap
(
context
);
Feedback
.
forTap
(
context
);
widget
.
onDeleted
!();
widget
.
onDeleted
!();
}
}
:
null
,
:
null
,
child:
IconTheme
(
child:
IconTheme
(
data:
theme
.
iconTheme
.
copyWith
(
data:
theme
.
iconTheme
.
copyWith
(
...
...
packages/flutter/lib/src/material/ink_well.dart
View file @
323ffe12
...
@@ -107,7 +107,7 @@ abstract class InteractiveInkFeature extends InkFeature {
...
@@ -107,7 +107,7 @@ abstract class InteractiveInkFeature extends InkFeature {
ShapeBorder
?
customBorder
,
ShapeBorder
?
customBorder
,
BorderRadius
borderRadius
=
BorderRadius
.
zero
,
BorderRadius
borderRadius
=
BorderRadius
.
zero
,
RectCallback
?
clipCallback
,
RectCallback
?
clipCallback
,
})
{
})
{
assert
(
canvas
!=
null
);
assert
(
canvas
!=
null
);
assert
(
transform
!=
null
);
assert
(
transform
!=
null
);
assert
(
paint
!=
null
);
assert
(
paint
!=
null
);
...
...
packages/flutter/lib/src/material/input_decorator.dart
View file @
323ffe12
...
@@ -2036,7 +2036,7 @@ class _InputDecoratorState extends State<InputDecorator> with TickerProviderStat
...
@@ -2036,7 +2036,7 @@ class _InputDecoratorState extends State<InputDecorator> with TickerProviderStat
Color
_getDefaultBorderColor
(
ThemeData
themeData
)
{
Color
_getDefaultBorderColor
(
ThemeData
themeData
)
{
if
(
isFocused
)
{
if
(
isFocused
)
{
return
themeData
.
colorScheme
.
primary
;
return
themeData
.
colorScheme
.
primary
;
}
}
if
(
decoration
!.
filled
!)
{
if
(
decoration
!.
filled
!)
{
return
themeData
.
hintColor
;
return
themeData
.
hintColor
;
...
...
packages/flutter/lib/src/material/range_slider.dart
View file @
323ffe12
...
@@ -1513,12 +1513,12 @@ class _RenderRangeSlider extends RenderBox with RelayoutWhenSystemFontsChangeMix
...
@@ -1513,12 +1513,12 @@ class _RenderRangeSlider extends RenderBox with RelayoutWhenSystemFontsChangeMix
// Create the semantics configuration for a single value.
// Create the semantics configuration for a single value.
SemanticsConfiguration
_createSemanticsConfiguration
(
SemanticsConfiguration
_createSemanticsConfiguration
(
double
value
,
double
value
,
double
increasedValue
,
double
increasedValue
,
double
decreasedValue
,
double
decreasedValue
,
String
?
label
,
String
?
label
,
VoidCallback
increaseAction
,
VoidCallback
increaseAction
,
VoidCallback
decreaseAction
,
VoidCallback
decreaseAction
,
)
{
)
{
final
SemanticsConfiguration
config
=
SemanticsConfiguration
();
final
SemanticsConfiguration
config
=
SemanticsConfiguration
();
config
.
isEnabled
=
isEnabled
;
config
.
isEnabled
=
isEnabled
;
...
@@ -1544,9 +1544,9 @@ class _RenderRangeSlider extends RenderBox with RelayoutWhenSystemFontsChangeMix
...
@@ -1544,9 +1544,9 @@ class _RenderRangeSlider extends RenderBox with RelayoutWhenSystemFontsChangeMix
@override
@override
void
assembleSemanticsNode
(
void
assembleSemanticsNode
(
SemanticsNode
node
,
SemanticsNode
node
,
SemanticsConfiguration
config
,
SemanticsConfiguration
config
,
Iterable
<
SemanticsNode
>
children
,
Iterable
<
SemanticsNode
>
children
,
)
{
)
{
assert
(
children
.
isEmpty
);
assert
(
children
.
isEmpty
);
...
@@ -1609,7 +1609,7 @@ class _RenderRangeSlider extends RenderBox with RelayoutWhenSystemFontsChangeMix
...
@@ -1609,7 +1609,7 @@ class _RenderRangeSlider extends RenderBox with RelayoutWhenSystemFontsChangeMix
void
_increaseStartAction
()
{
void
_increaseStartAction
()
{
if
(
isEnabled
)
{
if
(
isEnabled
)
{
onChanged
!(
RangeValues
(
_increasedStartValue
,
values
.
end
));
onChanged
!(
RangeValues
(
_increasedStartValue
,
values
.
end
));
}
}
}
}
...
...
packages/flutter/lib/src/material/scrollbar_theme.dart
View file @
323ffe12
...
@@ -228,7 +228,7 @@ class ScrollbarThemeData with Diagnosticable {
...
@@ -228,7 +228,7 @@ class ScrollbarThemeData with Diagnosticable {
MaterialStateProperty
<
T
>?
b
,
MaterialStateProperty
<
T
>?
b
,
double
t
,
double
t
,
T
Function
(
T
?,
T
?,
double
)
lerpFunction
,
T
Function
(
T
?,
T
?,
double
)
lerpFunction
,
)
{
)
{
// Avoid creating a _LerpProperties object for a common case.
// Avoid creating a _LerpProperties object for a common case.
if
(
a
==
null
&&
b
==
null
)
if
(
a
==
null
&&
b
==
null
)
return
null
;
return
null
;
...
...
packages/flutter/lib/src/material/slider_theme.dart
View file @
323ffe12
...
@@ -2549,14 +2549,14 @@ class RectangularSliderValueIndicatorShape extends SliderComponentShape {
...
@@ -2549,14 +2549,14 @@ class RectangularSliderValueIndicatorShape extends SliderComponentShape {
@override
@override
Size
getPreferredSize
(
Size
getPreferredSize
(
bool
isEnabled
,
bool
isEnabled
,
bool
isDiscrete
,
{
bool
isDiscrete
,
{
TextPainter
?
labelPainter
,
TextPainter
?
labelPainter
,
double
?
textScaleFactor
,
double
?
textScaleFactor
,
})
{
})
{
assert
(
labelPainter
!=
null
);
assert
(
labelPainter
!=
null
);
assert
(
textScaleFactor
!=
null
&&
textScaleFactor
>=
0
);
assert
(
textScaleFactor
!=
null
&&
textScaleFactor
>=
0
);
return
_pathPainter
.
getPreferredSize
(
labelPainter
!,
textScaleFactor
!);
return
_pathPainter
.
getPreferredSize
(
labelPainter
!,
textScaleFactor
!);
}
}
@override
@override
...
...
packages/flutter/lib/src/painting/binding.dart
View file @
323ffe12
...
@@ -94,7 +94,8 @@ mixin PaintingBinding on BindingBase, ServicesBinding {
...
@@ -94,7 +94,8 @@ mixin PaintingBinding on BindingBase, ServicesBinding {
/// unnecessary memory usage for images. Callers that wish to display an image
/// unnecessary memory usage for images. Callers that wish to display an image
/// above its native resolution should prefer scaling the canvas the image is
/// above its native resolution should prefer scaling the canvas the image is
/// drawn into.
/// drawn into.
Future
<
ui
.
Codec
>
instantiateImageCodec
(
Uint8List
bytes
,
{
Future
<
ui
.
Codec
>
instantiateImageCodec
(
Uint8List
bytes
,
{
int
?
cacheWidth
,
int
?
cacheWidth
,
int
?
cacheHeight
,
int
?
cacheHeight
,
bool
allowUpscaling
=
false
,
bool
allowUpscaling
=
false
,
...
...
packages/flutter/lib/src/painting/image_cache.dart
View file @
323ffe12
...
@@ -106,7 +106,7 @@ class ImageCache {
...
@@ -106,7 +106,7 @@ class ImageCache {
return
;
return
;
TimelineTask
?
timelineTask
;
TimelineTask
?
timelineTask
;
if
(!
kReleaseMode
)
{
if
(!
kReleaseMode
)
{
timelineTask
=
TimelineTask
()..
start
(
timelineTask
=
TimelineTask
()..
start
(
'ImageCache.setMaximumSize'
,
'ImageCache.setMaximumSize'
,
arguments:
<
String
,
dynamic
>{
'value'
:
value
},
arguments:
<
String
,
dynamic
>{
'value'
:
value
},
);
);
...
...
packages/flutter/lib/src/rendering/box.dart
View file @
323ffe12
...
@@ -2208,7 +2208,7 @@ abstract class RenderBox extends RenderObject {
...
@@ -2208,7 +2208,7 @@ abstract class RenderBox extends RenderObject {
DiagnosticsProperty
<
Size
>(
'The exact size it was given was'
,
_size
,
style:
DiagnosticsTreeStyle
.
errorProperty
),
DiagnosticsProperty
<
Size
>(
'The exact size it was given was'
,
_size
,
style:
DiagnosticsTreeStyle
.
errorProperty
),
ErrorHint
(
'See https://flutter.dev/docs/development/ui/layout/box-constraints for more information.'
),
ErrorHint
(
'See https://flutter.dev/docs/development/ui/layout/box-constraints for more information.'
),
]);
]);
}
}
// verify that the size is within the constraints
// verify that the size is within the constraints
if
(!
constraints
.
isSatisfiedBy
(
_size
!))
{
if
(!
constraints
.
isSatisfiedBy
(
_size
!))
{
throw
FlutterError
.
fromParts
(<
DiagnosticsNode
>[
throw
FlutterError
.
fromParts
(<
DiagnosticsNode
>[
...
...
packages/flutter/lib/src/rendering/layer.dart
View file @
323ffe12
...
@@ -2282,8 +2282,10 @@ class FollowerLayer extends ContainerLayer {
...
@@ -2282,8 +2282,10 @@ class FollowerLayer extends ContainerLayer {
/// Returns null if [a] [b] do not share a common ancestor, in which case the
/// Returns null if [a] [b] do not share a common ancestor, in which case the
/// results in [ancestorsA] and [ancestorsB] are undefined.
/// results in [ancestorsA] and [ancestorsB] are undefined.
static
Layer
?
_pathsToCommonAncestor
(
static
Layer
?
_pathsToCommonAncestor
(
Layer
?
a
,
Layer
?
b
,
Layer
?
a
,
List
<
ContainerLayer
?>
ancestorsA
,
List
<
ContainerLayer
?>
ancestorsB
,
Layer
?
b
,
List
<
ContainerLayer
?>
ancestorsA
,
List
<
ContainerLayer
?>
ancestorsB
,
)
{
)
{
// No common ancestor found.
// No common ancestor found.
if
(
a
==
null
||
b
==
null
)
if
(
a
==
null
||
b
==
null
)
...
...
packages/flutter/lib/src/rendering/sliver_persistent_header.dart
View file @
323ffe12
...
@@ -18,7 +18,8 @@ import 'viewport_offset.dart';
...
@@ -18,7 +18,8 @@ import 'viewport_offset.dart';
// Trims the specified edges of the given `Rect` [original], so that they do not
// Trims the specified edges of the given `Rect` [original], so that they do not
// exceed the given values.
// exceed the given values.
Rect
?
_trim
(
Rect
?
original
,
{
Rect
?
_trim
(
Rect
?
original
,
{
double
top
=
-
double
.
infinity
,
double
top
=
-
double
.
infinity
,
double
right
=
double
.
infinity
,
double
right
=
double
.
infinity
,
double
bottom
=
double
.
infinity
,
double
bottom
=
double
.
infinity
,
...
@@ -636,12 +637,12 @@ abstract class RenderSliverFloatingPersistentHeader extends RenderSliverPersiste
...
@@ -636,12 +637,12 @@ abstract class RenderSliverFloatingPersistentHeader extends RenderSliverPersiste
final
AnimationController
effectiveController
=
final
AnimationController
effectiveController
=
_controller
??=
AnimationController
(
vsync:
vsync
!,
duration:
duration
)
_controller
??=
AnimationController
(
vsync:
vsync
!,
duration:
duration
)
..
addListener
(()
{
..
addListener
(()
{
if
(
_effectiveScrollOffset
==
_animation
.
value
)
if
(
_effectiveScrollOffset
==
_animation
.
value
)
return
;
return
;
_effectiveScrollOffset
=
_animation
.
value
;
_effectiveScrollOffset
=
_animation
.
value
;
markNeedsLayout
();
markNeedsLayout
();
});
});
_animation
=
effectiveController
.
drive
(
_animation
=
effectiveController
.
drive
(
Tween
<
double
>(
Tween
<
double
>(
...
...
packages/flutter/lib/src/widgets/framework.dart
View file @
323ffe12
...
@@ -376,7 +376,7 @@ abstract class Widget extends DiagnosticableTree {
...
@@ -376,7 +376,7 @@ abstract class Widget extends DiagnosticableTree {
return
widget
is
StatefulWidget
?
1
:
return
widget
is
StatefulWidget
?
1
:
widget
is
StatelessWidget
?
2
:
widget
is
StatelessWidget
?
2
:
0
;
0
;
}
}
}
}
/// A widget that does not require mutable state.
/// A widget that does not require mutable state.
...
...
packages/flutter/lib/src/widgets/navigator.dart
View file @
323ffe12
...
@@ -1738,7 +1738,7 @@ class Navigator extends StatefulWidget {
...
@@ -1738,7 +1738,7 @@ class Navigator extends StatefulWidget {
BuildContext
context
,
BuildContext
context
,
String
routeName
,
{
String
routeName
,
{
Object
?
arguments
,
Object
?
arguments
,
})
{
})
{
return
Navigator
.
of
(
context
).
pushNamed
<
T
>(
routeName
,
arguments:
arguments
);
return
Navigator
.
of
(
context
).
pushNamed
<
T
>(
routeName
,
arguments:
arguments
);
}
}
...
@@ -1950,7 +1950,7 @@ class Navigator extends StatefulWidget {
...
@@ -1950,7 +1950,7 @@ class Navigator extends StatefulWidget {
String
routeName
,
{
String
routeName
,
{
TO
?
result
,
TO
?
result
,
Object
?
arguments
,
Object
?
arguments
,
})
{
})
{
return
Navigator
.
of
(
context
).
popAndPushNamed
<
T
,
TO
>(
routeName
,
arguments:
arguments
,
result:
result
);
return
Navigator
.
of
(
context
).
popAndPushNamed
<
T
,
TO
>(
routeName
,
arguments:
arguments
,
result:
result
);
}
}
...
@@ -1981,11 +1981,11 @@ class Navigator extends StatefulWidget {
...
@@ -1981,11 +1981,11 @@ class Navigator extends StatefulWidget {
/// {@end-tool}
/// {@end-tool}
@optionalTypeArgs
@optionalTypeArgs
static
String
restorablePopAndPushNamed
<
T
extends
Object
?,
TO
extends
Object
?>(
static
String
restorablePopAndPushNamed
<
T
extends
Object
?,
TO
extends
Object
?>(
BuildContext
context
,
BuildContext
context
,
String
routeName
,
{
String
routeName
,
{
TO
?
result
,
TO
?
result
,
Object
?
arguments
,
Object
?
arguments
,
})
{
})
{
return
Navigator
.
of
(
context
).
restorablePopAndPushNamed
<
T
,
TO
>(
routeName
,
arguments:
arguments
,
result:
result
);
return
Navigator
.
of
(
context
).
restorablePopAndPushNamed
<
T
,
TO
>(
routeName
,
arguments:
arguments
,
result:
result
);
}
}
...
@@ -2086,11 +2086,11 @@ class Navigator extends StatefulWidget {
...
@@ -2086,11 +2086,11 @@ class Navigator extends StatefulWidget {
/// {@end-tool}
/// {@end-tool}
@optionalTypeArgs
@optionalTypeArgs
static
String
restorablePushNamedAndRemoveUntil
<
T
extends
Object
?>(
static
String
restorablePushNamedAndRemoveUntil
<
T
extends
Object
?>(
BuildContext
context
,
BuildContext
context
,
String
newRouteName
,
String
newRouteName
,
RoutePredicate
predicate
,
{
RoutePredicate
predicate
,
{
Object
?
arguments
,
Object
?
arguments
,
})
{
})
{
return
Navigator
.
of
(
context
).
restorablePushNamedAndRemoveUntil
<
T
>(
newRouteName
,
predicate
,
arguments:
arguments
);
return
Navigator
.
of
(
context
).
restorablePushNamedAndRemoveUntil
<
T
>(
newRouteName
,
predicate
,
arguments:
arguments
);
}
}
...
@@ -2728,7 +2728,7 @@ class Navigator extends StatefulWidget {
...
@@ -2728,7 +2728,7 @@ class Navigator extends StatefulWidget {
// Handles the case where the input context is a navigator element.
// Handles the case where the input context is a navigator element.
NavigatorState
?
navigator
;
NavigatorState
?
navigator
;
if
(
context
is
StatefulElement
&&
context
.
state
is
NavigatorState
)
{
if
(
context
is
StatefulElement
&&
context
.
state
is
NavigatorState
)
{
navigator
=
context
.
state
as
NavigatorState
;
navigator
=
context
.
state
as
NavigatorState
;
}
}
if
(
rootNavigator
)
{
if
(
rootNavigator
)
{
navigator
=
context
.
findRootAncestorStateOfType
<
NavigatorState
>()
??
navigator
;
navigator
=
context
.
findRootAncestorStateOfType
<
NavigatorState
>()
??
navigator
;
...
@@ -2772,9 +2772,9 @@ class Navigator extends StatefulWidget {
...
@@ -2772,9 +2772,9 @@ class Navigator extends StatefulWidget {
///
///
/// This method can be expensive (it walks the element tree).
/// This method can be expensive (it walks the element tree).
static
NavigatorState
?
maybeOf
(
static
NavigatorState
?
maybeOf
(
BuildContext
context
,
{
BuildContext
context
,
{
bool
rootNavigator
=
false
,
bool
rootNavigator
=
false
,
})
{
})
{
// Handles the case where the input context is a navigator element.
// Handles the case where the input context is a navigator element.
NavigatorState
?
navigator
;
NavigatorState
?
navigator
;
if
(
context
is
StatefulElement
&&
context
.
state
is
NavigatorState
)
{
if
(
context
is
StatefulElement
&&
context
.
state
is
NavigatorState
)
{
...
...
packages/flutter/lib/src/widgets/scroll_aware_image_provider.dart
View file @
323ffe12
...
@@ -96,10 +96,10 @@ class ScrollAwareImageProvider<T extends Object> extends ImageProvider<T> {
...
@@ -96,10 +96,10 @@ class ScrollAwareImageProvider<T extends Object> extends ImageProvider<T> {
// Try to get to end of the frame callbacks of the next frame, and then
// Try to get to end of the frame callbacks of the next frame, and then
// check again.
// check again.
if
(
Scrollable
.
recommendDeferredLoadingForContext
(
context
.
context
!))
{
if
(
Scrollable
.
recommendDeferredLoadingForContext
(
context
.
context
!))
{
SchedulerBinding
.
instance
!.
scheduleFrameCallback
((
_
)
{
SchedulerBinding
.
instance
!.
scheduleFrameCallback
((
_
)
{
scheduleMicrotask
(()
=>
resolveStreamForKey
(
configuration
,
stream
,
key
,
handleError
));
scheduleMicrotask
(()
=>
resolveStreamForKey
(
configuration
,
stream
,
key
,
handleError
));
});
});
return
;
return
;
}
}
// We are in the tree, we're not scrolling too fast, the cache doesn't
// We are in the tree, we're not scrolling too fast, the cache doesn't
// have our image, and no one has otherwise completed the stream. Go.
// have our image, and no one has otherwise completed the stream. Go.
...
...
packages/flutter/lib/src/widgets/scrollbar.dart
View file @
323ffe12
...
@@ -1345,12 +1345,12 @@ class RawScrollbarState<T extends RawScrollbar> extends State<T> with TickerProv
...
@@ -1345,12 +1345,12 @@ class RawScrollbarState<T extends RawScrollbar> extends State<T> with TickerProv
gestures
[
_ThumbPressGestureRecognizer
]
=
gestures
[
_ThumbPressGestureRecognizer
]
=
GestureRecognizerFactoryWithHandlers
<
_ThumbPressGestureRecognizer
>(
GestureRecognizerFactoryWithHandlers
<
_ThumbPressGestureRecognizer
>(
()
=>
_ThumbPressGestureRecognizer
(
()
=>
_ThumbPressGestureRecognizer
(
debugOwner:
this
,
debugOwner:
this
,
customPaintKey:
_scrollbarPainterKey
,
customPaintKey:
_scrollbarPainterKey
,
pressDuration:
widget
.
pressDuration
,
pressDuration:
widget
.
pressDuration
,
),
),
(
_ThumbPressGestureRecognizer
instance
)
{
(
_ThumbPressGestureRecognizer
instance
)
{
instance
.
onLongPress
=
handleThumbPress
;
instance
.
onLongPress
=
handleThumbPress
;
instance
.
onLongPressStart
=
(
LongPressStartDetails
details
)
=>
handleThumbPressStart
(
details
.
localPosition
);
instance
.
onLongPressStart
=
(
LongPressStartDetails
details
)
=>
handleThumbPressStart
(
details
.
localPosition
);
instance
.
onLongPressMoveUpdate
=
(
LongPressMoveUpdateDetails
details
)
=>
handleThumbPressUpdate
(
details
.
localPosition
);
instance
.
onLongPressMoveUpdate
=
(
LongPressMoveUpdateDetails
details
)
=>
handleThumbPressUpdate
(
details
.
localPosition
);
...
@@ -1360,11 +1360,11 @@ class RawScrollbarState<T extends RawScrollbar> extends State<T> with TickerProv
...
@@ -1360,11 +1360,11 @@ class RawScrollbarState<T extends RawScrollbar> extends State<T> with TickerProv
gestures
[
_TrackTapGestureRecognizer
]
=
gestures
[
_TrackTapGestureRecognizer
]
=
GestureRecognizerFactoryWithHandlers
<
_TrackTapGestureRecognizer
>(
GestureRecognizerFactoryWithHandlers
<
_TrackTapGestureRecognizer
>(
()
=>
_TrackTapGestureRecognizer
(
()
=>
_TrackTapGestureRecognizer
(
debugOwner:
this
,
debugOwner:
this
,
customPaintKey:
_scrollbarPainterKey
,
customPaintKey:
_scrollbarPainterKey
,
),
),
(
_TrackTapGestureRecognizer
instance
)
{
(
_TrackTapGestureRecognizer
instance
)
{
instance
.
onTapDown
=
_handleTrackTapDown
;
instance
.
onTapDown
=
_handleTrackTapDown
;
},
},
);
);
...
...
packages/flutter/lib/src/widgets/shortcuts.dart
View file @
323ffe12
...
@@ -336,8 +336,8 @@ class LogicalKeySet extends KeySet<LogicalKeyboardKey> with Diagnosticable
...
@@ -336,8 +336,8 @@ class LogicalKeySet extends KeySet<LogicalKeyboardKey> with Diagnosticable
@override
@override
String
debugDescribeKeys
()
{
String
debugDescribeKeys
()
{
final
List
<
LogicalKeyboardKey
>
sortedKeys
=
keys
.
toList
()
..
sort
(
final
List
<
LogicalKeyboardKey
>
sortedKeys
=
keys
.
toList
()
(
LogicalKeyboardKey
a
,
LogicalKeyboardKey
b
)
{
..
sort
(
(
LogicalKeyboardKey
a
,
LogicalKeyboardKey
b
)
{
// Put the modifiers first. If it has a synonym, then it's something
// Put the modifiers first. If it has a synonym, then it's something
// like shiftLeft, altRight, etc.
// like shiftLeft, altRight, etc.
final
bool
aIsModifier
=
a
.
synonyms
.
isNotEmpty
||
_modifiers
.
contains
(
a
);
final
bool
aIsModifier
=
a
.
synonyms
.
isNotEmpty
||
_modifiers
.
contains
(
a
);
...
@@ -348,8 +348,7 @@ class LogicalKeySet extends KeySet<LogicalKeyboardKey> with Diagnosticable
...
@@ -348,8 +348,7 @@ class LogicalKeySet extends KeySet<LogicalKeyboardKey> with Diagnosticable
return
1
;
return
1
;
}
}
return
a
.
debugName
!.
compareTo
(
b
.
debugName
!);
return
a
.
debugName
!.
compareTo
(
b
.
debugName
!);
},
});
);
return
sortedKeys
.
map
<
String
>((
LogicalKeyboardKey
key
)
=>
key
.
debugName
.
toString
()).
join
(
' + '
);
return
sortedKeys
.
map
<
String
>((
LogicalKeyboardKey
key
)
=>
key
.
debugName
.
toString
()).
join
(
' + '
);
}
}
...
...
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