apply dart_style 3.0.1 (#160875)
dart_style 3.0.1 comes with some minor style fixes: https://github.com/dart-lang/dart_style/blob/main/CHANGELOG.md#301 This PR applies this fixes in bulk across the repository. (Otherwise, the next person touching these files would have been the one updating them to the new format by running the formatter).
This commit is contained in:
parent
29d0435355
commit
09a585ba1d
@ -108,8 +108,8 @@ class _RenderBoxSubclassVisitor extends RecursiveAstVisitor<void> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final bool isCallingSuperImplementation = switch (node.parent) {
|
final bool isCallingSuperImplementation = switch (node.parent) {
|
||||||
PropertyAccess(target: SuperExpression()) || MethodInvocation(target: SuperExpression()) =>
|
PropertyAccess(target: SuperExpression()) ||
|
||||||
true,
|
MethodInvocation(target: SuperExpression()) => true,
|
||||||
_ => false,
|
_ => false,
|
||||||
};
|
};
|
||||||
if (isCallingSuperImplementation) {
|
if (isCallingSuperImplementation) {
|
||||||
|
@ -242,8 +242,9 @@ class StartContext extends Context {
|
|||||||
|
|
||||||
return switch (lastVersion.type) {
|
return switch (lastVersion.type) {
|
||||||
VersionType.stable => ReleaseType.STABLE_HOTFIX,
|
VersionType.stable => ReleaseType.STABLE_HOTFIX,
|
||||||
VersionType.development || VersionType.gitDescribe || VersionType.latest =>
|
VersionType.development ||
|
||||||
ReleaseType.STABLE_INITIAL,
|
VersionType.gitDescribe ||
|
||||||
|
VersionType.latest => ReleaseType.STABLE_INITIAL,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,8 +141,9 @@ class Version {
|
|||||||
int? nextN = previousVersion.n;
|
int? nextN = previousVersion.n;
|
||||||
nextVersionType ??= switch (previousVersion.type) {
|
nextVersionType ??= switch (previousVersion.type) {
|
||||||
VersionType.stable => VersionType.stable,
|
VersionType.stable => VersionType.stable,
|
||||||
VersionType.latest || VersionType.gitDescribe || VersionType.development =>
|
VersionType.latest ||
|
||||||
VersionType.development,
|
VersionType.gitDescribe ||
|
||||||
|
VersionType.development => VersionType.development,
|
||||||
};
|
};
|
||||||
|
|
||||||
switch (increment) {
|
switch (increment) {
|
||||||
|
@ -2268,11 +2268,8 @@ class _NavigationBarComponentsTransition {
|
|||||||
bottomLargeExpanded = bottomNavBar.largeExpanded,
|
bottomLargeExpanded = bottomNavBar.largeExpanded,
|
||||||
topLargeExpanded = topNavBar.largeExpanded,
|
topLargeExpanded = topNavBar.largeExpanded,
|
||||||
transitionBox =
|
transitionBox =
|
||||||
// paintBounds are based on offset zero so it's ok to expand the Rects.
|
// paintBounds are based on offset zero so it's ok to expand the Rects.
|
||||||
bottomNavBar
|
bottomNavBar.renderBox.paintBounds.expandToInclude(topNavBar.renderBox.paintBounds),
|
||||||
.renderBox
|
|
||||||
.paintBounds
|
|
||||||
.expandToInclude(topNavBar.renderBox.paintBounds),
|
|
||||||
forwardDirection = directionality == TextDirection.ltr ? 1.0 : -1.0;
|
forwardDirection = directionality == TextDirection.ltr ? 1.0 : -1.0;
|
||||||
|
|
||||||
static final Animatable<double> fadeOut = Tween<double>(begin: 1.0, end: 0.0);
|
static final Animatable<double> fadeOut = Tween<double>(begin: 1.0, end: 0.0);
|
||||||
|
@ -96,8 +96,7 @@ class CupertinoTextSelectionToolbarButton extends StatefulWidget {
|
|||||||
ContextMenuButtonType.share => localizations.shareButtonLabel,
|
ContextMenuButtonType.share => localizations.shareButtonLabel,
|
||||||
ContextMenuButtonType.liveTextInput ||
|
ContextMenuButtonType.liveTextInput ||
|
||||||
ContextMenuButtonType.delete ||
|
ContextMenuButtonType.delete ||
|
||||||
ContextMenuButtonType.custom =>
|
ContextMenuButtonType.custom => '',
|
||||||
'',
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1470,8 +1470,7 @@ class TapAndPanGestureRecognizer extends BaseTapAndDragGestureRecognizer {
|
|||||||
'This feature was deprecated after v3.9.0-19.0.pre.',
|
'This feature was deprecated after v3.9.0-19.0.pre.',
|
||||||
)
|
)
|
||||||
/// {@macro flutter.gestures.selectionrecognizers.TapAndPanGestureRecognizer}
|
/// {@macro flutter.gestures.selectionrecognizers.TapAndPanGestureRecognizer}
|
||||||
class TapAndDragGestureRecognizer
|
class TapAndDragGestureRecognizer extends BaseTapAndDragGestureRecognizer {
|
||||||
extends BaseTapAndDragGestureRecognizer {
|
|
||||||
/// Create a gesture recognizer for interactions on a plane.
|
/// Create a gesture recognizer for interactions on a plane.
|
||||||
@Deprecated(
|
@Deprecated(
|
||||||
'Use TapAndPanGestureRecognizer instead. '
|
'Use TapAndPanGestureRecognizer instead. '
|
||||||
|
@ -1022,8 +1022,7 @@ class _AppBarState extends State<AppBar> {
|
|||||||
TargetPlatform.android ||
|
TargetPlatform.android ||
|
||||||
TargetPlatform.fuchsia ||
|
TargetPlatform.fuchsia ||
|
||||||
TargetPlatform.linux ||
|
TargetPlatform.linux ||
|
||||||
TargetPlatform.windows =>
|
TargetPlatform.windows => true,
|
||||||
true,
|
|
||||||
TargetPlatform.iOS || TargetPlatform.macOS => null,
|
TargetPlatform.iOS || TargetPlatform.macOS => null,
|
||||||
},
|
},
|
||||||
header: true,
|
header: true,
|
||||||
|
@ -237,12 +237,12 @@ class ElevatedButton extends ButtonStyleButton {
|
|||||||
)) {
|
)) {
|
||||||
(null, null) => null,
|
(null, null) => null,
|
||||||
(_, Color(a: 0.0)) => WidgetStatePropertyAll<Color?>(overlayColor),
|
(_, Color(a: 0.0)) => WidgetStatePropertyAll<Color?>(overlayColor),
|
||||||
(_, final Color color) || (final Color color, _) =>
|
(_, final Color color) ||
|
||||||
WidgetStateProperty<Color?>.fromMap(<WidgetState, Color?>{
|
(final Color color, _) => WidgetStateProperty<Color?>.fromMap(<WidgetState, Color?>{
|
||||||
WidgetState.pressed: color.withOpacity(0.1),
|
WidgetState.pressed: color.withOpacity(0.1),
|
||||||
WidgetState.hovered: color.withOpacity(0.08),
|
WidgetState.hovered: color.withOpacity(0.08),
|
||||||
WidgetState.focused: color.withOpacity(0.1),
|
WidgetState.focused: color.withOpacity(0.1),
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
WidgetStateProperty<double>? elevationValue;
|
WidgetStateProperty<double>? elevationValue;
|
||||||
|
@ -302,12 +302,12 @@ class FilledButton extends ButtonStyleButton {
|
|||||||
)) {
|
)) {
|
||||||
(null, null) => null,
|
(null, null) => null,
|
||||||
(_, Color(a: 0.0)) => WidgetStatePropertyAll<Color?>(overlayColor),
|
(_, Color(a: 0.0)) => WidgetStatePropertyAll<Color?>(overlayColor),
|
||||||
(_, final Color color) || (final Color color, _) =>
|
(_, final Color color) ||
|
||||||
WidgetStateProperty<Color?>.fromMap(<WidgetState, Color?>{
|
(final Color color, _) => WidgetStateProperty<Color?>.fromMap(<WidgetState, Color?>{
|
||||||
WidgetState.pressed: color.withOpacity(0.1),
|
WidgetState.pressed: color.withOpacity(0.1),
|
||||||
WidgetState.hovered: color.withOpacity(0.08),
|
WidgetState.hovered: color.withOpacity(0.08),
|
||||||
WidgetState.focused: color.withOpacity(0.1),
|
WidgetState.focused: color.withOpacity(0.1),
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
return ButtonStyle(
|
return ButtonStyle(
|
||||||
|
@ -194,8 +194,7 @@ class _FlexibleSpaceBarState extends State<FlexibleSpaceBar> {
|
|||||||
TargetPlatform.android ||
|
TargetPlatform.android ||
|
||||||
TargetPlatform.fuchsia ||
|
TargetPlatform.fuchsia ||
|
||||||
TargetPlatform.linux ||
|
TargetPlatform.linux ||
|
||||||
TargetPlatform.windows =>
|
TargetPlatform.windows => false,
|
||||||
false,
|
|
||||||
TargetPlatform.iOS || TargetPlatform.macOS => true,
|
TargetPlatform.iOS || TargetPlatform.macOS => true,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -231,12 +231,12 @@ class OutlinedButton extends ButtonStyleButton {
|
|||||||
)) {
|
)) {
|
||||||
(null, null) => null,
|
(null, null) => null,
|
||||||
(_, Color(a: 0.0)) => WidgetStatePropertyAll<Color?>(overlayColor),
|
(_, Color(a: 0.0)) => WidgetStatePropertyAll<Color?>(overlayColor),
|
||||||
(_, final Color color) || (final Color color, _) =>
|
(_, final Color color) ||
|
||||||
WidgetStateProperty<Color?>.fromMap(<WidgetState, Color?>{
|
(final Color color, _) => WidgetStateProperty<Color?>.fromMap(<WidgetState, Color?>{
|
||||||
WidgetState.pressed: color.withOpacity(0.1),
|
WidgetState.pressed: color.withOpacity(0.1),
|
||||||
WidgetState.hovered: color.withOpacity(0.08),
|
WidgetState.hovered: color.withOpacity(0.08),
|
||||||
WidgetState.focused: color.withOpacity(0.1),
|
WidgetState.focused: color.withOpacity(0.1),
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
return ButtonStyle(
|
return ButtonStyle(
|
||||||
|
@ -1204,8 +1204,7 @@ class _PageTransitionsThemeTransitionsState<T> extends State<_PageTransitionsThe
|
|||||||
TargetPlatform.fuchsia ||
|
TargetPlatform.fuchsia ||
|
||||||
TargetPlatform.windows ||
|
TargetPlatform.windows ||
|
||||||
TargetPlatform.macOS ||
|
TargetPlatform.macOS ||
|
||||||
TargetPlatform.linux =>
|
TargetPlatform.linux => const ZoomPageTransitionsBuilder(),
|
||||||
const ZoomPageTransitionsBuilder(),
|
|
||||||
};
|
};
|
||||||
return matchingBuilder.buildTransitions<T>(
|
return matchingBuilder.buildTransitions<T>(
|
||||||
widget.route,
|
widget.route,
|
||||||
|
@ -31,8 +31,7 @@ import 'theme.dart';
|
|||||||
/// theme down its subtree.
|
/// theme down its subtree.
|
||||||
/// * [ThemeData.progressIndicatorTheme], which describes the defaults for
|
/// * [ThemeData.progressIndicatorTheme], which describes the defaults for
|
||||||
/// any progress indicators as part of the application's [ThemeData].
|
/// any progress indicators as part of the application's [ThemeData].
|
||||||
class ProgressIndicatorThemeData
|
class ProgressIndicatorThemeData with Diagnosticable {
|
||||||
with Diagnosticable {
|
|
||||||
/// Creates the set of properties used to configure [ProgressIndicator] widgets.
|
/// Creates the set of properties used to configure [ProgressIndicator] widgets.
|
||||||
const ProgressIndicatorThemeData({
|
const ProgressIndicatorThemeData({
|
||||||
this.color,
|
this.color,
|
||||||
|
@ -399,11 +399,8 @@ class _ReorderableListViewState extends State<ReorderableListView> {
|
|||||||
|
|
||||||
final EdgeInsets startPadding, endPadding, listPadding;
|
final EdgeInsets startPadding, endPadding, listPadding;
|
||||||
(startPadding, endPadding, listPadding) = switch (widget.scrollDirection) {
|
(startPadding, endPadding, listPadding) = switch (widget.scrollDirection) {
|
||||||
Axis.horizontal || Axis.vertical when (start ?? end) == null => (
|
Axis.horizontal ||
|
||||||
EdgeInsets.zero,
|
Axis.vertical when (start ?? end) == null => (EdgeInsets.zero, EdgeInsets.zero, padding),
|
||||||
EdgeInsets.zero,
|
|
||||||
padding,
|
|
||||||
),
|
|
||||||
Axis.horizontal => (
|
Axis.horizontal => (
|
||||||
padding.copyWith(left: 0),
|
padding.copyWith(left: 0),
|
||||||
padding.copyWith(right: 0),
|
padding.copyWith(right: 0),
|
||||||
|
@ -1212,8 +1212,7 @@ class _ScaffoldLayout extends MultiChildLayoutDelegate {
|
|||||||
FloatingActionButtonLocation.endTop ||
|
FloatingActionButtonLocation.endTop ||
|
||||||
FloatingActionButtonLocation.miniStartTop ||
|
FloatingActionButtonLocation.miniStartTop ||
|
||||||
FloatingActionButtonLocation.miniCenterTop ||
|
FloatingActionButtonLocation.miniCenterTop ||
|
||||||
FloatingActionButtonLocation.miniEndTop =>
|
FloatingActionButtonLocation.miniEndTop => false,
|
||||||
false,
|
|
||||||
FloatingActionButtonLocation.startDocked ||
|
FloatingActionButtonLocation.startDocked ||
|
||||||
FloatingActionButtonLocation.startFloat ||
|
FloatingActionButtonLocation.startFloat ||
|
||||||
FloatingActionButtonLocation.centerDocked ||
|
FloatingActionButtonLocation.centerDocked ||
|
||||||
@ -1226,8 +1225,7 @@ class _ScaffoldLayout extends MultiChildLayoutDelegate {
|
|||||||
FloatingActionButtonLocation.miniCenterDocked ||
|
FloatingActionButtonLocation.miniCenterDocked ||
|
||||||
FloatingActionButtonLocation.miniCenterFloat ||
|
FloatingActionButtonLocation.miniCenterFloat ||
|
||||||
FloatingActionButtonLocation.miniEndDocked ||
|
FloatingActionButtonLocation.miniEndDocked ||
|
||||||
FloatingActionButtonLocation.miniEndFloat =>
|
FloatingActionButtonLocation.miniEndFloat => true,
|
||||||
true,
|
|
||||||
FloatingActionButtonLocation() => true,
|
FloatingActionButtonLocation() => true,
|
||||||
};
|
};
|
||||||
if (floatingActionButtonRect.size != Size.zero && isSnackBarFloating && showAboveFab) {
|
if (floatingActionButtonRect.size != Size.zero && isSnackBarFloating && showAboveFab) {
|
||||||
|
@ -1919,8 +1919,9 @@ class _TabBarState extends State<TabBar> {
|
|||||||
if (theme.useMaterial3) {
|
if (theme.useMaterial3) {
|
||||||
final AlignmentGeometry effectiveAlignment = switch (effectiveTabAlignment) {
|
final AlignmentGeometry effectiveAlignment = switch (effectiveTabAlignment) {
|
||||||
TabAlignment.center => Alignment.center,
|
TabAlignment.center => Alignment.center,
|
||||||
TabAlignment.start || TabAlignment.startOffset || TabAlignment.fill =>
|
TabAlignment.start ||
|
||||||
AlignmentDirectional.centerStart,
|
TabAlignment.startOffset ||
|
||||||
|
TabAlignment.fill => AlignmentDirectional.centerStart,
|
||||||
};
|
};
|
||||||
|
|
||||||
final Color dividerColor =
|
final Color dividerColor =
|
||||||
|
@ -243,12 +243,12 @@ class TextButton extends ButtonStyleButton {
|
|||||||
)) {
|
)) {
|
||||||
(null, null) => null,
|
(null, null) => null,
|
||||||
(_, Color(a: 0.0)) => WidgetStatePropertyAll<Color?>(overlayColor),
|
(_, Color(a: 0.0)) => WidgetStatePropertyAll<Color?>(overlayColor),
|
||||||
(_, final Color color) || (final Color color, _) =>
|
(_, final Color color) ||
|
||||||
WidgetStateProperty<Color?>.fromMap(<WidgetState, Color?>{
|
(final Color color, _) => WidgetStateProperty<Color?>.fromMap(<WidgetState, Color?>{
|
||||||
WidgetState.pressed: color.withOpacity(0.1),
|
WidgetState.pressed: color.withOpacity(0.1),
|
||||||
WidgetState.hovered: color.withOpacity(0.08),
|
WidgetState.hovered: color.withOpacity(0.08),
|
||||||
WidgetState.focused: color.withOpacity(0.1),
|
WidgetState.focused: color.withOpacity(0.1),
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
return ButtonStyle(
|
return ButtonStyle(
|
||||||
|
@ -2948,8 +2948,8 @@ class _TimePickerState extends State<_TimePicker> with RestorationMixin {
|
|||||||
final Orientation orientation = _orientation.value ?? MediaQuery.orientationOf(context);
|
final Orientation orientation = _orientation.value ?? MediaQuery.orientationOf(context);
|
||||||
final HourFormat timeOfDayHour = hourFormat(of: timeOfDayFormat);
|
final HourFormat timeOfDayHour = hourFormat(of: timeOfDayFormat);
|
||||||
final _HourDialType hourMode = switch (timeOfDayHour) {
|
final _HourDialType hourMode = switch (timeOfDayHour) {
|
||||||
HourFormat.HH || HourFormat.H when theme.useMaterial3 =>
|
HourFormat.HH ||
|
||||||
_HourDialType.twentyFourHourDoubleRing,
|
HourFormat.H when theme.useMaterial3 => _HourDialType.twentyFourHourDoubleRing,
|
||||||
HourFormat.HH || HourFormat.H => _HourDialType.twentyFourHour,
|
HourFormat.HH || HourFormat.H => _HourDialType.twentyFourHour,
|
||||||
HourFormat.h => _HourDialType.twelveHour,
|
HourFormat.h => _HourDialType.twelveHour,
|
||||||
};
|
};
|
||||||
|
@ -771,10 +771,12 @@ class TooltipState extends State<Tooltip> with SingleTickerProviderStateMixin {
|
|||||||
|
|
||||||
EdgeInsets _getDefaultPadding() {
|
EdgeInsets _getDefaultPadding() {
|
||||||
return switch (Theme.of(context).platform) {
|
return switch (Theme.of(context).platform) {
|
||||||
TargetPlatform.macOS || TargetPlatform.linux || TargetPlatform.windows =>
|
TargetPlatform.macOS ||
|
||||||
const EdgeInsets.symmetric(horizontal: 8.0, vertical: 4.0),
|
TargetPlatform.linux ||
|
||||||
TargetPlatform.android || TargetPlatform.fuchsia || TargetPlatform.iOS =>
|
TargetPlatform.windows => const EdgeInsets.symmetric(horizontal: 8.0, vertical: 4.0),
|
||||||
const EdgeInsets.symmetric(horizontal: 16.0, vertical: 4.0),
|
TargetPlatform.android ||
|
||||||
|
TargetPlatform.fuchsia ||
|
||||||
|
TargetPlatform.iOS => const EdgeInsets.symmetric(horizontal: 16.0, vertical: 4.0),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -396,7 +396,8 @@ class _FlutterLogoPainter extends BoxPainter {
|
|||||||
final double finalLeftTextPosition = // position of text in rest position
|
final double finalLeftTextPosition = // position of text in rest position
|
||||||
(256.4 / 820.0) *
|
(256.4 / 820.0) *
|
||||||
rect.width - // 256.4 is the distance from the left edge to the left of the F when the whole logo is 820.0 wide
|
rect.width - // 256.4 is the distance from the left edge to the left of the F when the whole logo is 820.0 wide
|
||||||
(32.0 / 350.0) * fontSize; // 32 is the distance from the text bounding box edge to the left edge of the F when the font size is 350
|
(32.0 / 350.0) *
|
||||||
|
fontSize; // 32 is the distance from the text bounding box edge to the left edge of the F when the font size is 350
|
||||||
final double initialLeftTextPosition = // position of text when just starting the animation
|
final double initialLeftTextPosition = // position of text when just starting the animation
|
||||||
rect.width / 2.0 - _textBoundingRect.width * scale;
|
rect.width / 2.0 - _textBoundingRect.width * scale;
|
||||||
final Offset textOffset = Offset(
|
final Offset textOffset = Offset(
|
||||||
|
@ -139,8 +139,7 @@ class PlaceholderDimensions {
|
|||||||
ui.PlaceholderAlignment.bottom ||
|
ui.PlaceholderAlignment.bottom ||
|
||||||
ui.PlaceholderAlignment.middle ||
|
ui.PlaceholderAlignment.middle ||
|
||||||
ui.PlaceholderAlignment.aboveBaseline ||
|
ui.PlaceholderAlignment.aboveBaseline ||
|
||||||
ui.PlaceholderAlignment.belowBaseline =>
|
ui.PlaceholderAlignment.belowBaseline => 'PlaceholderDimensions($size, $alignment)',
|
||||||
'PlaceholderDimensions($size, $alignment)',
|
|
||||||
ui.PlaceholderAlignment.baseline =>
|
ui.PlaceholderAlignment.baseline =>
|
||||||
'PlaceholderDimensions($size, $alignment($baselineOffset from top))',
|
'PlaceholderDimensions($size, $alignment($baselineOffset from top))',
|
||||||
};
|
};
|
||||||
@ -222,8 +221,7 @@ class WordBoundary extends TextBoundary {
|
|||||||
0x000B || // Form Feed
|
0x000B || // Form Feed
|
||||||
0x000C || // Vertical Feed
|
0x000C || // Vertical Feed
|
||||||
0x2028 || // Line Separator
|
0x2028 || // Line Separator
|
||||||
0x2029 =>
|
0x2029 => true, // Paragraph Separator
|
||||||
true, // Paragraph Separator
|
|
||||||
_ => false,
|
_ => false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -381,8 +379,7 @@ class _TextLayout {
|
|||||||
0x0009 => true, // horizontal tab
|
0x0009 => true, // horizontal tab
|
||||||
0x00A0 || // no-break space
|
0x00A0 || // no-break space
|
||||||
0x2007 || // figure space
|
0x2007 || // figure space
|
||||||
0x202F =>
|
0x202F => false, // narrow no-break space
|
||||||
false, // narrow no-break space
|
|
||||||
_ => _regExpSpaceSeparators.hasMatch(lastCodeUnit),
|
_ => _regExpSpaceSeparators.hasMatch(lastCodeUnit),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -285,8 +285,7 @@ mixin RendererBinding
|
|||||||
'This feature was deprecated after v3.10.0-12.0.pre.',
|
'This feature was deprecated after v3.10.0-12.0.pre.',
|
||||||
)
|
)
|
||||||
// TODO(goderbauer): When this deprecated property is removed also delete the _ReusableRenderView class.
|
// TODO(goderbauer): When this deprecated property is removed also delete the _ReusableRenderView class.
|
||||||
late final RenderView
|
late final RenderView renderView = _ReusableRenderView(view: platformDispatcher.implicitView!);
|
||||||
renderView = _ReusableRenderView(view: platformDispatcher.implicitView!);
|
|
||||||
|
|
||||||
/// Creates the [PipelineOwner] that serves as the root of the pipeline owner
|
/// Creates the [PipelineOwner] that serves as the root of the pipeline owner
|
||||||
/// tree ([rootPipelineOwner]).
|
/// tree ([rootPipelineOwner]).
|
||||||
|
@ -829,8 +829,7 @@ class RenderFlex extends RenderBox
|
|||||||
CrossAxisAlignment.start ||
|
CrossAxisAlignment.start ||
|
||||||
CrossAxisAlignment.center ||
|
CrossAxisAlignment.center ||
|
||||||
CrossAxisAlignment.end ||
|
CrossAxisAlignment.end ||
|
||||||
CrossAxisAlignment.stretch =>
|
CrossAxisAlignment.stretch => false,
|
||||||
false,
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -884,8 +883,7 @@ class RenderFlex extends RenderBox
|
|||||||
CrossAxisAlignment.start ||
|
CrossAxisAlignment.start ||
|
||||||
CrossAxisAlignment.center ||
|
CrossAxisAlignment.center ||
|
||||||
CrossAxisAlignment.end ||
|
CrossAxisAlignment.end ||
|
||||||
CrossAxisAlignment.baseline =>
|
CrossAxisAlignment.baseline => false,
|
||||||
false,
|
|
||||||
};
|
};
|
||||||
return switch (_direction) {
|
return switch (_direction) {
|
||||||
Axis.horizontal =>
|
Axis.horizontal =>
|
||||||
@ -915,8 +913,7 @@ class RenderFlex extends RenderBox
|
|||||||
CrossAxisAlignment.start ||
|
CrossAxisAlignment.start ||
|
||||||
CrossAxisAlignment.center ||
|
CrossAxisAlignment.center ||
|
||||||
CrossAxisAlignment.end ||
|
CrossAxisAlignment.end ||
|
||||||
CrossAxisAlignment.baseline =>
|
CrossAxisAlignment.baseline => false,
|
||||||
false,
|
|
||||||
};
|
};
|
||||||
return switch (_direction) {
|
return switch (_direction) {
|
||||||
Axis.horizontal => BoxConstraints(
|
Axis.horizontal => BoxConstraints(
|
||||||
|
@ -162,8 +162,7 @@ mixin RenderInlineChildrenContainerDefaults
|
|||||||
ui.PlaceholderAlignment.belowBaseline ||
|
ui.PlaceholderAlignment.belowBaseline ||
|
||||||
ui.PlaceholderAlignment.bottom ||
|
ui.PlaceholderAlignment.bottom ||
|
||||||
ui.PlaceholderAlignment.middle ||
|
ui.PlaceholderAlignment.middle ||
|
||||||
ui.PlaceholderAlignment.top =>
|
ui.PlaceholderAlignment.top => null,
|
||||||
null,
|
|
||||||
ui.PlaceholderAlignment.baseline => getBaseline(
|
ui.PlaceholderAlignment.baseline => getBaseline(
|
||||||
child,
|
child,
|
||||||
childConstraints,
|
childConstraints,
|
||||||
|
@ -1063,8 +1063,7 @@ class RenderTable extends RenderBox {
|
|||||||
TableCellVerticalAlignment.middle ||
|
TableCellVerticalAlignment.middle ||
|
||||||
TableCellVerticalAlignment.bottom ||
|
TableCellVerticalAlignment.bottom ||
|
||||||
TableCellVerticalAlignment.fill ||
|
TableCellVerticalAlignment.fill ||
|
||||||
TableCellVerticalAlignment.intrinsicHeight =>
|
TableCellVerticalAlignment.intrinsicHeight => null,
|
||||||
null,
|
|
||||||
};
|
};
|
||||||
if (childBaseline != null && (baselineOffset == null || baselineOffset < childBaseline)) {
|
if (childBaseline != null && (baselineOffset == null || baselineOffset < childBaseline)) {
|
||||||
baselineOffset = childBaseline;
|
baselineOffset = childBaseline;
|
||||||
|
@ -3961,8 +3961,7 @@ class EditableTextState extends State<EditableText>
|
|||||||
TargetPlatform.fuchsia ||
|
TargetPlatform.fuchsia ||
|
||||||
TargetPlatform.linux ||
|
TargetPlatform.linux ||
|
||||||
TargetPlatform.macOS ||
|
TargetPlatform.macOS ||
|
||||||
TargetPlatform.windows =>
|
TargetPlatform.windows => false,
|
||||||
false,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
bool _isInternalScrollableNotification(BuildContext? notificationContext) {
|
bool _isInternalScrollableNotification(BuildContext? notificationContext) {
|
||||||
|
@ -915,8 +915,8 @@ mixin DirectionalFocusTraversalPolicyMixin on FocusTraversalPolicy {
|
|||||||
(FocusNode node) => node.rect != target && node.rect.center.dx <= target.left,
|
(FocusNode node) => node.rect != target && node.rect.center.dx <= target.left,
|
||||||
TraversalDirection.right =>
|
TraversalDirection.right =>
|
||||||
(FocusNode node) => node.rect != target && node.rect.center.dx >= target.right,
|
(FocusNode node) => node.rect != target && node.rect.center.dx >= target.right,
|
||||||
TraversalDirection.up || TraversalDirection.down =>
|
TraversalDirection.up ||
|
||||||
throw ArgumentError('Invalid direction $direction'),
|
TraversalDirection.down => throw ArgumentError('Invalid direction $direction'),
|
||||||
}).toList();
|
}).toList();
|
||||||
// Sort all nodes from left to right.
|
// Sort all nodes from left to right.
|
||||||
mergeSort<FocusNode>(
|
mergeSort<FocusNode>(
|
||||||
@ -941,8 +941,8 @@ mixin DirectionalFocusTraversalPolicyMixin on FocusTraversalPolicy {
|
|||||||
(FocusNode node) => node.rect != target && node.rect.center.dy <= target.top,
|
(FocusNode node) => node.rect != target && node.rect.center.dy <= target.top,
|
||||||
TraversalDirection.down =>
|
TraversalDirection.down =>
|
||||||
(FocusNode node) => node.rect != target && node.rect.center.dy >= target.bottom,
|
(FocusNode node) => node.rect != target && node.rect.center.dy >= target.bottom,
|
||||||
TraversalDirection.left || TraversalDirection.right =>
|
TraversalDirection.left ||
|
||||||
throw ArgumentError('Invalid direction $direction'),
|
TraversalDirection.right => throw ArgumentError('Invalid direction $direction'),
|
||||||
}).toList();
|
}).toList();
|
||||||
mergeSort<FocusNode>(
|
mergeSort<FocusNode>(
|
||||||
sorted,
|
sorted,
|
||||||
|
@ -104,8 +104,7 @@ class _LayoutBuilderElement<ConstraintType extends Constraints> extends RenderOb
|
|||||||
SchedulerPhase.idle || SchedulerPhase.postFrameCallbacks => true,
|
SchedulerPhase.idle || SchedulerPhase.postFrameCallbacks => true,
|
||||||
SchedulerPhase.transientCallbacks ||
|
SchedulerPhase.transientCallbacks ||
|
||||||
SchedulerPhase.midFrameMicrotasks ||
|
SchedulerPhase.midFrameMicrotasks ||
|
||||||
SchedulerPhase.persistentCallbacks =>
|
SchedulerPhase.persistentCallbacks => false,
|
||||||
false,
|
|
||||||
};
|
};
|
||||||
if (!deferMarkNeedsLayout) {
|
if (!deferMarkNeedsLayout) {
|
||||||
renderObject.markNeedsLayout();
|
renderObject.markNeedsLayout();
|
||||||
|
@ -1027,8 +1027,7 @@ class OverscrollIndicatorNotification extends Notification with ViewportNotifica
|
|||||||
/// indicator from showing.
|
/// indicator from showing.
|
||||||
///
|
///
|
||||||
/// Defaults to true.
|
/// Defaults to true.
|
||||||
bool
|
bool accepted = true;
|
||||||
accepted = true;
|
|
||||||
|
|
||||||
/// Call this method if the overscroll indicator should be prevented.
|
/// Call this method if the overscroll indicator should be prevented.
|
||||||
void disallowIndicator() {
|
void disallowIndicator() {
|
||||||
|
@ -307,8 +307,7 @@ class SelectableRegion extends StatefulWidget {
|
|||||||
TargetPlatform.macOS ||
|
TargetPlatform.macOS ||
|
||||||
TargetPlatform.fuchsia ||
|
TargetPlatform.fuchsia ||
|
||||||
TargetPlatform.linux ||
|
TargetPlatform.linux ||
|
||||||
TargetPlatform.windows =>
|
TargetPlatform.windows => false,
|
||||||
false,
|
|
||||||
// TODO(bleroux): the share button should be shown on iOS but the share
|
// TODO(bleroux): the share button should be shown on iOS but the share
|
||||||
// functionality requires some changes on the engine side because, on iPad,
|
// functionality requires some changes on the engine side because, on iPad,
|
||||||
// it needs an anchor for the popup.
|
// it needs an anchor for the popup.
|
||||||
@ -531,10 +530,8 @@ class SelectableRegionState extends State<SelectableRegion>
|
|||||||
void _updateSelectionStatus() {
|
void _updateSelectionStatus() {
|
||||||
final SelectionGeometry geometry = _selectionDelegate.value;
|
final SelectionGeometry geometry = _selectionDelegate.value;
|
||||||
final TextSelection selection = switch (geometry.status) {
|
final TextSelection selection = switch (geometry.status) {
|
||||||
SelectionStatus.uncollapsed || SelectionStatus.collapsed => const TextSelection(
|
SelectionStatus.uncollapsed ||
|
||||||
baseOffset: 0,
|
SelectionStatus.collapsed => const TextSelection(baseOffset: 0, extentOffset: 1),
|
||||||
extentOffset: 1,
|
|
||||||
),
|
|
||||||
SelectionStatus.none => const TextSelection.collapsed(offset: 1),
|
SelectionStatus.none => const TextSelection.collapsed(offset: 1),
|
||||||
};
|
};
|
||||||
textEditingValue = TextEditingValue(text: '__', selection: selection);
|
textEditingValue = TextEditingValue(text: '__', selection: selection);
|
||||||
@ -3065,8 +3062,8 @@ abstract class MultiSelectableSelectionContainerDelegate extends SelectionContai
|
|||||||
if (currentSelectionStartIndex == -1) {
|
if (currentSelectionStartIndex == -1) {
|
||||||
currentSelectionStartIndex =
|
currentSelectionStartIndex =
|
||||||
currentSelectionEndIndex = switch (event.direction) {
|
currentSelectionEndIndex = switch (event.direction) {
|
||||||
SelectionExtendDirection.previousLine || SelectionExtendDirection.backward =>
|
SelectionExtendDirection.previousLine ||
|
||||||
selectables.length - 1,
|
SelectionExtendDirection.backward => selectables.length - 1,
|
||||||
SelectionExtendDirection.nextLine || SelectionExtendDirection.forward => 0,
|
SelectionExtendDirection.nextLine || SelectionExtendDirection.forward => 0,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -2310,8 +2310,8 @@ class TextSelectionGestureDetectorBuilder {
|
|||||||
case TargetPlatform.android:
|
case TargetPlatform.android:
|
||||||
if (editableText.widget.stylusHandwritingEnabled) {
|
if (editableText.widget.stylusHandwritingEnabled) {
|
||||||
final bool stylusEnabled = switch (kind) {
|
final bool stylusEnabled = switch (kind) {
|
||||||
PointerDeviceKind.stylus || PointerDeviceKind.invertedStylus =>
|
PointerDeviceKind.stylus ||
|
||||||
editableText.widget.stylusHandwritingEnabled,
|
PointerDeviceKind.invertedStylus => editableText.widget.stylusHandwritingEnabled,
|
||||||
_ => false,
|
_ => false,
|
||||||
};
|
};
|
||||||
if (stylusEnabled) {
|
if (stylusEnabled) {
|
||||||
|
@ -1293,8 +1293,8 @@ class _StaticTextRangeFinder extends FinderBase<TextRangeContext> {
|
|||||||
@override
|
@override
|
||||||
String describeMatch(Plurality plurality) {
|
String describeMatch(Plurality plurality) {
|
||||||
return switch (plurality) {
|
return switch (plurality) {
|
||||||
Plurality.zero || Plurality.many =>
|
Plurality.zero ||
|
||||||
'non-overlapping TextRanges that match the Pattern "$pattern"',
|
Plurality.many => 'non-overlapping TextRanges that match the Pattern "$pattern"',
|
||||||
Plurality.one => 'non-overlapping TextRange that matches the Pattern "$pattern"',
|
Plurality.one => 'non-overlapping TextRange that matches the Pattern "$pattern"',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -236,8 +236,7 @@ class KernelSnapshot extends Target {
|
|||||||
TargetPlatform.android_arm ||
|
TargetPlatform.android_arm ||
|
||||||
TargetPlatform.android_arm64 ||
|
TargetPlatform.android_arm64 ||
|
||||||
TargetPlatform.android_x64 ||
|
TargetPlatform.android_x64 ||
|
||||||
TargetPlatform.android_x86 =>
|
TargetPlatform.android_x86 => 'android',
|
||||||
'android',
|
|
||||||
TargetPlatform.darwin => 'macos',
|
TargetPlatform.darwin => 'macos',
|
||||||
TargetPlatform.ios => 'ios',
|
TargetPlatform.ios => 'ios',
|
||||||
TargetPlatform.linux_arm64 || TargetPlatform.linux_x64 => 'linux',
|
TargetPlatform.linux_arm64 || TargetPlatform.linux_x64 => 'linux',
|
||||||
|
@ -314,8 +314,7 @@ class IOSDevice extends Device {
|
|||||||
/// to connect, wireless devices will have an interface of `usb`/`attached`.
|
/// to connect, wireless devices will have an interface of `usb`/`attached`.
|
||||||
/// This may change after waiting for the device to connect in
|
/// This may change after waiting for the device to connect in
|
||||||
/// `waitForDeviceToConnect`.
|
/// `waitForDeviceToConnect`.
|
||||||
DeviceConnectionInterface
|
DeviceConnectionInterface connectionInterface;
|
||||||
connectionInterface;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool isConnected;
|
bool isConnected;
|
||||||
|
@ -128,10 +128,9 @@ Future<Set<String>> getInstallNamesDylib(File dylibFile) async {
|
|||||||
return <String>{
|
return <String>{
|
||||||
for (final List<String> architectureSection
|
for (final List<String> architectureSection
|
||||||
in parseOtoolArchitectureSections(installNameResult.stdout as String).values)
|
in parseOtoolArchitectureSections(installNameResult.stdout as String).values)
|
||||||
// For each architecture, a separate install name is reported, which are
|
// For each architecture, a separate install name is reported, which are
|
||||||
// not necessarily the same.
|
// not necessarily the same.
|
||||||
architectureSection
|
architectureSection.single,
|
||||||
.single,
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,8 +34,7 @@ Analytics getAnalytics({
|
|||||||
if ( // Ignore local user branches.
|
if ( // Ignore local user branches.
|
||||||
version.startsWith('[user-branch]') ||
|
version.startsWith('[user-branch]') ||
|
||||||
// Many CI systems don't do a full git checkout.
|
// Many CI systems don't do a full git checkout.
|
||||||
version
|
version.endsWith('/unknown') ||
|
||||||
.endsWith('/unknown') ||
|
|
||||||
// Ignore bots.
|
// Ignore bots.
|
||||||
runningOnBot ||
|
runningOnBot ||
|
||||||
// Ignore when suppressed by FLUTTER_SUPPRESS_ANALYTICS.
|
// Ignore when suppressed by FLUTTER_SUPPRESS_ANALYTICS.
|
||||||
|
@ -149,8 +149,7 @@ class _DefaultUsage implements Usage {
|
|||||||
( // Ignore local user branches.
|
( // Ignore local user branches.
|
||||||
version.startsWith('[user-branch]') ||
|
version.startsWith('[user-branch]') ||
|
||||||
// Many CI systems don't do a full git checkout.
|
// Many CI systems don't do a full git checkout.
|
||||||
version
|
version.endsWith('/unknown') ||
|
||||||
.endsWith('/unknown') ||
|
|
||||||
// Ignore bots.
|
// Ignore bots.
|
||||||
runningOnBot ||
|
runningOnBot ||
|
||||||
// Ignore when suppressed by FLUTTER_SUPPRESS_ANALYTICS.
|
// Ignore when suppressed by FLUTTER_SUPPRESS_ANALYTICS.
|
||||||
|
@ -335,10 +335,8 @@ void main() {
|
|||||||
stringContainsInOrder(<String>[
|
stringContainsInOrder(<String>[
|
||||||
'package:bar/bar.dart',
|
'package:bar/bar.dart',
|
||||||
if (flutterTester)
|
if (flutterTester)
|
||||||
// Tests run on host system, so the have the full path on the system.
|
// Tests run on host system, so the have the full path on the system.
|
||||||
projectUri
|
projectUri.resolve('build/native_assets/macos/libbar.dylib').toFilePath()
|
||||||
.resolve('build/native_assets/macos/libbar.dylib')
|
|
||||||
.toFilePath()
|
|
||||||
else
|
else
|
||||||
// Apps are a bundle with the dylibs on their dlopen path.
|
// Apps are a bundle with the dylibs on their dlopen path.
|
||||||
'bar.framework/bar',
|
'bar.framework/bar',
|
||||||
@ -349,10 +347,8 @@ void main() {
|
|||||||
stringContainsInOrder(<String>[
|
stringContainsInOrder(<String>[
|
||||||
'package:buz/buz.dart',
|
'package:buz/buz.dart',
|
||||||
if (flutterTester)
|
if (flutterTester)
|
||||||
// Tests run on host system, so the have the full path on the system.
|
// Tests run on host system, so the have the full path on the system.
|
||||||
projectUri
|
projectUri.resolve('build/native_assets/macos/libbuz.dylib').toFilePath()
|
||||||
.resolve('build/native_assets/macos/libbuz.dylib')
|
|
||||||
.toFilePath()
|
|
||||||
else
|
else
|
||||||
// Apps are a bundle with the dylibs on their dlopen path.
|
// Apps are a bundle with the dylibs on their dlopen path.
|
||||||
'buz.framework/buz',
|
'buz.framework/buz',
|
||||||
|
@ -145,8 +145,8 @@ void main() {
|
|||||||
stringContainsInOrder(<String>[
|
stringContainsInOrder(<String>[
|
||||||
'package:bar/bar.dart',
|
'package:bar/bar.dart',
|
||||||
if (flutterTester)
|
if (flutterTester)
|
||||||
// Tests run on host system, so the have the full path on the system.
|
// Tests run on host system, so the have the full path on the system.
|
||||||
projectUri
|
projectUri
|
||||||
.resolve('build/native_assets/$expectedDirectory/bar.dll')
|
.resolve('build/native_assets/$expectedDirectory/bar.dll')
|
||||||
.toFilePath()
|
.toFilePath()
|
||||||
.replaceAll(r'\', r'\\') // Undo JSON string escaping.
|
.replaceAll(r'\', r'\\') // Undo JSON string escaping.
|
||||||
|
@ -32,10 +32,12 @@ void main() {
|
|||||||
await project.setUpIn(tempDir);
|
await project.setUpIn(tempDir);
|
||||||
|
|
||||||
const ProcessManager processManager = LocalProcessManager();
|
const ProcessManager processManager = LocalProcessManager();
|
||||||
daemonProcess = await processManager.start(
|
daemonProcess = await processManager.start(<String>[
|
||||||
<String>[flutterBin, ...getLocalEngineArguments(), '--show-test-device', 'daemon'],
|
flutterBin,
|
||||||
workingDirectory: tempDir.path,
|
...getLocalEngineArguments(),
|
||||||
);
|
'--show-test-device',
|
||||||
|
'daemon',
|
||||||
|
], workingDirectory: tempDir.path);
|
||||||
|
|
||||||
final StreamController<String> stdout = StreamController<String>.broadcast();
|
final StreamController<String> stdout = StreamController<String>.broadcast();
|
||||||
transformToLines(daemonProcess.stdout).listen((String line) => stdout.add(line));
|
transformToLines(daemonProcess.stdout).listen((String line) => stdout.add(line));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user