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:
Michael Goderbauer 2024-12-26 16:06:41 -08:00 committed by GitHub
parent 29d0435355
commit 09a585ba1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
40 changed files with 101 additions and 131 deletions

View File

@ -108,8 +108,8 @@ class _RenderBoxSubclassVisitor extends RecursiveAstVisitor<void> {
return;
}
final bool isCallingSuperImplementation = switch (node.parent) {
PropertyAccess(target: SuperExpression()) || MethodInvocation(target: SuperExpression()) =>
true,
PropertyAccess(target: SuperExpression()) ||
MethodInvocation(target: SuperExpression()) => true,
_ => false,
};
if (isCallingSuperImplementation) {

View File

@ -242,8 +242,9 @@ class StartContext extends Context {
return switch (lastVersion.type) {
VersionType.stable => ReleaseType.STABLE_HOTFIX,
VersionType.development || VersionType.gitDescribe || VersionType.latest =>
ReleaseType.STABLE_INITIAL,
VersionType.development ||
VersionType.gitDescribe ||
VersionType.latest => ReleaseType.STABLE_INITIAL,
};
}

View File

@ -141,8 +141,9 @@ class Version {
int? nextN = previousVersion.n;
nextVersionType ??= switch (previousVersion.type) {
VersionType.stable => VersionType.stable,
VersionType.latest || VersionType.gitDescribe || VersionType.development =>
VersionType.development,
VersionType.latest ||
VersionType.gitDescribe ||
VersionType.development => VersionType.development,
};
switch (increment) {

View File

@ -2268,11 +2268,8 @@ class _NavigationBarComponentsTransition {
bottomLargeExpanded = bottomNavBar.largeExpanded,
topLargeExpanded = topNavBar.largeExpanded,
transitionBox =
// paintBounds are based on offset zero so it's ok to expand the Rects.
bottomNavBar
.renderBox
.paintBounds
.expandToInclude(topNavBar.renderBox.paintBounds),
// paintBounds are based on offset zero so it's ok to expand the Rects.
bottomNavBar.renderBox.paintBounds.expandToInclude(topNavBar.renderBox.paintBounds),
forwardDirection = directionality == TextDirection.ltr ? 1.0 : -1.0;
static final Animatable<double> fadeOut = Tween<double>(begin: 1.0, end: 0.0);

View File

@ -96,8 +96,7 @@ class CupertinoTextSelectionToolbarButton extends StatefulWidget {
ContextMenuButtonType.share => localizations.shareButtonLabel,
ContextMenuButtonType.liveTextInput ||
ContextMenuButtonType.delete ||
ContextMenuButtonType.custom =>
'',
ContextMenuButtonType.custom => '',
};
}

View File

@ -1470,8 +1470,7 @@ class TapAndPanGestureRecognizer extends BaseTapAndDragGestureRecognizer {
'This feature was deprecated after v3.9.0-19.0.pre.',
)
/// {@macro flutter.gestures.selectionrecognizers.TapAndPanGestureRecognizer}
class TapAndDragGestureRecognizer
extends BaseTapAndDragGestureRecognizer {
class TapAndDragGestureRecognizer extends BaseTapAndDragGestureRecognizer {
/// Create a gesture recognizer for interactions on a plane.
@Deprecated(
'Use TapAndPanGestureRecognizer instead. '

View File

@ -1022,8 +1022,7 @@ class _AppBarState extends State<AppBar> {
TargetPlatform.android ||
TargetPlatform.fuchsia ||
TargetPlatform.linux ||
TargetPlatform.windows =>
true,
TargetPlatform.windows => true,
TargetPlatform.iOS || TargetPlatform.macOS => null,
},
header: true,

View File

@ -237,12 +237,12 @@ class ElevatedButton extends ButtonStyleButton {
)) {
(null, null) => null,
(_, Color(a: 0.0)) => WidgetStatePropertyAll<Color?>(overlayColor),
(_, final Color color) || (final Color color, _) =>
WidgetStateProperty<Color?>.fromMap(<WidgetState, Color?>{
WidgetState.pressed: color.withOpacity(0.1),
WidgetState.hovered: color.withOpacity(0.08),
WidgetState.focused: color.withOpacity(0.1),
}),
(_, final Color color) ||
(final Color color, _) => WidgetStateProperty<Color?>.fromMap(<WidgetState, Color?>{
WidgetState.pressed: color.withOpacity(0.1),
WidgetState.hovered: color.withOpacity(0.08),
WidgetState.focused: color.withOpacity(0.1),
}),
};
WidgetStateProperty<double>? elevationValue;

View File

@ -302,12 +302,12 @@ class FilledButton extends ButtonStyleButton {
)) {
(null, null) => null,
(_, Color(a: 0.0)) => WidgetStatePropertyAll<Color?>(overlayColor),
(_, final Color color) || (final Color color, _) =>
WidgetStateProperty<Color?>.fromMap(<WidgetState, Color?>{
WidgetState.pressed: color.withOpacity(0.1),
WidgetState.hovered: color.withOpacity(0.08),
WidgetState.focused: color.withOpacity(0.1),
}),
(_, final Color color) ||
(final Color color, _) => WidgetStateProperty<Color?>.fromMap(<WidgetState, Color?>{
WidgetState.pressed: color.withOpacity(0.1),
WidgetState.hovered: color.withOpacity(0.08),
WidgetState.focused: color.withOpacity(0.1),
}),
};
return ButtonStyle(

View File

@ -194,8 +194,7 @@ class _FlexibleSpaceBarState extends State<FlexibleSpaceBar> {
TargetPlatform.android ||
TargetPlatform.fuchsia ||
TargetPlatform.linux ||
TargetPlatform.windows =>
false,
TargetPlatform.windows => false,
TargetPlatform.iOS || TargetPlatform.macOS => true,
};
}

View File

@ -231,12 +231,12 @@ class OutlinedButton extends ButtonStyleButton {
)) {
(null, null) => null,
(_, Color(a: 0.0)) => WidgetStatePropertyAll<Color?>(overlayColor),
(_, final Color color) || (final Color color, _) =>
WidgetStateProperty<Color?>.fromMap(<WidgetState, Color?>{
WidgetState.pressed: color.withOpacity(0.1),
WidgetState.hovered: color.withOpacity(0.08),
WidgetState.focused: color.withOpacity(0.1),
}),
(_, final Color color) ||
(final Color color, _) => WidgetStateProperty<Color?>.fromMap(<WidgetState, Color?>{
WidgetState.pressed: color.withOpacity(0.1),
WidgetState.hovered: color.withOpacity(0.08),
WidgetState.focused: color.withOpacity(0.1),
}),
};
return ButtonStyle(

View File

@ -1204,8 +1204,7 @@ class _PageTransitionsThemeTransitionsState<T> extends State<_PageTransitionsThe
TargetPlatform.fuchsia ||
TargetPlatform.windows ||
TargetPlatform.macOS ||
TargetPlatform.linux =>
const ZoomPageTransitionsBuilder(),
TargetPlatform.linux => const ZoomPageTransitionsBuilder(),
};
return matchingBuilder.buildTransitions<T>(
widget.route,

View File

@ -31,8 +31,7 @@ import 'theme.dart';
/// theme down its subtree.
/// * [ThemeData.progressIndicatorTheme], which describes the defaults for
/// any progress indicators as part of the application's [ThemeData].
class ProgressIndicatorThemeData
with Diagnosticable {
class ProgressIndicatorThemeData with Diagnosticable {
/// Creates the set of properties used to configure [ProgressIndicator] widgets.
const ProgressIndicatorThemeData({
this.color,

View File

@ -399,11 +399,8 @@ class _ReorderableListViewState extends State<ReorderableListView> {
final EdgeInsets startPadding, endPadding, listPadding;
(startPadding, endPadding, listPadding) = switch (widget.scrollDirection) {
Axis.horizontal || Axis.vertical when (start ?? end) == null => (
EdgeInsets.zero,
EdgeInsets.zero,
padding,
),
Axis.horizontal ||
Axis.vertical when (start ?? end) == null => (EdgeInsets.zero, EdgeInsets.zero, padding),
Axis.horizontal => (
padding.copyWith(left: 0),
padding.copyWith(right: 0),

View File

@ -1212,8 +1212,7 @@ class _ScaffoldLayout extends MultiChildLayoutDelegate {
FloatingActionButtonLocation.endTop ||
FloatingActionButtonLocation.miniStartTop ||
FloatingActionButtonLocation.miniCenterTop ||
FloatingActionButtonLocation.miniEndTop =>
false,
FloatingActionButtonLocation.miniEndTop => false,
FloatingActionButtonLocation.startDocked ||
FloatingActionButtonLocation.startFloat ||
FloatingActionButtonLocation.centerDocked ||
@ -1226,8 +1225,7 @@ class _ScaffoldLayout extends MultiChildLayoutDelegate {
FloatingActionButtonLocation.miniCenterDocked ||
FloatingActionButtonLocation.miniCenterFloat ||
FloatingActionButtonLocation.miniEndDocked ||
FloatingActionButtonLocation.miniEndFloat =>
true,
FloatingActionButtonLocation.miniEndFloat => true,
FloatingActionButtonLocation() => true,
};
if (floatingActionButtonRect.size != Size.zero && isSnackBarFloating && showAboveFab) {

View File

@ -1919,8 +1919,9 @@ class _TabBarState extends State<TabBar> {
if (theme.useMaterial3) {
final AlignmentGeometry effectiveAlignment = switch (effectiveTabAlignment) {
TabAlignment.center => Alignment.center,
TabAlignment.start || TabAlignment.startOffset || TabAlignment.fill =>
AlignmentDirectional.centerStart,
TabAlignment.start ||
TabAlignment.startOffset ||
TabAlignment.fill => AlignmentDirectional.centerStart,
};
final Color dividerColor =

View File

@ -243,12 +243,12 @@ class TextButton extends ButtonStyleButton {
)) {
(null, null) => null,
(_, Color(a: 0.0)) => WidgetStatePropertyAll<Color?>(overlayColor),
(_, final Color color) || (final Color color, _) =>
WidgetStateProperty<Color?>.fromMap(<WidgetState, Color?>{
WidgetState.pressed: color.withOpacity(0.1),
WidgetState.hovered: color.withOpacity(0.08),
WidgetState.focused: color.withOpacity(0.1),
}),
(_, final Color color) ||
(final Color color, _) => WidgetStateProperty<Color?>.fromMap(<WidgetState, Color?>{
WidgetState.pressed: color.withOpacity(0.1),
WidgetState.hovered: color.withOpacity(0.08),
WidgetState.focused: color.withOpacity(0.1),
}),
};
return ButtonStyle(

View File

@ -2948,8 +2948,8 @@ class _TimePickerState extends State<_TimePicker> with RestorationMixin {
final Orientation orientation = _orientation.value ?? MediaQuery.orientationOf(context);
final HourFormat timeOfDayHour = hourFormat(of: timeOfDayFormat);
final _HourDialType hourMode = switch (timeOfDayHour) {
HourFormat.HH || HourFormat.H when theme.useMaterial3 =>
_HourDialType.twentyFourHourDoubleRing,
HourFormat.HH ||
HourFormat.H when theme.useMaterial3 => _HourDialType.twentyFourHourDoubleRing,
HourFormat.HH || HourFormat.H => _HourDialType.twentyFourHour,
HourFormat.h => _HourDialType.twelveHour,
};

View File

@ -771,10 +771,12 @@ class TooltipState extends State<Tooltip> with SingleTickerProviderStateMixin {
EdgeInsets _getDefaultPadding() {
return switch (Theme.of(context).platform) {
TargetPlatform.macOS || TargetPlatform.linux || TargetPlatform.windows =>
const EdgeInsets.symmetric(horizontal: 8.0, vertical: 4.0),
TargetPlatform.android || TargetPlatform.fuchsia || TargetPlatform.iOS =>
const EdgeInsets.symmetric(horizontal: 16.0, vertical: 4.0),
TargetPlatform.macOS ||
TargetPlatform.linux ||
TargetPlatform.windows => const EdgeInsets.symmetric(horizontal: 8.0, vertical: 4.0),
TargetPlatform.android ||
TargetPlatform.fuchsia ||
TargetPlatform.iOS => const EdgeInsets.symmetric(horizontal: 16.0, vertical: 4.0),
};
}

View File

@ -396,7 +396,8 @@ class _FlutterLogoPainter extends BoxPainter {
final double finalLeftTextPosition = // position of text in rest position
(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
(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
rect.width / 2.0 - _textBoundingRect.width * scale;
final Offset textOffset = Offset(

View File

@ -139,8 +139,7 @@ class PlaceholderDimensions {
ui.PlaceholderAlignment.bottom ||
ui.PlaceholderAlignment.middle ||
ui.PlaceholderAlignment.aboveBaseline ||
ui.PlaceholderAlignment.belowBaseline =>
'PlaceholderDimensions($size, $alignment)',
ui.PlaceholderAlignment.belowBaseline => 'PlaceholderDimensions($size, $alignment)',
ui.PlaceholderAlignment.baseline =>
'PlaceholderDimensions($size, $alignment($baselineOffset from top))',
};
@ -222,8 +221,7 @@ class WordBoundary extends TextBoundary {
0x000B || // Form Feed
0x000C || // Vertical Feed
0x2028 || // Line Separator
0x2029 =>
true, // Paragraph Separator
0x2029 => true, // Paragraph Separator
_ => false,
};
}
@ -381,8 +379,7 @@ class _TextLayout {
0x0009 => true, // horizontal tab
0x00A0 || // no-break space
0x2007 || // figure space
0x202F =>
false, // narrow no-break space
0x202F => false, // narrow no-break space
_ => _regExpSpaceSeparators.hasMatch(lastCodeUnit),
};

View File

@ -285,8 +285,7 @@ mixin RendererBinding
'This feature was deprecated after v3.10.0-12.0.pre.',
)
// TODO(goderbauer): When this deprecated property is removed also delete the _ReusableRenderView class.
late final RenderView
renderView = _ReusableRenderView(view: platformDispatcher.implicitView!);
late final RenderView renderView = _ReusableRenderView(view: platformDispatcher.implicitView!);
/// Creates the [PipelineOwner] that serves as the root of the pipeline owner
/// tree ([rootPipelineOwner]).

View File

@ -829,8 +829,7 @@ class RenderFlex extends RenderBox
CrossAxisAlignment.start ||
CrossAxisAlignment.center ||
CrossAxisAlignment.end ||
CrossAxisAlignment.stretch =>
false,
CrossAxisAlignment.stretch => false,
};
}
@ -884,8 +883,7 @@ class RenderFlex extends RenderBox
CrossAxisAlignment.start ||
CrossAxisAlignment.center ||
CrossAxisAlignment.end ||
CrossAxisAlignment.baseline =>
false,
CrossAxisAlignment.baseline => false,
};
return switch (_direction) {
Axis.horizontal =>
@ -915,8 +913,7 @@ class RenderFlex extends RenderBox
CrossAxisAlignment.start ||
CrossAxisAlignment.center ||
CrossAxisAlignment.end ||
CrossAxisAlignment.baseline =>
false,
CrossAxisAlignment.baseline => false,
};
return switch (_direction) {
Axis.horizontal => BoxConstraints(

View File

@ -162,8 +162,7 @@ mixin RenderInlineChildrenContainerDefaults
ui.PlaceholderAlignment.belowBaseline ||
ui.PlaceholderAlignment.bottom ||
ui.PlaceholderAlignment.middle ||
ui.PlaceholderAlignment.top =>
null,
ui.PlaceholderAlignment.top => null,
ui.PlaceholderAlignment.baseline => getBaseline(
child,
childConstraints,

View File

@ -1063,8 +1063,7 @@ class RenderTable extends RenderBox {
TableCellVerticalAlignment.middle ||
TableCellVerticalAlignment.bottom ||
TableCellVerticalAlignment.fill ||
TableCellVerticalAlignment.intrinsicHeight =>
null,
TableCellVerticalAlignment.intrinsicHeight => null,
};
if (childBaseline != null && (baselineOffset == null || baselineOffset < childBaseline)) {
baselineOffset = childBaseline;

View File

@ -3961,8 +3961,7 @@ class EditableTextState extends State<EditableText>
TargetPlatform.fuchsia ||
TargetPlatform.linux ||
TargetPlatform.macOS ||
TargetPlatform.windows =>
false,
TargetPlatform.windows => false,
};
bool _isInternalScrollableNotification(BuildContext? notificationContext) {

View File

@ -915,8 +915,8 @@ mixin DirectionalFocusTraversalPolicyMixin on FocusTraversalPolicy {
(FocusNode node) => node.rect != target && node.rect.center.dx <= target.left,
TraversalDirection.right =>
(FocusNode node) => node.rect != target && node.rect.center.dx >= target.right,
TraversalDirection.up || TraversalDirection.down =>
throw ArgumentError('Invalid direction $direction'),
TraversalDirection.up ||
TraversalDirection.down => throw ArgumentError('Invalid direction $direction'),
}).toList();
// Sort all nodes from left to right.
mergeSort<FocusNode>(
@ -941,8 +941,8 @@ mixin DirectionalFocusTraversalPolicyMixin on FocusTraversalPolicy {
(FocusNode node) => node.rect != target && node.rect.center.dy <= target.top,
TraversalDirection.down =>
(FocusNode node) => node.rect != target && node.rect.center.dy >= target.bottom,
TraversalDirection.left || TraversalDirection.right =>
throw ArgumentError('Invalid direction $direction'),
TraversalDirection.left ||
TraversalDirection.right => throw ArgumentError('Invalid direction $direction'),
}).toList();
mergeSort<FocusNode>(
sorted,

View File

@ -104,8 +104,7 @@ class _LayoutBuilderElement<ConstraintType extends Constraints> extends RenderOb
SchedulerPhase.idle || SchedulerPhase.postFrameCallbacks => true,
SchedulerPhase.transientCallbacks ||
SchedulerPhase.midFrameMicrotasks ||
SchedulerPhase.persistentCallbacks =>
false,
SchedulerPhase.persistentCallbacks => false,
};
if (!deferMarkNeedsLayout) {
renderObject.markNeedsLayout();

View File

@ -1027,8 +1027,7 @@ class OverscrollIndicatorNotification extends Notification with ViewportNotifica
/// indicator from showing.
///
/// Defaults to true.
bool
accepted = true;
bool accepted = true;
/// Call this method if the overscroll indicator should be prevented.
void disallowIndicator() {

View File

@ -307,8 +307,7 @@ class SelectableRegion extends StatefulWidget {
TargetPlatform.macOS ||
TargetPlatform.fuchsia ||
TargetPlatform.linux ||
TargetPlatform.windows =>
false,
TargetPlatform.windows => false,
// TODO(bleroux): the share button should be shown on iOS but the share
// functionality requires some changes on the engine side because, on iPad,
// it needs an anchor for the popup.
@ -531,10 +530,8 @@ class SelectableRegionState extends State<SelectableRegion>
void _updateSelectionStatus() {
final SelectionGeometry geometry = _selectionDelegate.value;
final TextSelection selection = switch (geometry.status) {
SelectionStatus.uncollapsed || SelectionStatus.collapsed => const TextSelection(
baseOffset: 0,
extentOffset: 1,
),
SelectionStatus.uncollapsed ||
SelectionStatus.collapsed => const TextSelection(baseOffset: 0, extentOffset: 1),
SelectionStatus.none => const TextSelection.collapsed(offset: 1),
};
textEditingValue = TextEditingValue(text: '__', selection: selection);
@ -3065,8 +3062,8 @@ abstract class MultiSelectableSelectionContainerDelegate extends SelectionContai
if (currentSelectionStartIndex == -1) {
currentSelectionStartIndex =
currentSelectionEndIndex = switch (event.direction) {
SelectionExtendDirection.previousLine || SelectionExtendDirection.backward =>
selectables.length - 1,
SelectionExtendDirection.previousLine ||
SelectionExtendDirection.backward => selectables.length - 1,
SelectionExtendDirection.nextLine || SelectionExtendDirection.forward => 0,
};
}

View File

@ -2310,8 +2310,8 @@ class TextSelectionGestureDetectorBuilder {
case TargetPlatform.android:
if (editableText.widget.stylusHandwritingEnabled) {
final bool stylusEnabled = switch (kind) {
PointerDeviceKind.stylus || PointerDeviceKind.invertedStylus =>
editableText.widget.stylusHandwritingEnabled,
PointerDeviceKind.stylus ||
PointerDeviceKind.invertedStylus => editableText.widget.stylusHandwritingEnabled,
_ => false,
};
if (stylusEnabled) {

View File

@ -1293,8 +1293,8 @@ class _StaticTextRangeFinder extends FinderBase<TextRangeContext> {
@override
String describeMatch(Plurality plurality) {
return switch (plurality) {
Plurality.zero || Plurality.many =>
'non-overlapping TextRanges that match the Pattern "$pattern"',
Plurality.zero ||
Plurality.many => 'non-overlapping TextRanges that match the Pattern "$pattern"',
Plurality.one => 'non-overlapping TextRange that matches the Pattern "$pattern"',
};
}

View File

@ -236,8 +236,7 @@ class KernelSnapshot extends Target {
TargetPlatform.android_arm ||
TargetPlatform.android_arm64 ||
TargetPlatform.android_x64 ||
TargetPlatform.android_x86 =>
'android',
TargetPlatform.android_x86 => 'android',
TargetPlatform.darwin => 'macos',
TargetPlatform.ios => 'ios',
TargetPlatform.linux_arm64 || TargetPlatform.linux_x64 => 'linux',

View File

@ -314,8 +314,7 @@ class IOSDevice extends Device {
/// to connect, wireless devices will have an interface of `usb`/`attached`.
/// This may change after waiting for the device to connect in
/// `waitForDeviceToConnect`.
DeviceConnectionInterface
connectionInterface;
DeviceConnectionInterface connectionInterface;
@override
bool isConnected;

View File

@ -128,10 +128,9 @@ Future<Set<String>> getInstallNamesDylib(File dylibFile) async {
return <String>{
for (final List<String> architectureSection
in parseOtoolArchitectureSections(installNameResult.stdout as String).values)
// For each architecture, a separate install name is reported, which are
// not necessarily the same.
architectureSection
.single,
// For each architecture, a separate install name is reported, which are
// not necessarily the same.
architectureSection.single,
};
}

View File

@ -34,8 +34,7 @@ Analytics getAnalytics({
if ( // Ignore local user branches.
version.startsWith('[user-branch]') ||
// Many CI systems don't do a full git checkout.
version
.endsWith('/unknown') ||
version.endsWith('/unknown') ||
// Ignore bots.
runningOnBot ||
// Ignore when suppressed by FLUTTER_SUPPRESS_ANALYTICS.

View File

@ -149,8 +149,7 @@ class _DefaultUsage implements Usage {
( // Ignore local user branches.
version.startsWith('[user-branch]') ||
// Many CI systems don't do a full git checkout.
version
.endsWith('/unknown') ||
version.endsWith('/unknown') ||
// Ignore bots.
runningOnBot ||
// Ignore when suppressed by FLUTTER_SUPPRESS_ANALYTICS.

View File

@ -335,10 +335,8 @@ void main() {
stringContainsInOrder(<String>[
'package:bar/bar.dart',
if (flutterTester)
// Tests run on host system, so the have the full path on the system.
projectUri
.resolve('build/native_assets/macos/libbar.dylib')
.toFilePath()
// Tests run on host system, so the have the full path on the system.
projectUri.resolve('build/native_assets/macos/libbar.dylib').toFilePath()
else
// Apps are a bundle with the dylibs on their dlopen path.
'bar.framework/bar',
@ -349,10 +347,8 @@ void main() {
stringContainsInOrder(<String>[
'package:buz/buz.dart',
if (flutterTester)
// Tests run on host system, so the have the full path on the system.
projectUri
.resolve('build/native_assets/macos/libbuz.dylib')
.toFilePath()
// Tests run on host system, so the have the full path on the system.
projectUri.resolve('build/native_assets/macos/libbuz.dylib').toFilePath()
else
// Apps are a bundle with the dylibs on their dlopen path.
'buz.framework/buz',

View File

@ -145,8 +145,8 @@ void main() {
stringContainsInOrder(<String>[
'package:bar/bar.dart',
if (flutterTester)
// Tests run on host system, so the have the full path on the system.
projectUri
// Tests run on host system, so the have the full path on the system.
projectUri
.resolve('build/native_assets/$expectedDirectory/bar.dll')
.toFilePath()
.replaceAll(r'\', r'\\') // Undo JSON string escaping.

View File

@ -32,10 +32,12 @@ void main() {
await project.setUpIn(tempDir);
const ProcessManager processManager = LocalProcessManager();
daemonProcess = await processManager.start(
<String>[flutterBin, ...getLocalEngineArguments(), '--show-test-device', 'daemon'],
workingDirectory: tempDir.path,
);
daemonProcess = await processManager.start(<String>[
flutterBin,
...getLocalEngineArguments(),
'--show-test-device',
'daemon',
], workingDirectory: tempDir.path);
final StreamController<String> stdout = StreamController<String>.broadcast();
transformToLines(daemonProcess.stdout).listen((String line) => stdout.add(line));