remove unnecessary .toString() (#103226)
This commit is contained in:
parent
a1a46c96c4
commit
d40ee2149c
@ -160,11 +160,11 @@ class ProcessRunner {
|
|||||||
}
|
}
|
||||||
} on ProcessException catch (e) {
|
} on ProcessException catch (e) {
|
||||||
final String message = 'Running "${commandLine.join(' ')}" in ${workingDirectory.path} '
|
final String message = 'Running "${commandLine.join(' ')}" in ${workingDirectory.path} '
|
||||||
'failed with:\n${e.toString()}';
|
'failed with:\n$e';
|
||||||
throw PreparePackageException(message);
|
throw PreparePackageException(message);
|
||||||
} on ArgumentError catch (e) {
|
} on ArgumentError catch (e) {
|
||||||
final String message = 'Running "${commandLine.join(' ')}" in ${workingDirectory.path} '
|
final String message = 'Running "${commandLine.join(' ')}" in ${workingDirectory.path} '
|
||||||
'failed with:\n${e.toString()}';
|
'failed with:\n$e';
|
||||||
throw PreparePackageException(message);
|
throw PreparePackageException(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1654,7 +1654,7 @@ Future<void> _dartRunTest(String workingDirectory, {
|
|||||||
if (coverage != null)
|
if (coverage != null)
|
||||||
'--coverage=$coverage',
|
'--coverage=$coverage',
|
||||||
if (perTestTimeout != null)
|
if (perTestTimeout != null)
|
||||||
'--timeout=${perTestTimeout.inMilliseconds.toString()}ms',
|
'--timeout=${perTestTimeout.inMilliseconds}ms',
|
||||||
if (testPaths != null)
|
if (testPaths != null)
|
||||||
for (final String testPath in testPaths)
|
for (final String testPath in testPaths)
|
||||||
testPath,
|
testPath,
|
||||||
|
@ -190,11 +190,11 @@ class ProcessRunner {
|
|||||||
}
|
}
|
||||||
} on ProcessException catch (e) {
|
} on ProcessException catch (e) {
|
||||||
final String message = 'Running "${commandLine.join(' ')}" in ${workingDirectory.path} '
|
final String message = 'Running "${commandLine.join(' ')}" in ${workingDirectory.path} '
|
||||||
'failed with:\n${e.toString()}';
|
'failed with:\n$e';
|
||||||
throw UnpublishException(message);
|
throw UnpublishException(message);
|
||||||
} on ArgumentError catch (e) {
|
} on ArgumentError catch (e) {
|
||||||
final String message = 'Running "${commandLine.join(' ')}" in ${workingDirectory.path} '
|
final String message = 'Running "${commandLine.join(' ')}" in ${workingDirectory.path} '
|
||||||
'failed with:\n${e.toString()}';
|
'failed with:\n$e';
|
||||||
throw UnpublishException(message);
|
throw UnpublishException(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,14 +278,14 @@ class Version {
|
|||||||
final String branchX = branchMatch.group(1)!;
|
final String branchX = branchMatch.group(1)!;
|
||||||
if (x != int.tryParse(branchX)) {
|
if (x != int.tryParse(branchX)) {
|
||||||
throw ConductorException(
|
throw ConductorException(
|
||||||
'Parsed version ${toString()} has a different x value than candidate '
|
'Parsed version $this has a different x value than candidate '
|
||||||
'branch $candidateBranch',
|
'branch $candidateBranch',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
final String branchY = branchMatch.group(2)!;
|
final String branchY = branchMatch.group(2)!;
|
||||||
if (y != int.tryParse(branchY)) {
|
if (y != int.tryParse(branchY)) {
|
||||||
throw ConductorException(
|
throw ConductorException(
|
||||||
'Parsed version ${toString()} has a different y value than candidate '
|
'Parsed version $this has a different y value than candidate '
|
||||||
'branch $candidateBranch',
|
'branch $candidateBranch',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -295,7 +295,7 @@ class Version {
|
|||||||
final String branchM = branchMatch.group(3)!;
|
final String branchM = branchMatch.group(3)!;
|
||||||
if (m != int.tryParse(branchM)) {
|
if (m != int.tryParse(branchM)) {
|
||||||
throw ConductorException(
|
throw ConductorException(
|
||||||
'Parsed version ${toString()} has a different m value than candidate '
|
'Parsed version $this has a different m value than candidate '
|
||||||
'branch $candidateBranch with type $type',
|
'branch $candidateBranch with type $type',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -758,7 +758,7 @@ void checkDirectoryNotExists(String directory) {
|
|||||||
void checkCollectionContains<T>(Iterable<T> values, Iterable<T> collection) {
|
void checkCollectionContains<T>(Iterable<T> values, Iterable<T> collection) {
|
||||||
for (final T value in values) {
|
for (final T value in values) {
|
||||||
if (!collection.contains(value)) {
|
if (!collection.contains(value)) {
|
||||||
throw TaskResult.failure('Expected to find `$value` in `${collection.toString()}`.');
|
throw TaskResult.failure('Expected to find `$value` in `$collection`.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
|
|||||||
if (!mounted) {
|
if (!mounted) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
showMessage(context, 'Failed saving ${e.toString()}');
|
showMessage(context, 'Failed saving $e');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -309,6 +309,6 @@ class TouchEventDiff extends StatelessWidget {
|
|||||||
for (int i = 0; i < coords.length; i++) {
|
for (int i = 0; i < coords.length; i++) {
|
||||||
buffer.write('p$i x: ${coords[i]['x']} y: ${coords[i]['y']}, pressure: ${coords[i]['pressure']} ');
|
buffer.write('p$i x: ${coords[i]['x']} y: ${coords[i]['y']}, pressure: ${coords[i]['pressure']} ');
|
||||||
}
|
}
|
||||||
print(buffer.toString());
|
print(buffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ class _IconsDemoCard extends StatelessWidget {
|
|||||||
TableRow _buildIconRow(double size) {
|
TableRow _buildIconRow(double size) {
|
||||||
return TableRow(
|
return TableRow(
|
||||||
children: <Widget> [
|
children: <Widget> [
|
||||||
_centeredText('${size.floor().toString()} ${icon.toString()}'),
|
_centeredText('${size.floor()} $icon'),
|
||||||
_buildIconButton(size, icon, true),
|
_buildIconButton(size, icon, true),
|
||||||
_buildIconButton(size, icon, false),
|
_buildIconButton(size, icon, false),
|
||||||
],
|
],
|
||||||
@ -122,9 +122,9 @@ class _IconsDemoCard extends StatelessWidget {
|
|||||||
children: <TableRow> [
|
children: <TableRow> [
|
||||||
TableRow(
|
TableRow(
|
||||||
children: <Widget> [
|
children: <Widget> [
|
||||||
_centeredText('Size ${icon.toString()}'),
|
_centeredText('Size $icon'),
|
||||||
_centeredText('Enabled ${icon.toString()}'),
|
_centeredText('Enabled $icon'),
|
||||||
_centeredText('Disabled ${icon.toString()}'),
|
_centeredText('Disabled $icon'),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
_buildIconRow(18.0),
|
_buildIconRow(18.0),
|
||||||
|
@ -171,7 +171,7 @@ class MotionEventsBodyState extends State<MotionEventsBody> {
|
|||||||
if (!mounted) {
|
if (!mounted) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
showMessage(context, 'Failed saving ${e.toString()}');
|
showMessage(context, 'Failed saving $e');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -281,6 +281,6 @@ class TouchEventDiff extends StatelessWidget {
|
|||||||
for (int i = 0; i < coords.length; i++) {
|
for (int i = 0; i < coords.length; i++) {
|
||||||
buffer.write('p$i x: ${coords[i]['x']} y: ${coords[i]['y']}, pressure: ${coords[i]['pressure']} ');
|
buffer.write('p$i x: ${coords[i]['x']} y: ${coords[i]['y']}, pressure: ${coords[i]['pressure']} ');
|
||||||
}
|
}
|
||||||
print(buffer.toString());
|
print(buffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -228,12 +228,12 @@ Future<String> runCommand(
|
|||||||
);
|
);
|
||||||
} on ProcessException catch (e) {
|
} on ProcessException catch (e) {
|
||||||
stderr.writeln('Running "${cmd.join(' ')}" in ${workingDirectory.path} '
|
stderr.writeln('Running "${cmd.join(' ')}" in ${workingDirectory.path} '
|
||||||
'failed with:\n${e.toString()}');
|
'failed with:\n$e');
|
||||||
exitCode = 2;
|
exitCode = 2;
|
||||||
return utf8.decode(stdoutOutput);
|
return utf8.decode(stdoutOutput);
|
||||||
} on ArgumentError catch (e) {
|
} on ArgumentError catch (e) {
|
||||||
stderr.writeln('Running "${cmd.join(' ')}" in ${workingDirectory.path} '
|
stderr.writeln('Running "${cmd.join(' ')}" in ${workingDirectory.path} '
|
||||||
'failed with:\n${e.toString()}');
|
'failed with:\n$e');
|
||||||
exitCode = 3;
|
exitCode = 3;
|
||||||
return utf8.decode(stdoutOutput);
|
return utf8.decode(stdoutOutput);
|
||||||
}
|
}
|
||||||
|
@ -149,6 +149,6 @@ abstract class TokenTemplate {
|
|||||||
|
|
||||||
/// Generate a [TextTheme] text style name for the given component token.
|
/// Generate a [TextTheme] text style name for the given component token.
|
||||||
String textStyle(String componentToken) {
|
String textStyle(String componentToken) {
|
||||||
return '$textThemePrefix${tokens["$componentToken.text-style"]!.toString()}';
|
return '$textThemePrefix${tokens["$componentToken.text-style"]}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -419,7 +419,7 @@ void _generateIconDemo(File demoFilePath, Map<String, String> tokenPairMap) {
|
|||||||
home: Scaffold(
|
home: Scaffold(
|
||||||
body: Wrap(
|
body: Wrap(
|
||||||
children: const [
|
children: const [
|
||||||
${newIconUsages.toString()}
|
$newIconUsages
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -619,7 +619,7 @@ class FlutterErrorDetails with Diagnosticable {
|
|||||||
} else if (exception is Error || exception is Exception) {
|
} else if (exception is Error || exception is Exception) {
|
||||||
longMessage = exception.toString();
|
longMessage = exception.toString();
|
||||||
} else {
|
} else {
|
||||||
longMessage = ' ${exception.toString()}';
|
longMessage = ' $exception';
|
||||||
}
|
}
|
||||||
longMessage = longMessage.trimRight();
|
longMessage = longMessage.trimRight();
|
||||||
if (longMessage.isEmpty)
|
if (longMessage.isEmpty)
|
||||||
|
@ -403,7 +403,7 @@ class _IndicatorPainter extends CustomPainter {
|
|||||||
if (!(rect.size >= insets.collapsedSize)) {
|
if (!(rect.size >= insets.collapsedSize)) {
|
||||||
throw FlutterError(
|
throw FlutterError(
|
||||||
'indicatorPadding insets should be less than Tab Size\n'
|
'indicatorPadding insets should be less than Tab Size\n'
|
||||||
'Rect Size : ${rect.size}, Insets: ${insets.toString()}',
|
'Rect Size : ${rect.size}, Insets: $insets',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return insets.deflateRect(rect);
|
return insets.deflateRect(rect);
|
||||||
|
@ -1975,7 +1975,7 @@ abstract class RenderBox extends RenderObject {
|
|||||||
/// of those functions, call [markNeedsLayout] instead to schedule a layout of
|
/// of those functions, call [markNeedsLayout] instead to schedule a layout of
|
||||||
/// the box.
|
/// the box.
|
||||||
Size get size {
|
Size get size {
|
||||||
assert(hasSize, 'RenderBox was not laid out: ${toString()}');
|
assert(hasSize, 'RenderBox was not laid out: $this');
|
||||||
assert(() {
|
assert(() {
|
||||||
final Size? size = _size;
|
final Size? size = _size;
|
||||||
if (size is _DebugSize) {
|
if (size is _DebugSize) {
|
||||||
|
@ -2829,8 +2829,8 @@ class BuildOwner {
|
|||||||
ErrorSummary('Multiple widgets used the same GlobalKey.'),
|
ErrorSummary('Multiple widgets used the same GlobalKey.'),
|
||||||
ErrorDescription(
|
ErrorDescription(
|
||||||
'The key $key was used by multiple widgets. The parents of those widgets were:\n'
|
'The key $key was used by multiple widgets. The parents of those widgets were:\n'
|
||||||
'- ${older.toString()}\n'
|
'- $older\n'
|
||||||
'- ${newer.toString()}\n'
|
'- $newer\n'
|
||||||
'A GlobalKey can only be specified on one widget at a time in the widget tree.',
|
'A GlobalKey can only be specified on one widget at a time in the widget tree.',
|
||||||
),
|
),
|
||||||
]);
|
]);
|
||||||
@ -2840,7 +2840,7 @@ class BuildOwner {
|
|||||||
ErrorDescription(
|
ErrorDescription(
|
||||||
'The key $key was used by multiple widgets. The parents of those widgets were '
|
'The key $key was used by multiple widgets. The parents of those widgets were '
|
||||||
'different widgets that both had the following description:\n'
|
'different widgets that both had the following description:\n'
|
||||||
' ${parent.toString()}\n'
|
' $parent\n'
|
||||||
'A GlobalKey can only be specified on one widget at a time in the widget tree.',
|
'A GlobalKey can only be specified on one widget at a time in the widget tree.',
|
||||||
),
|
),
|
||||||
]);
|
]);
|
||||||
|
@ -37,7 +37,7 @@ void main() {
|
|||||||
const double delta = 0.005;
|
const double delta = 0.005;
|
||||||
for (double x = 0.0; x < 1.0 - delta; x += delta) {
|
for (double x = 0.0; x < 1.0 - delta; x += delta) {
|
||||||
final double deltaY = curve.transform(x) - curve.transform(x + delta);
|
final double deltaY = curve.transform(x) - curve.transform(x + delta);
|
||||||
assert(deltaY.abs() < delta * maximumSlope, '${curve.toString()} discontinuous at $x');
|
assert(deltaY.abs() < delta * maximumSlope, '$curve discontinuous at $x');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1294,7 +1294,7 @@ void main() {
|
|||||||
Finder counterFinder = find.byType(Text);
|
Finder counterFinder = find.byType(Text);
|
||||||
expect(counterFinder, findsOneWidget);
|
expect(counterFinder, findsOneWidget);
|
||||||
final Text counterWidget = tester.widget(counterFinder);
|
final Text counterWidget = tester.widget(counterFinder);
|
||||||
expect(counterWidget.data, '0/${maxLength.toString()}');
|
expect(counterWidget.data, '0/$maxLength');
|
||||||
|
|
||||||
// When counter, counterText, and buildCounter are set, shows the counter
|
// When counter, counterText, and buildCounter are set, shows the counter
|
||||||
// widget.
|
// widget.
|
||||||
@ -1309,7 +1309,7 @@ void main() {
|
|||||||
required bool isFocused,
|
required bool isFocused,
|
||||||
}) {
|
}) {
|
||||||
return Text(
|
return Text(
|
||||||
'${currentLength.toString()} of ${maxLength.toString()}',
|
'$currentLength of $maxLength',
|
||||||
key: buildCounterKey,
|
key: buildCounterKey,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -4679,7 +4679,7 @@ void main() {
|
|||||||
child: Center(
|
child: Center(
|
||||||
child: TextField(
|
child: TextField(
|
||||||
buildCounter: (BuildContext context, { required int currentLength, int? maxLength, required bool isFocused }) {
|
buildCounter: (BuildContext context, { required int currentLength, int? maxLength, required bool isFocused }) {
|
||||||
return Text('${currentLength.toString()} of ${maxLength.toString()}');
|
return Text('$currentLength of $maxLength');
|
||||||
},
|
},
|
||||||
maxLength: 10,
|
maxLength: 10,
|
||||||
),
|
),
|
||||||
|
@ -645,7 +645,7 @@ void main() {
|
|||||||
child: Center(
|
child: Center(
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
buildCounter: (BuildContext context, { int? currentLength, int? maxLength, bool? isFocused }) {
|
buildCounter: (BuildContext context, { int? currentLength, int? maxLength, bool? isFocused }) {
|
||||||
return Text('${currentLength.toString()} of ${maxLength.toString()}');
|
return Text('$currentLength of $maxLength');
|
||||||
},
|
},
|
||||||
maxLength: 10,
|
maxLength: 10,
|
||||||
),
|
),
|
||||||
|
@ -97,8 +97,8 @@ void main() {
|
|||||||
'semantics: excluded',
|
'semantics: excluded',
|
||||||
'decoration: BoxDecoration(color: Color(0xffffffff))',
|
'decoration: BoxDecoration(color: Color(0xffffffff))',
|
||||||
'textStyle: TextStyle(inherit: true, decoration: TextDecoration.underline)',
|
'textStyle: TextStyle(inherit: true, decoration: TextDecoration.underline)',
|
||||||
'wait duration: ${wait.toString()}',
|
'wait duration: $wait',
|
||||||
'show duration: ${show.toString()}',
|
'show duration: $show',
|
||||||
'triggerMode: $triggerMode',
|
'triggerMode: $triggerMode',
|
||||||
'enableFeedback: true',
|
'enableFeedback: true',
|
||||||
]);
|
]);
|
||||||
|
@ -413,7 +413,7 @@ mixin CommandHandlerFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (text == null) {
|
if (text == null) {
|
||||||
throw UnsupportedError('Type ${widget.runtimeType.toString()} is currently not supported by getText');
|
throw UnsupportedError('Type ${widget.runtimeType} is currently not supported by getText');
|
||||||
}
|
}
|
||||||
|
|
||||||
return GetTextResult(text);
|
return GetTextResult(text);
|
||||||
|
@ -148,7 +148,7 @@ class AndroidApk extends ApplicationPackage implements PrebuiltApplicationPackag
|
|||||||
}
|
}
|
||||||
logger.printError('AndroidManifest.xml is not a valid XML document.');
|
logger.printError('AndroidManifest.xml is not a valid XML document.');
|
||||||
logger.printError('Please check $manifestLocation for errors.');
|
logger.printError('Please check $manifestLocation for errors.');
|
||||||
throwToolExit('XML Parser error message: ${exception.toString()}');
|
throwToolExit('XML Parser error message: $exception');
|
||||||
}
|
}
|
||||||
|
|
||||||
final Iterable<XmlElement> manifests = document.findElements('manifest');
|
final Iterable<XmlElement> manifests = document.findElements('manifest');
|
||||||
|
@ -1265,7 +1265,7 @@ class LocalizationsGenerator {
|
|||||||
final List<String> sortedClassImports = supportedLocales
|
final List<String> sortedClassImports = supportedLocales
|
||||||
.where((LocaleInfo locale) => isBaseClassLocale(locale, locale.languageCode))
|
.where((LocaleInfo locale) => isBaseClassLocale(locale, locale.languageCode))
|
||||||
.map((LocaleInfo locale) {
|
.map((LocaleInfo locale) {
|
||||||
final String library = '${fileName}_${locale.toString()}';
|
final String library = '${fileName}_$locale';
|
||||||
if (useDeferredLoading) {
|
if (useDeferredLoading) {
|
||||||
return "import '$library.$fileExtension' deferred as $library;";
|
return "import '$library.$fileExtension' deferred as $library;";
|
||||||
} else {
|
} else {
|
||||||
|
@ -442,7 +442,7 @@ class AppResourceBundle {
|
|||||||
} on FormatException catch (e) {
|
} on FormatException catch (e) {
|
||||||
throw L10nException(
|
throw L10nException(
|
||||||
'The arb file ${file.path} has the following formatting issue: \n'
|
'The arb file ${file.path} has the following formatting issue: \n'
|
||||||
'${e.toString()}',
|
'$e',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ class FlutterResidentDevtoolsHandler implements ResidentDevtoolsHandler {
|
|||||||
);
|
);
|
||||||
} on Exception catch (e) {
|
} on Exception catch (e) {
|
||||||
_logger.printError(
|
_logger.printError(
|
||||||
'Failed to set DevTools server address: ${e.toString()}. Deep links to'
|
'Failed to set DevTools server address: $e. Deep links to'
|
||||||
' DevTools will not show in Flutter errors.',
|
' DevTools will not show in Flutter errors.',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -215,7 +215,7 @@ class FlutterResidentDevtoolsHandler implements ResidentDevtoolsHandler {
|
|||||||
} on Exception catch (e) {
|
} on Exception catch (e) {
|
||||||
_logger.printError(e.toString());
|
_logger.printError(e.toString());
|
||||||
_logger.printError(
|
_logger.printError(
|
||||||
'Failed to set vm service URI: ${e.toString()}. Deep links to DevTools'
|
'Failed to set vm service URI: $e. Deep links to DevTools'
|
||||||
' will not show in Flutter errors.',
|
' will not show in Flutter errors.',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -245,7 +245,7 @@ flutter:
|
|||||||
flutterProject.directory
|
flutterProject.directory
|
||||||
.childFile('.packages')
|
.childFile('.packages')
|
||||||
.writeAsStringSync(
|
.writeAsStringSync(
|
||||||
'plugin1:${pluginUsingJavaAndNewEmbeddingDir.childDirectory('lib').uri.toString()}\n',
|
'plugin1:${pluginUsingJavaAndNewEmbeddingDir.childDirectory('lib').uri}\n',
|
||||||
mode: FileMode.append,
|
mode: FileMode.append,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -275,7 +275,7 @@ flutter:
|
|||||||
flutterProject.directory
|
flutterProject.directory
|
||||||
.childFile('.packages')
|
.childFile('.packages')
|
||||||
.writeAsStringSync(
|
.writeAsStringSync(
|
||||||
'plugin1:${pluginUsingJavaAndNewEmbeddingDir.childDirectory('lib').uri.toString()}\n',
|
'plugin1:${pluginUsingJavaAndNewEmbeddingDir.childDirectory('lib').uri}\n',
|
||||||
mode: FileMode.append,
|
mode: FileMode.append,
|
||||||
);
|
);
|
||||||
return pluginUsingJavaAndNewEmbeddingDir;
|
return pluginUsingJavaAndNewEmbeddingDir;
|
||||||
@ -305,7 +305,7 @@ flutter:
|
|||||||
flutterProject.directory
|
flutterProject.directory
|
||||||
.childFile('.packages')
|
.childFile('.packages')
|
||||||
.writeAsStringSync(
|
.writeAsStringSync(
|
||||||
'plugin2:${pluginUsingKotlinAndNewEmbeddingDir.childDirectory('lib').uri.toString()}\n',
|
'plugin2:${pluginUsingKotlinAndNewEmbeddingDir.childDirectory('lib').uri}\n',
|
||||||
mode: FileMode.append,
|
mode: FileMode.append,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -333,7 +333,7 @@ flutter:
|
|||||||
flutterProject.directory
|
flutterProject.directory
|
||||||
.childFile('.packages')
|
.childFile('.packages')
|
||||||
.writeAsStringSync(
|
.writeAsStringSync(
|
||||||
'$pluginName:${pluginUsingOldEmbeddingDir.childDirectory('lib').uri.toString()}\n',
|
'$pluginName:${pluginUsingOldEmbeddingDir.childDirectory('lib').uri}\n',
|
||||||
mode: FileMode.append,
|
mode: FileMode.append,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -366,7 +366,7 @@ flutter:
|
|||||||
flutterProject.directory
|
flutterProject.directory
|
||||||
.childFile('.packages')
|
.childFile('.packages')
|
||||||
.writeAsStringSync(
|
.writeAsStringSync(
|
||||||
'plugin4:${pluginUsingJavaAndNewEmbeddingDir.childDirectory('lib').uri.toString()}',
|
'plugin4:${pluginUsingJavaAndNewEmbeddingDir.childDirectory('lib').uri}',
|
||||||
mode: FileMode.append,
|
mode: FileMode.append,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -397,7 +397,7 @@ dependencies:
|
|||||||
flutterProject.directory
|
flutterProject.directory
|
||||||
.childFile('.packages')
|
.childFile('.packages')
|
||||||
.writeAsStringSync(
|
.writeAsStringSync(
|
||||||
'$name:${pluginDirectory.childDirectory('lib').uri.toString()}\n',
|
'$name:${pluginDirectory.childDirectory('lib').uri}\n',
|
||||||
mode: FileMode.append,
|
mode: FileMode.append,
|
||||||
);
|
);
|
||||||
return pluginDirectory;
|
return pluginDirectory;
|
||||||
@ -435,7 +435,7 @@ dependencies:
|
|||||||
flutterProject.directory
|
flutterProject.directory
|
||||||
.childFile('.packages')
|
.childFile('.packages')
|
||||||
.writeAsStringSync(
|
.writeAsStringSync(
|
||||||
'$name:${pluginDirectory.childDirectory('lib').uri.toString()}\n',
|
'$name:${pluginDirectory.childDirectory('lib').uri}\n',
|
||||||
mode: FileMode.append,
|
mode: FileMode.append,
|
||||||
);
|
);
|
||||||
return pluginDirectory;
|
return pluginDirectory;
|
||||||
@ -1076,7 +1076,7 @@ dependencies:
|
|||||||
flutterProject.directory
|
flutterProject.directory
|
||||||
.childFile('.packages')
|
.childFile('.packages')
|
||||||
.writeAsStringSync('''
|
.writeAsStringSync('''
|
||||||
web_plugin_with_nested:${webPluginWithNestedFile.childDirectory('lib').uri.toString()}
|
web_plugin_with_nested:${webPluginWithNestedFile.childDirectory('lib').uri}
|
||||||
''');
|
''');
|
||||||
|
|
||||||
await injectPlugins(flutterProject, webPlatform: true);
|
await injectPlugins(flutterProject, webPlatform: true);
|
||||||
|
@ -39,8 +39,8 @@ void main() {
|
|||||||
'--target-platform=android-arm64',
|
'--target-platform=android-arm64',
|
||||||
], workingDirectory: tempDir.path);
|
], workingDirectory: tempDir.path);
|
||||||
|
|
||||||
printOnFailure('stdout:\n${result.stdout.toString()}');
|
printOnFailure('stdout:\n${result.stdout}');
|
||||||
printOnFailure('stderr:\n${result.stderr.toString()}');
|
printOnFailure('stderr:\n${result.stderr}');
|
||||||
expect(result.exitCode, 0);
|
expect(result.exitCode, 0);
|
||||||
expect(result.stdout.toString(), contains('app-release.aab'));
|
expect(result.stdout.toString(), contains('app-release.aab'));
|
||||||
expect(result.stdout.toString(), contains('Deferred components prebuild validation passed.'));
|
expect(result.stdout.toString(), contains('Deferred components prebuild validation passed.'));
|
||||||
@ -75,8 +75,8 @@ void main() {
|
|||||||
'appbundle',
|
'appbundle',
|
||||||
], workingDirectory: tempDir.path);
|
], workingDirectory: tempDir.path);
|
||||||
|
|
||||||
printOnFailure('stdout:\n${result.stdout.toString()}');
|
printOnFailure('stdout:\n${result.stdout}');
|
||||||
printOnFailure('stderr:\n${result.stderr.toString()}');
|
printOnFailure('stderr:\n${result.stderr}');
|
||||||
expect(result.stdout.toString(), contains('app-release.aab'));
|
expect(result.stdout.toString(), contains('app-release.aab'));
|
||||||
expect(result.stdout.toString(), contains('Deferred components prebuild validation passed.'));
|
expect(result.stdout.toString(), contains('Deferred components prebuild validation passed.'));
|
||||||
expect(result.stdout.toString(), contains('Deferred components gen_snapshot validation passed.'));
|
expect(result.stdout.toString(), contains('Deferred components gen_snapshot validation passed.'));
|
||||||
@ -121,8 +121,8 @@ void main() {
|
|||||||
'--no-deferred-components',
|
'--no-deferred-components',
|
||||||
], workingDirectory: tempDir.path);
|
], workingDirectory: tempDir.path);
|
||||||
|
|
||||||
printOnFailure('stdout:\n${result.stdout.toString()}');
|
printOnFailure('stdout:\n${result.stdout}');
|
||||||
printOnFailure('stderr:\n${result.stderr.toString()}');
|
printOnFailure('stderr:\n${result.stderr}');
|
||||||
expect(result.stdout.toString().contains('app-release.aab'), true);
|
expect(result.stdout.toString().contains('app-release.aab'), true);
|
||||||
expect(result.stdout.toString().contains('Deferred components prebuild validation passed.'), false);
|
expect(result.stdout.toString().contains('Deferred components prebuild validation passed.'), false);
|
||||||
expect(result.stdout.toString().contains('Deferred components gen_snapshot validation passed.'), false);
|
expect(result.stdout.toString().contains('Deferred components gen_snapshot validation passed.'), false);
|
||||||
@ -169,8 +169,8 @@ void main() {
|
|||||||
'--no-validate-deferred-components',
|
'--no-validate-deferred-components',
|
||||||
], workingDirectory: tempDir.path);
|
], workingDirectory: tempDir.path);
|
||||||
|
|
||||||
printOnFailure('stdout:\n${result.stdout.toString()}');
|
printOnFailure('stdout:\n${result.stdout}');
|
||||||
printOnFailure('stderr:\n${result.stderr.toString()}');
|
printOnFailure('stderr:\n${result.stderr}');
|
||||||
expect(result.stdout.toString().contains('app-release.aab'), true);
|
expect(result.stdout.toString().contains('app-release.aab'), true);
|
||||||
expect(result.stdout.toString().contains('Deferred components prebuild validation passed.'), false);
|
expect(result.stdout.toString().contains('Deferred components prebuild validation passed.'), false);
|
||||||
expect(result.stdout.toString().contains('Deferred components gen_snapshot validation passed.'), false);
|
expect(result.stdout.toString().contains('Deferred components gen_snapshot validation passed.'), false);
|
||||||
|
@ -753,7 +753,7 @@ class FlutterRunTestDriver extends FlutterTestDriver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _throwErrorResponse(String message) {
|
void _throwErrorResponse(String message) {
|
||||||
throw Exception('$message\n\n$_lastResponse\n\n${_errorBuffer.toString()}'.trim());
|
throw Exception('$message\n\n$_lastResponse\n\n$_errorBuffer'.trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
final bool spawnDdsInstance;
|
final bool spawnDdsInstance;
|
||||||
|
@ -92,7 +92,7 @@ class Response {
|
|||||||
for (final Failure failure in failureDetails) {
|
for (final Failure failure in failureDetails) {
|
||||||
sb.writeln('Failure in method: ${failure.methodName}');
|
sb.writeln('Failure in method: ${failure.methodName}');
|
||||||
sb.writeln(failure.details);
|
sb.writeln(failure.details);
|
||||||
sb.writeln('end of failure ${failureCount.toString()}\n\n');
|
sb.writeln('end of failure $failureCount\n\n');
|
||||||
failureCount++;
|
failureCount++;
|
||||||
}
|
}
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user