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
a6832d4d
Unverified
Commit
a6832d4d
authored
Mar 30, 2021
by
Alexandre Ardhuin
Committed by
GitHub
Mar 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add missing trailing commas (#79299)
parent
8a3c09af
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
113 additions
and
106 deletions
+113
-106
analyze.dart
dev/bots/analyze.dart
+1
-1
animation_controller.dart
packages/flutter/lib/src/animation/animation_controller.dart
+5
-5
animations.dart
packages/flutter/lib/src/animation/animations.dart
+1
-1
listener_helpers.dart
packages/flutter/lib/src/animation/listener_helpers.dart
+1
-1
tween.dart
packages/flutter/lib/src/animation/tween.dart
+2
-2
action_sheet.dart
packages/flutter/lib/src/cupertino/action_sheet.dart
+1
-1
date_picker.dart
packages/flutter/lib/src/cupertino/date_picker.dart
+37
-31
debug.dart
packages/flutter/lib/src/cupertino/debug.dart
+4
-4
dialog.dart
packages/flutter/lib/src/cupertino/dialog.dart
+2
-2
form_section.dart
packages/flutter/lib/src/cupertino/form_section.dart
+13
-13
interface_level.dart
packages/flutter/lib/src/cupertino/interface_level.dart
+1
-1
route.dart
packages/flutter/lib/src/cupertino/route.dart
+1
-1
search_field.dart
packages/flutter/lib/src/cupertino/search_field.dart
+6
-3
sliding_segmented_control.dart
.../flutter/lib/src/cupertino/sliding_segmented_control.dart
+3
-3
tab_view.dart
packages/flutter/lib/src/cupertino/tab_view.dart
+2
-2
text_field.dart
packages/flutter/lib/src/cupertino/text_field.dart
+3
-3
text_selection_toolbar.dart
...ges/flutter/lib/src/cupertino/text_selection_toolbar.dart
+1
-1
_platform_io.dart
packages/flutter/lib/src/foundation/_platform_io.dart
+1
-1
assertions.dart
packages/flutter/lib/src/foundation/assertions.dart
+6
-6
change_notifier.dart
packages/flutter/lib/src/foundation/change_notifier.dart
+1
-1
diagnostics.dart
packages/flutter/lib/src/foundation/diagnostics.dart
+9
-9
long_press.dart
packages/flutter/lib/src/gestures/long_press.dart
+2
-4
pointer_router.dart
packages/flutter/lib/src/gestures/pointer_router.dart
+1
-1
pointer_signal_resolver.dart
...ges/flutter/lib/src/gestures/pointer_signal_resolver.dart
+1
-1
recognizer.dart
packages/flutter/lib/src/gestures/recognizer.dart
+1
-1
team.dart
packages/flutter/lib/src/gestures/team.dart
+3
-1
velocity_tracker.dart
packages/flutter/lib/src/gestures/velocity_tracker.dart
+4
-6
No files found.
dev/bots/analyze.dart
View file @
a6832d4d
...
@@ -128,7 +128,7 @@ Future<void> run(List<String> arguments) async {
...
@@ -128,7 +128,7 @@ Future<void> run(List<String> arguments) async {
final
RegExp
_findDeprecationPattern
=
RegExp
(
r'@[Dd]eprecated'
);
final
RegExp
_findDeprecationPattern
=
RegExp
(
r'@[Dd]eprecated'
);
final
RegExp
_deprecationPattern1
=
RegExp
(
r'^( *)@Deprecated\($'
);
// flutter_ignore: deprecation_syntax (see analyze.dart)
final
RegExp
_deprecationPattern1
=
RegExp
(
r'^( *)@Deprecated\($'
);
// flutter_ignore: deprecation_syntax (see analyze.dart)
final
RegExp
_deprecationPattern2
=
RegExp
(
r"^ *'(.+) '$"
);
final
RegExp
_deprecationPattern2
=
RegExp
(
r"^ *'(.+) '$"
);
final
RegExp
_deprecationPattern3
=
RegExp
(
r"^ *'This feature was deprecated after v([0-9]+)\.([0-9]+)\.([0-9]+)(\-[0-9]+\.[0-9]+\.pre)?\.'$"
);
final
RegExp
_deprecationPattern3
=
RegExp
(
r"^ *'This feature was deprecated after v([0-9]+)\.([0-9]+)\.([0-9]+)(\-[0-9]+\.[0-9]+\.pre)?\.'
,?
$"
);
final
RegExp
_deprecationPattern4
=
RegExp
(
r'^ *\)$'
);
final
RegExp
_deprecationPattern4
=
RegExp
(
r'^ *\)$'
);
/// Some deprecation notices are special, for example they're used to annotate members that
/// Some deprecation notices are special, for example they're used to annotate members that
...
...
packages/flutter/lib/src/animation/animation_controller.dart
View file @
a6832d4d
...
@@ -446,7 +446,7 @@ class AnimationController extends Animation<double>
...
@@ -446,7 +446,7 @@ class AnimationController extends Animation<double>
throw
FlutterError
(
throw
FlutterError
(
'AnimationController.forward() called with no default duration.
\n
'
'AnimationController.forward() called with no default duration.
\n
'
'The "duration" property should be set, either in the constructor or later, before '
'The "duration" property should be set, either in the constructor or later, before '
'calling the forward() function.'
'calling the forward() function.'
,
);
);
}
}
return
true
;
return
true
;
...
@@ -479,7 +479,7 @@ class AnimationController extends Animation<double>
...
@@ -479,7 +479,7 @@ class AnimationController extends Animation<double>
throw
FlutterError
(
throw
FlutterError
(
'AnimationController.reverse() called with no default duration or reverseDuration.
\n
'
'AnimationController.reverse() called with no default duration or reverseDuration.
\n
'
'The "duration" or "reverseDuration" property should be set, either in the constructor or later, before '
'The "duration" or "reverseDuration" property should be set, either in the constructor or later, before '
'calling the reverse() function.'
'calling the reverse() function.'
,
);
);
}
}
return
true
;
return
true
;
...
@@ -518,7 +518,7 @@ class AnimationController extends Animation<double>
...
@@ -518,7 +518,7 @@ class AnimationController extends Animation<double>
'AnimationController.animateTo() called with no explicit duration and no default duration.
\n
'
'AnimationController.animateTo() called with no explicit duration and no default duration.
\n
'
'Either the "duration" argument to the animateTo() method should be provided, or the '
'Either the "duration" argument to the animateTo() method should be provided, or the '
'"duration" property should be set, either in the constructor or later, before '
'"duration" property should be set, either in the constructor or later, before '
'calling the animateTo() function.'
'calling the animateTo() function.'
,
);
);
}
}
return
true
;
return
true
;
...
@@ -551,7 +551,7 @@ class AnimationController extends Animation<double>
...
@@ -551,7 +551,7 @@ class AnimationController extends Animation<double>
'AnimationController.animateBack() called with no explicit duration and no default duration or reverseDuration.
\n
'
'AnimationController.animateBack() called with no explicit duration and no default duration or reverseDuration.
\n
'
'Either the "duration" argument to the animateBack() method should be provided, or the '
'Either the "duration" argument to the animateBack() method should be provided, or the '
'"duration" or "reverseDuration" property should be set, either in the constructor or later, before '
'"duration" or "reverseDuration" property should be set, either in the constructor or later, before '
'calling the animateBack() function.'
'calling the animateBack() function.'
,
);
);
}
}
return
true
;
return
true
;
...
@@ -642,7 +642,7 @@ class AnimationController extends Animation<double>
...
@@ -642,7 +642,7 @@ class AnimationController extends Animation<double>
'AnimationController.repeat() called without an explicit period and with no default Duration.
\n
'
'AnimationController.repeat() called without an explicit period and with no default Duration.
\n
'
'Either the "period" argument to the repeat() method should be provided, or the '
'Either the "period" argument to the repeat() method should be provided, or the '
'"duration" property should be set, either in the constructor or later, before '
'"duration" property should be set, either in the constructor or later, before '
'calling the repeat() function.'
'calling the repeat() function.'
,
);
);
}
}
return
true
;
return
true
;
...
...
packages/flutter/lib/src/animation/animations.dart
View file @
a6832d4d
...
@@ -443,7 +443,7 @@ class CurvedAnimation extends Animation<double> with AnimationWithParentMixin<do
...
@@ -443,7 +443,7 @@ class CurvedAnimation extends Animation<double> with AnimationWithParentMixin<do
'Invalid curve endpoint at
$t
.
\n
'
'Invalid curve endpoint at
$t
.
\n
'
'Curves must map 0.0 to near zero and 1.0 to near one but '
'Curves must map 0.0 to near zero and 1.0 to near one but '
'
${activeCurve.runtimeType}
mapped
$t
to
$transformedValue
, which '
'
${activeCurve.runtimeType}
mapped
$t
to
$transformedValue
, which '
'is near
$roundedTransformedValue
.'
'is near
$roundedTransformedValue
.'
,
);
);
}
}
return
true
;
return
true
;
...
...
packages/flutter/lib/src/animation/listener_helpers.dart
View file @
a6832d4d
...
@@ -214,7 +214,7 @@ mixin AnimationLocalStatusListenersMixin {
...
@@ -214,7 +214,7 @@ mixin AnimationLocalStatusListenersMixin {
stack:
stack
,
stack:
stack
,
library
:
'animation library'
,
library
:
'animation library'
,
context:
ErrorDescription
(
'while notifying status listeners for
$runtimeType
'
),
context:
ErrorDescription
(
'while notifying status listeners for
$runtimeType
'
),
informationCollector:
collector
informationCollector:
collector
,
));
));
}
}
}
}
...
...
packages/flutter/lib/src/animation/tween.dart
View file @
a6832d4d
...
@@ -279,7 +279,7 @@ class Tween<T extends dynamic> extends Animatable<T> {
...
@@ -279,7 +279,7 @@ class Tween<T extends dynamic> extends Animatable<T> {
else
else
ErrorHint
(
ErrorHint
(
'There may be a dedicated "
${begin.runtimeType}
Tween" for this type, '
'There may be a dedicated "
${begin.runtimeType}
Tween" for this type, '
'or you may need to create one.'
'or you may need to create one.'
,
),
),
]);
]);
}
on
TypeError
{
}
on
TypeError
{
...
@@ -296,7 +296,7 @@ class Tween<T extends dynamic> extends Animatable<T> {
...
@@ -296,7 +296,7 @@ class Tween<T extends dynamic> extends Animatable<T> {
else
else
ErrorHint
(
ErrorHint
(
'There may be a dedicated "
${begin.runtimeType}
Tween" for this type, '
'There may be a dedicated "
${begin.runtimeType}
Tween" for this type, '
'or you may need to create one.'
'or you may need to create one.'
,
),
),
]);
]);
}
}
...
...
packages/flutter/lib/src/cupertino/action_sheet.dart
View file @
a6832d4d
...
@@ -1334,7 +1334,7 @@ class _RenderCupertinoAlertActions extends RenderBox
...
@@ -1334,7 +1334,7 @@ class _RenderCupertinoAlertActions extends RenderBox
}
}
return
constraints
.
constrain
(
return
constraints
.
constrain
(
Size
(
constraints
.
maxWidth
,
verticalOffset
)
Size
(
constraints
.
maxWidth
,
verticalOffset
)
,
);
);
}
}
...
...
packages/flutter/lib/src/cupertino/date_picker.dart
View file @
a6832d4d
...
@@ -65,7 +65,7 @@ void _animateColumnControllerToItem(FixedExtentScrollController controller, int
...
@@ -65,7 +65,7 @@ void _animateColumnControllerToItem(FixedExtentScrollController controller, int
}
}
const
Widget
_leftSelectionOverlay
=
CupertinoPickerDefaultSelectionOverlay
(
capRightEdge:
false
);
const
Widget
_leftSelectionOverlay
=
CupertinoPickerDefaultSelectionOverlay
(
capRightEdge:
false
);
const
Widget
_centerSelectionOverlay
=
CupertinoPickerDefaultSelectionOverlay
(
capLeftEdge:
false
,
capRightEdge:
false
,
);
const
Widget
_centerSelectionOverlay
=
CupertinoPickerDefaultSelectionOverlay
(
capLeftEdge:
false
,
capRightEdge:
false
);
const
Widget
_rightSelectionOverlay
=
CupertinoPickerDefaultSelectionOverlay
(
capLeftEdge:
false
);
const
Widget
_rightSelectionOverlay
=
CupertinoPickerDefaultSelectionOverlay
(
capLeftEdge:
false
);
// Lays out the date picker based on how much space each single column needs.
// Lays out the date picker based on how much space each single column needs.
...
@@ -803,7 +803,7 @@ class _CupertinoDatePickerDateTimeState extends State<CupertinoDatePicker> {
...
@@ -803,7 +803,7 @@ class _CupertinoDatePickerDateTimeState extends State<CupertinoDatePicker> {
}),
}),
looping:
true
,
looping:
true
,
selectionOverlay:
selectionOverlay
,
selectionOverlay:
selectionOverlay
,
)
)
,
);
);
}
}
...
@@ -1757,10 +1757,12 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
...
@@ -1757,10 +1757,12 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
setState
(()
{
setState
(()
{
selectedHour
=
index
;
selectedHour
=
index
;
widget
.
onTimerDurationChanged
(
widget
.
onTimerDurationChanged
(
Duration
(
Duration
(
hours:
selectedHour
!,
hours:
selectedHour
!,
minutes:
selectedMinute
,
minutes:
selectedMinute
,
seconds:
selectedSecond
??
0
));
seconds:
selectedSecond
??
0
,
),
);
});
});
},
},
children:
List
<
Widget
>.
generate
(
24
,
(
int
index
)
{
children:
List
<
Widget
>.
generate
(
24
,
(
int
index
)
{
...
@@ -1810,7 +1812,7 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
...
@@ -1810,7 +1812,7 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
magnification:
_kMagnification
,
magnification:
_kMagnification
,
offAxisFraction:
_calculateOffAxisFraction
(
offAxisFraction:
_calculateOffAxisFraction
(
additionalPadding
.
start
,
additionalPadding
.
start
,
widget
.
mode
==
CupertinoTimerPickerMode
.
ms
?
0
:
1
widget
.
mode
==
CupertinoTimerPickerMode
.
ms
?
0
:
1
,
),
),
itemExtent:
_kItemExtent
,
itemExtent:
_kItemExtent
,
backgroundColor:
widget
.
backgroundColor
,
backgroundColor:
widget
.
backgroundColor
,
...
@@ -1820,10 +1822,12 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
...
@@ -1820,10 +1822,12 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
setState
(()
{
setState
(()
{
selectedMinute
=
index
*
widget
.
minuteInterval
;
selectedMinute
=
index
*
widget
.
minuteInterval
;
widget
.
onTimerDurationChanged
(
widget
.
onTimerDurationChanged
(
Duration
(
Duration
(
hours:
selectedHour
??
0
,
hours:
selectedHour
??
0
,
minutes:
selectedMinute
,
minutes:
selectedMinute
,
seconds:
selectedSecond
??
0
));
seconds:
selectedSecond
??
0
,
),
);
});
});
},
},
children:
List
<
Widget
>.
generate
(
60
~/
widget
.
minuteInterval
,
(
int
index
)
{
children:
List
<
Widget
>.
generate
(
60
~/
widget
.
minuteInterval
,
(
int
index
)
{
...
@@ -1874,7 +1878,7 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
...
@@ -1874,7 +1878,7 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
magnification:
_kMagnification
,
magnification:
_kMagnification
,
offAxisFraction:
_calculateOffAxisFraction
(
offAxisFraction:
_calculateOffAxisFraction
(
additionalPadding
.
start
,
additionalPadding
.
start
,
widget
.
mode
==
CupertinoTimerPickerMode
.
ms
?
1
:
2
widget
.
mode
==
CupertinoTimerPickerMode
.
ms
?
1
:
2
,
),
),
itemExtent:
_kItemExtent
,
itemExtent:
_kItemExtent
,
backgroundColor:
widget
.
backgroundColor
,
backgroundColor:
widget
.
backgroundColor
,
...
@@ -1884,10 +1888,12 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
...
@@ -1884,10 +1888,12 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
setState
(()
{
setState
(()
{
selectedSecond
=
index
*
widget
.
secondInterval
;
selectedSecond
=
index
*
widget
.
secondInterval
;
widget
.
onTimerDurationChanged
(
widget
.
onTimerDurationChanged
(
Duration
(
Duration
(
hours:
selectedHour
??
0
,
hours:
selectedHour
??
0
,
minutes:
selectedMinute
,
minutes:
selectedMinute
,
seconds:
selectedSecond
!));
seconds:
selectedSecond
!,
),
);
});
});
},
},
children:
List
<
Widget
>.
generate
(
60
~/
widget
.
secondInterval
,
(
int
index
)
{
children:
List
<
Widget
>.
generate
(
60
~/
widget
.
secondInterval
,
(
int
index
)
{
...
@@ -1935,7 +1941,7 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
...
@@ -1935,7 +1941,7 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
TextStyle
_textStyleFrom
(
BuildContext
context
,
[
double
magnification
=
1.0
])
{
TextStyle
_textStyleFrom
(
BuildContext
context
,
[
double
magnification
=
1.0
])
{
final
TextStyle
textStyle
=
CupertinoTheme
.
of
(
context
).
textTheme
.
pickerTextStyle
;
final
TextStyle
textStyle
=
CupertinoTheme
.
of
(
context
).
textTheme
.
pickerTextStyle
;
return
textStyle
.
copyWith
(
return
textStyle
.
copyWith
(
fontSize:
textStyle
.
fontSize
!
*
magnification
fontSize:
textStyle
.
fontSize
!
*
magnification
,
);
);
}
}
...
@@ -2000,16 +2006,16 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
...
@@ -2000,16 +2006,16 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
_buildHourColumn
(
_buildHourColumn
(
EdgeInsetsDirectional
.
only
(
EdgeInsetsDirectional
.
only
(
start:
hourColumnStartPadding
,
start:
hourColumnStartPadding
,
end:
pickerColumnWidth
-
hourColumnStartPadding
-
hourLabelContentWidth
end:
pickerColumnWidth
-
hourColumnStartPadding
-
hourLabelContentWidth
,
),
),
_leftSelectionOverlay
_leftSelectionOverlay
,
),
),
_buildMinuteColumn
(
_buildMinuteColumn
(
EdgeInsetsDirectional
.
only
(
EdgeInsetsDirectional
.
only
(
start:
pickerColumnWidth
-
minuteColumnEndPadding
-
minuteLabelContentWidth
,
start:
pickerColumnWidth
-
minuteColumnEndPadding
-
minuteLabelContentWidth
,
end:
minuteColumnEndPadding
end:
minuteColumnEndPadding
,
),
),
_rightSelectionOverlay
_rightSelectionOverlay
,
),
),
];
];
break
;
break
;
...
@@ -2029,16 +2035,16 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
...
@@ -2029,16 +2035,16 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
_buildMinuteColumn
(
_buildMinuteColumn
(
EdgeInsetsDirectional
.
only
(
EdgeInsetsDirectional
.
only
(
start:
minuteColumnStartPadding
,
start:
minuteColumnStartPadding
,
end:
pickerColumnWidth
-
minuteColumnStartPadding
-
minuteLabelContentWidth
end:
pickerColumnWidth
-
minuteColumnStartPadding
-
minuteLabelContentWidth
,
),
),
_leftSelectionOverlay
_leftSelectionOverlay
,
),
),
_buildSecondColumn
(
_buildSecondColumn
(
EdgeInsetsDirectional
.
only
(
EdgeInsetsDirectional
.
only
(
start:
pickerColumnWidth
-
secondColumnEndPadding
-
minuteLabelContentWidth
,
start:
pickerColumnWidth
-
secondColumnEndPadding
-
minuteLabelContentWidth
,
end:
secondColumnEndPadding
end:
secondColumnEndPadding
,
),
),
_rightSelectionOverlay
_rightSelectionOverlay
,
),
),
];
];
break
;
break
;
...
@@ -2054,23 +2060,23 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
...
@@ -2054,23 +2060,23 @@ class _CupertinoTimerPickerState extends State<CupertinoTimerPicker> {
_buildHourColumn
(
_buildHourColumn
(
EdgeInsetsDirectional
.
only
(
EdgeInsetsDirectional
.
only
(
start:
_kTimerPickerMinHorizontalPadding
,
start:
_kTimerPickerMinHorizontalPadding
,
end:
math
.
max
(
hourColumnEndPadding
,
0
)
end:
math
.
max
(
hourColumnEndPadding
,
0
)
,
),
),
_leftSelectionOverlay
_leftSelectionOverlay
,
),
),
_buildMinuteColumn
(
_buildMinuteColumn
(
EdgeInsetsDirectional
.
only
(
EdgeInsetsDirectional
.
only
(
start:
minuteColumnPadding
,
start:
minuteColumnPadding
,
end:
minuteColumnPadding
end:
minuteColumnPadding
,
),
),
_centerSelectionOverlay
_centerSelectionOverlay
,
),
),
_buildSecondColumn
(
_buildSecondColumn
(
EdgeInsetsDirectional
.
only
(
EdgeInsetsDirectional
.
only
(
start:
math
.
max
(
secondColumnStartPadding
,
0
),
start:
math
.
max
(
secondColumnStartPadding
,
0
),
end:
_kTimerPickerMinHorizontalPadding
end:
_kTimerPickerMinHorizontalPadding
,
),
),
_rightSelectionOverlay
_rightSelectionOverlay
,
),
),
];
];
break
;
break
;
...
...
packages/flutter/lib/src/cupertino/debug.dart
View file @
a6832d4d
...
@@ -24,19 +24,19 @@ bool debugCheckHasCupertinoLocalizations(BuildContext context) {
...
@@ -24,19 +24,19 @@ bool debugCheckHasCupertinoLocalizations(BuildContext context) {
ErrorSummary
(
'No CupertinoLocalizations found.'
),
ErrorSummary
(
'No CupertinoLocalizations found.'
),
ErrorDescription
(
ErrorDescription
(
'
${context.widget.runtimeType}
widgets require CupertinoLocalizations '
'
${context.widget.runtimeType}
widgets require CupertinoLocalizations '
'to be provided by a Localizations widget ancestor.'
'to be provided by a Localizations widget ancestor.'
,
),
),
ErrorDescription
(
ErrorDescription
(
'The cupertino library uses Localizations to generate messages, '
'The cupertino library uses Localizations to generate messages, '
'labels, and abbreviations.'
'labels, and abbreviations.'
,
),
),
ErrorHint
(
ErrorHint
(
'To introduce a CupertinoLocalizations, either use a '
'To introduce a CupertinoLocalizations, either use a '
'CupertinoApp at the root of your application to include them '
'CupertinoApp at the root of your application to include them '
'automatically, or add a Localization widget with a '
'automatically, or add a Localization widget with a '
'CupertinoLocalizations delegate.'
'CupertinoLocalizations delegate.'
,
),
),
...
context
.
describeMissingAncestor
(
expectedAncestorType:
CupertinoLocalizations
)
...
context
.
describeMissingAncestor
(
expectedAncestorType:
CupertinoLocalizations
)
,
]);
]);
}
}
return
true
;
return
true
;
...
...
packages/flutter/lib/src/cupertino/dialog.dart
View file @
a6832d4d
...
@@ -1537,7 +1537,7 @@ class _RenderCupertinoDialogActions extends RenderBox
...
@@ -1537,7 +1537,7 @@ class _RenderCupertinoDialogActions extends RenderBox
);
);
return
constraints
.
constrain
(
return
constraints
.
constrain
(
Size
(
dialogWidth
,
childSize
.
height
)
Size
(
dialogWidth
,
childSize
.
height
)
,
);
);
}
else
{
}
else
{
// Each button gets half the available width, minus a single divider.
// Each button gets half the available width, minus a single divider.
...
@@ -1609,7 +1609,7 @@ class _RenderCupertinoDialogActions extends RenderBox
...
@@ -1609,7 +1609,7 @@ class _RenderCupertinoDialogActions extends RenderBox
// Our height is the accumulated height of all buttons and dividers.
// Our height is the accumulated height of all buttons and dividers.
return
constraints
.
constrain
(
return
constraints
.
constrain
(
Size
(
dialogWidth
,
verticalOffset
)
Size
(
dialogWidth
,
verticalOffset
)
,
);
);
}
}
}
}
...
...
packages/flutter/lib/src/cupertino/form_section.dart
View file @
a6832d4d
...
@@ -259,14 +259,13 @@ class CupertinoFormSection extends StatelessWidget {
...
@@ -259,14 +259,13 @@ class CupertinoFormSection extends StatelessWidget {
// Refactored the decorate children group in one place to avoid repeating it
// Refactored the decorate children group in one place to avoid repeating it
// twice down bellow in the returned widget.
// twice down bellow in the returned widget.
final
DecoratedBox
decoratedChildrenGroup
=
DecoratedBox
(
final
DecoratedBox
decoratedChildrenGroup
=
DecoratedBox
(
decoration:
decoration
??
decoration:
decoration
??
BoxDecoration
(
BoxDecoration
(
color:
CupertinoDynamicColor
.
resolve
(
color:
CupertinoDynamicColor
.
resolve
(
decoration
?.
color
??
CupertinoColors
.
secondarySystemGroupedBackground
,
decoration
?.
color
??
context
,
CupertinoColors
.
secondarySystemGroupedBackground
,
),
context
),
borderRadius:
childrenGroupBorderRadius
,
borderRadius:
childrenGroupBorderRadius
,
),
),
child:
Column
(
child:
Column
(
children:
childrenWithDividers
,
children:
childrenWithDividers
,
),
),
...
@@ -295,11 +294,12 @@ class CupertinoFormSection extends StatelessWidget {
...
@@ -295,11 +294,12 @@ class CupertinoFormSection extends StatelessWidget {
Padding
(
Padding
(
padding:
margin
,
padding:
margin
,
child:
clipBehavior
==
Clip
.
none
child:
clipBehavior
==
Clip
.
none
?
decoratedChildrenGroup
?
decoratedChildrenGroup
:
ClipRRect
(
:
ClipRRect
(
borderRadius:
childrenGroupBorderRadius
,
borderRadius:
childrenGroupBorderRadius
,
clipBehavior:
clipBehavior
,
clipBehavior:
clipBehavior
,
child:
decoratedChildrenGroup
),
child:
decoratedChildrenGroup
,
),
),
),
if
(
footer
!=
null
)
if
(
footer
!=
null
)
Align
(
Align
(
...
...
packages/flutter/lib/src/cupertino/interface_level.dart
View file @
a6832d4d
...
@@ -76,7 +76,7 @@ class CupertinoUserInterfaceLevel extends InheritedWidget {
...
@@ -76,7 +76,7 @@ class CupertinoUserInterfaceLevel extends InheritedWidget {
'MaterialApp widget (those widgets introduce a CupertinoUserInterfaceLevel), or it can happen '
'MaterialApp widget (those widgets introduce a CupertinoUserInterfaceLevel), or it can happen '
'if the context you use comes from a widget above those widgets.
\n
'
'if the context you use comes from a widget above those widgets.
\n
'
'The context used was:
\n
'
'The context used was:
\n
'
'
$context
'
'
$context
'
,
);
);
}
}
...
...
packages/flutter/lib/src/cupertino/route.dart
View file @
a6832d4d
...
@@ -848,7 +848,7 @@ class _CupertinoEdgeShadowDecoration extends Decoration {
...
@@ -848,7 +848,7 @@ class _CupertinoEdgeShadowDecoration extends Decoration {
<
Color
>[
<
Color
>[
for
(
int
i
=
0
;
i
<
b
.
_colors
!.
length
;
i
+=
1
)
for
(
int
i
=
0
;
i
<
b
.
_colors
!.
length
;
i
+=
1
)
Color
.
lerp
(
a
.
_colors
?[
i
],
b
.
_colors
?[
i
],
t
)!,
Color
.
lerp
(
a
.
_colors
?[
i
],
b
.
_colors
?[
i
],
t
)!,
]
]
,
);
);
}
}
...
...
packages/flutter/lib/src/cupertino/search_field.dart
View file @
a6832d4d
...
@@ -365,12 +365,15 @@ class _CupertinoSearchTextFieldState extends State<CupertinoSearchTextField>
...
@@ -365,12 +365,15 @@ class _CupertinoSearchTextFieldState extends State<CupertinoSearchTextField>
);
);
final
IconThemeData
iconThemeData
=
IconThemeData
(
final
IconThemeData
iconThemeData
=
IconThemeData
(
color:
CupertinoDynamicColor
.
resolve
(
widget
.
itemColor
,
context
),
color:
CupertinoDynamicColor
.
resolve
(
widget
.
itemColor
,
context
),
size:
scaledIconSize
);
size:
scaledIconSize
,
);
final
Widget
prefix
=
Padding
(
final
Widget
prefix
=
Padding
(
child:
IconTheme
(
child:
IconTheme
(
child:
const
Icon
(
CupertinoIcons
.
search
),
data:
iconThemeData
),
data:
iconThemeData
,
child:
const
Icon
(
CupertinoIcons
.
search
),
),
padding:
widget
.
prefixInsets
,
padding:
widget
.
prefixInsets
,
);
);
...
...
packages/flutter/lib/src/cupertino/sliding_segmented_control.dart
View file @
a6832d4d
...
@@ -130,7 +130,7 @@ class _SegmentState<T> extends State<_Segment<T>> with TickerProviderStateMixin<
...
@@ -130,7 +130,7 @@ class _SegmentState<T> extends State<_Segment<T>> with TickerProviderStateMixin<
highlightPressScaleAnimation
=
highlightPressScaleController
.
drive
(
highlightPressScaleAnimation
=
highlightPressScaleController
.
drive
(
Tween
<
double
>(
Tween
<
double
>(
begin:
highlightPressScaleAnimation
.
value
,
begin:
highlightPressScaleAnimation
.
value
,
end:
widget
.
shouldScaleContent
?
_kMinThumbScale
:
1.0
end:
widget
.
shouldScaleContent
?
_kMinThumbScale
:
1.0
,
),
),
);
);
highlightPressScaleController
.
animateWith
(
_kThumbSpringAnimationSimulation
);
highlightPressScaleController
.
animateWith
(
_kThumbSpringAnimationSimulation
);
...
@@ -166,7 +166,7 @@ class _SegmentState<T> extends State<_Segment<T>> with TickerProviderStateMixin<
...
@@ -166,7 +166,7 @@ class _SegmentState<T> extends State<_Segment<T>> with TickerProviderStateMixin<
scale:
highlightPressScaleAnimation
,
scale:
highlightPressScaleAnimation
,
child:
widget
.
child
,
child:
widget
.
child
,
),
),
)
)
,
),
),
// The entire widget will assume the size of this widget, so when a
// The entire widget will assume the size of this widget, so when a
// segment's "highlight" animation plays the size of the parent stays
// segment's "highlight" animation plays the size of the parent stays
...
@@ -520,7 +520,7 @@ class _SegmentedControlState<T> extends State<CupertinoSlidingSegmentedControl<T
...
@@ -520,7 +520,7 @@ class _SegmentedControlState<T> extends State<CupertinoSlidingSegmentedControl<T
Tween
<
double
>(
Tween
<
double
>(
begin:
thumbScaleAnimation
.
value
,
begin:
thumbScaleAnimation
.
value
,
end:
isExpanding
?
1
:
_kMinThumbScale
,
end:
isExpanding
?
1
:
_kMinThumbScale
,
)
)
,
);
);
thumbScaleController
.
animateWith
(
_kThumbSpringAnimationSimulation
);
thumbScaleController
.
animateWith
(
_kThumbSpringAnimationSimulation
);
}
}
...
...
packages/flutter/lib/src/cupertino/tab_view.dart
View file @
a6832d4d
...
@@ -209,7 +209,7 @@ class _CupertinoTabViewState extends State<CupertinoTabView> {
...
@@ -209,7 +209,7 @@ class _CupertinoTabViewState extends State<CupertinoTabView> {
' 3. Otherwise, onGenerateRoute is called. It should return a '
' 3. Otherwise, onGenerateRoute is called. It should return a '
'non-null value for any valid route not handled by "builder" and "routes".
\n
'
'non-null value for any valid route not handled by "builder" and "routes".
\n
'
' 4. Finally if all else fails onUnknownRoute is called.
\n
'
' 4. Finally if all else fails onUnknownRoute is called.
\n
'
'Unfortunately, onUnknownRoute was not set.'
'Unfortunately, onUnknownRoute was not set.'
,
);
);
}
}
return
true
;
return
true
;
...
@@ -221,7 +221,7 @@ class _CupertinoTabViewState extends State<CupertinoTabView> {
...
@@ -221,7 +221,7 @@ class _CupertinoTabViewState extends State<CupertinoTabView> {
'The onUnknownRoute callback returned null.
\n
'
'The onUnknownRoute callback returned null.
\n
'
'When the
$runtimeType
requested the route
$settings
from its '
'When the
$runtimeType
requested the route
$settings
from its '
'onUnknownRoute callback, the callback returned null. Such callbacks '
'onUnknownRoute callback, the callback returned null. Such callbacks '
'must never return null.'
'must never return null.'
,
);
);
}
}
return
true
;
return
true
;
...
...
packages/flutter/lib/src/cupertino/text_field.dart
View file @
a6832d4d
...
@@ -268,7 +268,7 @@ class CupertinoTextField extends StatefulWidget {
...
@@ -268,7 +268,7 @@ class CupertinoTextField extends StatefulWidget {
@Deprecated
(
@Deprecated
(
'Use maxLengthEnforcement parameter which provides more specific '
'Use maxLengthEnforcement parameter which provides more specific '
'behavior related to the maxLength limit. '
'behavior related to the maxLength limit. '
'This feature was deprecated after v1.25.0-5.0.pre.'
'This feature was deprecated after v1.25.0-5.0.pre.'
,
)
)
this
.
maxLengthEnforced
=
true
,
this
.
maxLengthEnforced
=
true
,
this
.
maxLengthEnforcement
,
this
.
maxLengthEnforcement
,
...
@@ -419,7 +419,7 @@ class CupertinoTextField extends StatefulWidget {
...
@@ -419,7 +419,7 @@ class CupertinoTextField extends StatefulWidget {
@Deprecated
(
@Deprecated
(
'Use maxLengthEnforcement parameter which provides more specific '
'Use maxLengthEnforcement parameter which provides more specific '
'behavior related to the maxLength limit. '
'behavior related to the maxLength limit. '
'This feature was deprecated after v1.25.0-5.0.pre.'
'This feature was deprecated after v1.25.0-5.0.pre.'
,
)
)
this
.
maxLengthEnforced
=
true
,
this
.
maxLengthEnforced
=
true
,
this
.
maxLengthEnforcement
,
this
.
maxLengthEnforcement
,
...
@@ -668,7 +668,7 @@ class CupertinoTextField extends StatefulWidget {
...
@@ -668,7 +668,7 @@ class CupertinoTextField extends StatefulWidget {
@Deprecated
(
@Deprecated
(
'Use maxLengthEnforcement parameter which provides more specific '
'Use maxLengthEnforcement parameter which provides more specific '
'behavior related to the maxLength limit. '
'behavior related to the maxLength limit. '
'This feature was deprecated after v1.25.0-5.0.pre.'
'This feature was deprecated after v1.25.0-5.0.pre.'
,
)
)
final
bool
maxLengthEnforced
;
final
bool
maxLengthEnforced
;
...
...
packages/flutter/lib/src/cupertino/text_selection_toolbar.dart
View file @
a6832d4d
...
@@ -295,7 +295,7 @@ class _RenderCupertinoTextSelectionToolbarShape extends RenderShiftedBox {
...
@@ -295,7 +295,7 @@ class _RenderCupertinoTextSelectionToolbarShape extends RenderShiftedBox {
Offset
.
zero
&
child
!.
size
,
Offset
.
zero
&
child
!.
size
,
_clipPath
(),
_clipPath
(),
(
PaintingContext
innerContext
,
Offset
innerOffset
)
=>
innerContext
.
paintChild
(
child
!,
innerOffset
),
(
PaintingContext
innerContext
,
Offset
innerOffset
)
=>
innerContext
.
paintChild
(
child
!,
innerOffset
),
oldLayer:
_clipPathLayer
oldLayer:
_clipPathLayer
,
);
);
}
}
...
...
packages/flutter/lib/src/foundation/_platform_io.dart
View file @
a6832d4d
...
@@ -33,7 +33,7 @@ platform.TargetPlatform get defaultTargetPlatform {
...
@@ -33,7 +33,7 @@ platform.TargetPlatform get defaultTargetPlatform {
throw
FlutterError
(
throw
FlutterError
(
'Unknown platform.
\n
'
'Unknown platform.
\n
'
'
${Platform.operatingSystem}
was not recognized as a target platform. '
'
${Platform.operatingSystem}
was not recognized as a target platform. '
'Consider updating the list of TargetPlatforms to include this platform.'
'Consider updating the list of TargetPlatforms to include this platform.'
,
);
);
}
}
return
result
!;
return
result
!;
...
...
packages/flutter/lib/src/foundation/assertions.dart
View file @
a6832d4d
...
@@ -676,7 +676,7 @@ class FlutterErrorDetails with Diagnosticable {
...
@@ -676,7 +676,7 @@ class FlutterErrorDetails with Diagnosticable {
'provide substantially more information in this error message to help you determine '
'provide substantially more information in this error message to help you determine '
'and fix the underlying cause.
\n
'
'and fix the underlying cause.
\n
'
'In either case, please report this assertion by filing a bug on GitHub:
\n
'
'In either case, please report this assertion by filing a bug on GitHub:
\n
'
' https://github.com/flutter/flutter/issues/new?template=2_bug.md'
' https://github.com/flutter/flutter/issues/new?template=2_bug.md'
,
));
));
}
}
}
}
...
@@ -802,14 +802,14 @@ class FlutterError extends Error with DiagnosticableTreeMixin implements Asserti
...
@@ -802,14 +802,14 @@ class FlutterError extends Error with DiagnosticableTreeMixin implements Asserti
ErrorSummary
(
'FlutterError is missing a summary.'
),
ErrorSummary
(
'FlutterError is missing a summary.'
),
ErrorDescription
(
ErrorDescription
(
'All FlutterError objects should start with a short (one line) '
'All FlutterError objects should start with a short (one line) '
'summary description of the problem that was detected.'
'summary description of the problem that was detected.'
,
),
),
DiagnosticsProperty
<
FlutterError
>(
'Malformed'
,
this
,
expandableValue:
true
,
showSeparator:
false
,
style:
DiagnosticsTreeStyle
.
whitespace
),
DiagnosticsProperty
<
FlutterError
>(
'Malformed'
,
this
,
expandableValue:
true
,
showSeparator:
false
,
style:
DiagnosticsTreeStyle
.
whitespace
),
ErrorDescription
(
ErrorDescription
(
'
\n
This error should still help you solve your problem, '
'
\n
This error should still help you solve your problem, '
'however please also report this malformed error in the '
'however please also report this malformed error in the '
'framework by filing a bug on GitHub:
\n
'
'framework by filing a bug on GitHub:
\n
'
' https://github.com/flutter/flutter/issues/new?template=2_bug.md'
' https://github.com/flutter/flutter/issues/new?template=2_bug.md'
,
),
),
],
],
));
));
...
@@ -821,7 +821,7 @@ class FlutterError extends Error with DiagnosticableTreeMixin implements Asserti
...
@@ -821,7 +821,7 @@ class FlutterError extends Error with DiagnosticableTreeMixin implements Asserti
ErrorDescription
(
ErrorDescription
(
'All FlutterError objects should have only a single short '
'All FlutterError objects should have only a single short '
'(one line) summary description of the problem that was '
'(one line) summary description of the problem that was '
'detected.'
'detected.'
,
),
),
DiagnosticsProperty
<
FlutterError
>(
'Malformed'
,
this
,
expandableValue:
true
,
showSeparator:
false
,
style:
DiagnosticsTreeStyle
.
whitespace
),
DiagnosticsProperty
<
FlutterError
>(
'Malformed'
,
this
,
expandableValue:
true
,
showSeparator:
false
,
style:
DiagnosticsTreeStyle
.
whitespace
),
ErrorDescription
(
'
\n
The malformed error has
${summaries.length}
summaries.'
),
ErrorDescription
(
'
\n
The malformed error has
${summaries.length}
summaries.'
),
...
@@ -835,7 +835,7 @@ class FlutterError extends Error with DiagnosticableTreeMixin implements Asserti
...
@@ -835,7 +835,7 @@ class FlutterError extends Error with DiagnosticableTreeMixin implements Asserti
'
\n
This error should still help you solve your problem, '
'
\n
This error should still help you solve your problem, '
'however please also report this malformed error in the '
'however please also report this malformed error in the '
'framework by filing a bug on GitHub:
\n
'
'framework by filing a bug on GitHub:
\n
'
' https://github.com/flutter/flutter/issues/new?template=2_bug.md'
' https://github.com/flutter/flutter/issues/new?template=2_bug.md'
,
));
));
throw
FlutterError
.
fromParts
(
message
);
throw
FlutterError
.
fromParts
(
message
);
}
}
...
@@ -1065,7 +1065,7 @@ class FlutterError extends Error with DiagnosticableTreeMixin implements Asserti
...
@@ -1065,7 +1065,7 @@ class FlutterError extends Error with DiagnosticableTreeMixin implements Asserti
final
List
<
String
>
where
=
<
String
>[
final
List
<
String
>
where
=
<
String
>[
for
(
MapEntry
<
String
,
int
>
entry
in
removedPackagesAndClasses
.
entries
)
for
(
MapEntry
<
String
,
int
>
entry
in
removedPackagesAndClasses
.
entries
)
if
(
entry
.
value
>
0
)
if
(
entry
.
value
>
0
)
entry
.
key
entry
.
key
,
]..
sort
();
]..
sort
();
if
(
skipped
==
1
)
{
if
(
skipped
==
1
)
{
result
.
add
(
'(elided one frame from
${where.single}
)'
);
result
.
add
(
'(elided one frame from
${where.single}
)'
);
...
...
packages/flutter/lib/src/foundation/change_notifier.dart
View file @
a6832d4d
...
@@ -116,7 +116,7 @@ class ChangeNotifier implements Listenable {
...
@@ -116,7 +116,7 @@ class ChangeNotifier implements Listenable {
if
(
_listeners
==
null
)
{
if
(
_listeners
==
null
)
{
throw
FlutterError
(
throw
FlutterError
(
'A
$runtimeType
was used after being disposed.
\n
'
'A
$runtimeType
was used after being disposed.
\n
'
'Once you have called dispose() on a
$runtimeType
, it can no longer be used.'
'Once you have called dispose() on a
$runtimeType
, it can no longer be used.'
,
);
);
}
}
return
true
;
return
true
;
...
...
packages/flutter/lib/src/foundation/diagnostics.dart
View file @
a6832d4d
...
@@ -786,8 +786,8 @@ class _PrefixedStringBuilder {
...
@@ -786,8 +786,8 @@ class _PrefixedStringBuilder {
_PrefixedStringBuilder
({
_PrefixedStringBuilder
({
required
this
.
prefixLineOne
,
required
this
.
prefixLineOne
,
required
String
?
prefixOtherLines
,
required
String
?
prefixOtherLines
,
this
.
wrapWidth
})
:
this
.
wrapWidth
,
_prefixOtherLines
=
prefixOtherLines
;
})
:
_prefixOtherLines
=
prefixOtherLines
;
/// Prefix to add to the first line.
/// Prefix to add to the first line.
final
String
prefixLineOne
;
final
String
prefixLineOne
;
...
@@ -1124,10 +1124,11 @@ class TextTreeRenderer {
...
@@ -1124,10 +1124,11 @@ class TextTreeRenderer {
return
''
;
return
''
;
}
else
{
}
else
{
return
_debugRender
(
return
_debugRender
(
node
,
node
,
prefixLineOne:
prefixLineOne
,
prefixLineOne:
prefixLineOne
,
prefixOtherLines:
prefixOtherLines
,
prefixOtherLines:
prefixOtherLines
,
parentConfiguration:
parentConfiguration
);
parentConfiguration:
parentConfiguration
,
);
}
}
}
}
...
@@ -1246,7 +1247,7 @@ class TextTreeRenderer {
...
@@ -1246,7 +1247,7 @@ class TextTreeRenderer {
}
}
final
Iterable
<
DiagnosticsNode
>
propertiesIterable
=
node
.
getProperties
().
where
(
final
Iterable
<
DiagnosticsNode
>
propertiesIterable
=
node
.
getProperties
().
where
(
(
DiagnosticsNode
n
)
=>
!
n
.
isFiltered
(
_minLevel
)
(
DiagnosticsNode
n
)
=>
!
n
.
isFiltered
(
_minLevel
)
,
);
);
List
<
DiagnosticsNode
>
properties
;
List
<
DiagnosticsNode
>
properties
;
if
(
_maxDescendentsTruncatableNode
>=
0
&&
node
.
allowTruncate
)
{
if
(
_maxDescendentsTruncatableNode
>=
0
&&
node
.
allowTruncate
)
{
...
@@ -1657,8 +1658,7 @@ abstract class DiagnosticsNode {
...
@@ -1657,8 +1658,7 @@ abstract class DiagnosticsNode {
assert
(
minLevel
!=
null
);
assert
(
minLevel
!=
null
);
assert
(()
{
assert
(()
{
if
(
_isSingleLine
(
style
))
{
if
(
_isSingleLine
(
style
))
{
result
=
toStringDeep
(
result
=
toStringDeep
(
parentConfiguration:
parentConfiguration
,
minLevel:
minLevel
);
parentConfiguration:
parentConfiguration
,
minLevel:
minLevel
);
}
else
{
}
else
{
final
String
description
=
toDescription
(
parentConfiguration:
parentConfiguration
)!;
final
String
description
=
toDescription
(
parentConfiguration:
parentConfiguration
)!;
...
...
packages/flutter/lib/src/gestures/long_press.dart
View file @
a6832d4d
...
@@ -429,8 +429,7 @@ class LongPressGestureRecognizer extends PrimaryPointerGestureRecognizer {
...
@@ -429,8 +429,7 @@ class LongPressGestureRecognizer extends PrimaryPointerGestureRecognizer {
globalPosition:
_longPressOrigin
!.
global
,
globalPosition:
_longPressOrigin
!.
global
,
localPosition:
_longPressOrigin
!.
local
,
localPosition:
_longPressOrigin
!.
local
,
);
);
invokeCallback
<
void
>(
invokeCallback
<
void
>(
'onSecondaryLongPressStart'
,
()
=>
onSecondaryLongPressStart
!(
details
));
'onSecondaryLongPressStart'
,
()
=>
onSecondaryLongPressStart
!(
details
));
}
}
if
(
onSecondaryLongPress
!=
null
)
{
if
(
onSecondaryLongPress
!=
null
)
{
invokeCallback
<
void
>(
'onSecondaryLongPress'
,
onSecondaryLongPress
!);
invokeCallback
<
void
>(
'onSecondaryLongPress'
,
onSecondaryLongPress
!);
...
@@ -442,8 +441,7 @@ class LongPressGestureRecognizer extends PrimaryPointerGestureRecognizer {
...
@@ -442,8 +441,7 @@ class LongPressGestureRecognizer extends PrimaryPointerGestureRecognizer {
globalPosition:
_longPressOrigin
!.
global
,
globalPosition:
_longPressOrigin
!.
global
,
localPosition:
_longPressOrigin
!.
local
,
localPosition:
_longPressOrigin
!.
local
,
);
);
invokeCallback
<
void
>(
invokeCallback
<
void
>(
'onTertiaryLongPressStart'
,
()
=>
onTertiaryLongPressStart
!(
details
));
'onTertiaryLongPressStart'
,
()
=>
onTertiaryLongPressStart
!(
details
));
}
}
if
(
onTertiaryLongPress
!=
null
)
{
if
(
onTertiaryLongPress
!=
null
)
{
invokeCallback
<
void
>(
'onTertiaryLongPress'
,
onTertiaryLongPress
!);
invokeCallback
<
void
>(
'onTertiaryLongPress'
,
onTertiaryLongPress
!);
...
...
packages/flutter/lib/src/gestures/pointer_router.dart
View file @
a6832d4d
...
@@ -106,7 +106,7 @@ class PointerRouter {
...
@@ -106,7 +106,7 @@ class PointerRouter {
stack:
stack
,
stack:
stack
,
library
:
'gesture library'
,
library
:
'gesture library'
,
context:
ErrorDescription
(
'while routing a pointer event'
),
context:
ErrorDescription
(
'while routing a pointer event'
),
informationCollector:
collector
informationCollector:
collector
,
));
));
}
}
}
}
...
...
packages/flutter/lib/src/gestures/pointer_signal_resolver.dart
View file @
a6832d4d
...
@@ -210,7 +210,7 @@ class PointerSignalResolver {
...
@@ -210,7 +210,7 @@ class PointerSignalResolver {
stack:
stack
,
stack:
stack
,
library
:
'gesture library'
,
library
:
'gesture library'
,
context:
ErrorDescription
(
'while resolving a PointerSignalEvent'
),
context:
ErrorDescription
(
'while resolving a PointerSignalEvent'
),
informationCollector:
collector
informationCollector:
collector
,
));
));
}
}
_firstRegisteredCallback
=
null
;
_firstRegisteredCallback
=
null
;
...
...
packages/flutter/lib/src/gestures/recognizer.dart
View file @
a6832d4d
...
@@ -194,7 +194,7 @@ abstract class GestureRecognizer extends GestureArenaMember with DiagnosticableT
...
@@ -194,7 +194,7 @@ abstract class GestureRecognizer extends GestureArenaMember with DiagnosticableT
stack:
stack
,
stack:
stack
,
library
:
'gesture'
,
library
:
'gesture'
,
context:
ErrorDescription
(
'while handling a gesture'
),
context:
ErrorDescription
(
'while handling a gesture'
),
informationCollector:
collector
informationCollector:
collector
,
));
));
}
}
return
result
;
return
result
;
...
...
packages/flutter/lib/src/gestures/team.dart
View file @
a6832d4d
...
@@ -141,7 +141,9 @@ class GestureArenaTeam {
...
@@ -141,7 +141,9 @@ class GestureArenaTeam {
/// [OneSequenceGestureRecognizer.team].
/// [OneSequenceGestureRecognizer.team].
GestureArenaEntry
add
(
int
pointer
,
GestureArenaMember
member
)
{
GestureArenaEntry
add
(
int
pointer
,
GestureArenaMember
member
)
{
final
_CombiningGestureArenaMember
combiner
=
_combiners
.
putIfAbsent
(
final
_CombiningGestureArenaMember
combiner
=
_combiners
.
putIfAbsent
(
pointer
,
()
=>
_CombiningGestureArenaMember
(
this
,
pointer
));
pointer
,
()
=>
_CombiningGestureArenaMember
(
this
,
pointer
),
);
return
combiner
.
_add
(
pointer
,
member
);
return
combiner
.
_add
(
pointer
,
member
);
}
}
}
}
packages/flutter/lib/src/gestures/velocity_tracker.dart
View file @
a6832d4d
...
@@ -31,14 +31,12 @@ class Velocity {
...
@@ -31,14 +31,12 @@ class Velocity {
/// Return the difference of two velocities.
/// Return the difference of two velocities.
Velocity
operator
-(
Velocity
other
)
{
Velocity
operator
-(
Velocity
other
)
{
return
Velocity
(
return
Velocity
(
pixelsPerSecond:
pixelsPerSecond
-
other
.
pixelsPerSecond
);
pixelsPerSecond:
pixelsPerSecond
-
other
.
pixelsPerSecond
);
}
}
/// Return the sum of two velocities.
/// Return the sum of two velocities.
Velocity
operator
+(
Velocity
other
)
{
Velocity
operator
+(
Velocity
other
)
{
return
Velocity
(
return
Velocity
(
pixelsPerSecond:
pixelsPerSecond
+
other
.
pixelsPerSecond
);
pixelsPerSecond:
pixelsPerSecond
+
other
.
pixelsPerSecond
);
}
}
/// Return a velocity whose magnitude has been clamped to [minValue]
/// Return a velocity whose magnitude has been clamped to [minValue]
...
@@ -149,7 +147,7 @@ class VelocityTracker {
...
@@ -149,7 +147,7 @@ class VelocityTracker {
/// Create a new velocity tracker for a pointer [kind].
/// Create a new velocity tracker for a pointer [kind].
@Deprecated
(
@Deprecated
(
'Use VelocityTracker.withKind and provide the PointerDeviceKind associated with the gesture being tracked. '
'Use VelocityTracker.withKind and provide the PointerDeviceKind associated with the gesture being tracked. '
'This feature was deprecated after v1.22.0-12.1.pre.'
'This feature was deprecated after v1.22.0-12.1.pre.'
,
)
)
VelocityTracker
([
this
.
kind
=
PointerDeviceKind
.
touch
]);
VelocityTracker
([
this
.
kind
=
PointerDeviceKind
.
touch
]);
...
@@ -304,7 +302,7 @@ class IOSScrollViewFlingVelocityTracker extends VelocityTracker {
...
@@ -304,7 +302,7 @@ class IOSScrollViewFlingVelocityTracker extends VelocityTracker {
return
true
;
return
true
;
throw
FlutterError
(
throw
FlutterError
(
'The position being added (
$position
) has a smaller timestamp (
$time
) '
'The position being added (
$position
) has a smaller timestamp (
$time
) '
'than its predecessor:
$previousPoint
.'
'than its predecessor:
$previousPoint
.'
,
);
);
}());
}());
_index
=
(
_index
+
1
)
%
_sampleSize
;
_index
=
(
_index
+
1
)
%
_sampleSize
;
...
...
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