remove unnecessary .toString() (#103226)

This commit is contained in:
Alexandre Ardhuin
2022-05-07 01:04:13 +02:00
committed by GitHub
parent a1a46c96c4
commit d40ee2149c
29 changed files with 58 additions and 58 deletions

View File

@@ -148,7 +148,7 @@ class AndroidApk extends ApplicationPackage implements PrebuiltApplicationPackag
}
logger.printError('AndroidManifest.xml is not a valid XML document.');
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');

View File

@@ -1265,7 +1265,7 @@ class LocalizationsGenerator {
final List<String> sortedClassImports = supportedLocales
.where((LocaleInfo locale) => isBaseClassLocale(locale, locale.languageCode))
.map((LocaleInfo locale) {
final String library = '${fileName}_${locale.toString()}';
final String library = '${fileName}_$locale';
if (useDeferredLoading) {
return "import '$library.$fileExtension' deferred as $library;";
} else {

View File

@@ -442,7 +442,7 @@ class AppResourceBundle {
} on FormatException catch (e) {
throw L10nException(
'The arb file ${file.path} has the following formatting issue: \n'
'${e.toString()}',
'$e',
);
}

View File

@@ -161,7 +161,7 @@ class FlutterResidentDevtoolsHandler implements ResidentDevtoolsHandler {
);
} on Exception catch (e) {
_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.',
);
}
@@ -215,7 +215,7 @@ class FlutterResidentDevtoolsHandler implements ResidentDevtoolsHandler {
} on Exception catch (e) {
_logger.printError(e.toString());
_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.',
);
}