Unverified Commit 9bca38c5 authored by Alexandre Ardhuin's avatar Alexandre Ardhuin Committed by GitHub

remove unnecessary String.toString() (#81859)

parent e74c15ca
...@@ -66,7 +66,7 @@ import 'stock_strings_es.dart'; ...@@ -66,7 +66,7 @@ import 'stock_strings_es.dart';
/// be consistent with the languages listed in the StockStrings.supportedLocales /// be consistent with the languages listed in the StockStrings.supportedLocales
/// property. /// property.
abstract class StockStrings { abstract class StockStrings {
StockStrings(String locale) : localeName = intl.Intl.canonicalizedLocale(locale.toString()); StockStrings(String locale) : localeName = intl.Intl.canonicalizedLocale(locale);
final String localeName; final String localeName;
......
...@@ -282,7 +282,7 @@ class _SlidersState extends State<_Sliders> { ...@@ -282,7 +282,7 @@ class _SlidersState extends State<_Sliders> {
), ),
), ),
Slider.adaptive( Slider.adaptive(
label: _continuousValue.toStringAsFixed(6).toString(), label: _continuousValue.toStringAsFixed(6),
value: _continuousValue, value: _continuousValue,
min: 0.0, min: 0.0,
max: 100.0, max: 100.0,
......
...@@ -727,7 +727,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin { ...@@ -727,7 +727,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin {
int? lastNonWhitespace; int? lastNonWhitespace;
for (final String currentString in string.characters) { for (final String currentString in string.characters) {
if (!includeWhitespace && if (!includeWhitespace &&
!_isWhitespace(currentString.characters.first.toString().codeUnitAt(0))) { !_isWhitespace(currentString.characters.first.codeUnitAt(0))) {
lastNonWhitespace = count; lastNonWhitespace = count;
} }
if (count + currentString.length >= index) { if (count + currentString.length >= index) {
......
...@@ -376,7 +376,7 @@ class SkiaGoldClient { ...@@ -376,7 +376,7 @@ class SkiaGoldClient {
/// Removes the file extension from the [fileName] to represent the test name /// Removes the file extension from the [fileName] to represent the test name
/// properly. /// properly.
String cleanTestName(String fileName) { String cleanTestName(String fileName) {
return fileName.split(path.extension(fileName.toString()))[0]; return fileName.split(path.extension(fileName))[0];
} }
/// Returns a boolean value to prevent the client from re-authorizing itself /// Returns a boolean value to prevent the client from re-authorizing itself
......
...@@ -64,7 +64,7 @@ class DefaultWebGoldenComparator extends WebGoldenComparator { ...@@ -64,7 +64,7 @@ class DefaultWebGoldenComparator extends WebGoldenComparator {
method: 'POST', method: 'POST',
sendData: json.encode(<String, Object>{ sendData: json.encode(<String, Object>{
'testUri': testUri.toString(), 'testUri': testUri.toString(),
'key': key.toString(), 'key': key,
'width': width.round(), 'width': width.round(),
'height': height.round(), 'height': height.round(),
}), }),
......
...@@ -235,7 +235,7 @@ void updateLocalProperties({ ...@@ -235,7 +235,7 @@ void updateLocalProperties({
buildInfo.buildNumber ?? project.manifest.buildNumber, buildInfo.buildNumber ?? project.manifest.buildNumber,
globals.logger, globals.logger,
); );
changeIfNecessary('flutter.versionCode', buildNumber?.toString()); changeIfNecessary('flutter.versionCode', buildNumber);
} }
if (changed) { if (changed) {
......
...@@ -662,7 +662,7 @@ class DefaultResidentCompiler implements ResidentCompiler { ...@@ -662,7 +662,7 @@ class DefaultResidentCompiler implements ResidentCompiler {
toMultiRootPath(fileUri, fileSystemScheme, fileSystemRoots, _platform.isWindows); toMultiRootPath(fileUri, fileSystemScheme, fileSystemRoots, _platform.isWindows);
} }
_server.stdin.writeln(message); _server.stdin.writeln(message);
_logger.printTrace(message.toString()); _logger.printTrace(message);
} }
_server.stdin.writeln(inputKey); _server.stdin.writeln(inputKey);
_logger.printTrace('<- $inputKey'); _logger.printTrace('<- $inputKey');
......
...@@ -86,7 +86,7 @@ class ProjectBaseConfigurationMigration extends ProjectMigrator { ...@@ -86,7 +86,7 @@ class ProjectBaseConfigurationMigration extends ProjectMigrator {
newProjectContents = newProjectContents.replaceAll(releaseBaseConfigurationOriginal, releaseBaseConfigurationReplacement); newProjectContents = newProjectContents.replaceAll(releaseBaseConfigurationOriginal, releaseBaseConfigurationReplacement);
if (originalProjectContents != newProjectContents) { if (originalProjectContents != newProjectContents) {
logger.printStatus('Project base configurations detected, removing.'); logger.printStatus('Project base configurations detected, removing.');
_xcodeProjectInfoFile.writeAsStringSync(newProjectContents.toString()); _xcodeProjectInfoFile.writeAsStringSync(newProjectContents);
} }
return true; return true;
} }
......
...@@ -130,7 +130,7 @@ class SimControl { ...@@ -130,7 +130,7 @@ class SimControl {
return <String, Map<String, dynamic>>{}; return <String, Map<String, dynamic>>{};
} }
try { try {
final Object decodeResult = json.decode(results.stdout?.toString())[section.name]; final Object decodeResult = json.decode(results.stdout)[section.name];
if (decodeResult is Map<String, dynamic>) { if (decodeResult is Map<String, dynamic>) {
return decodeResult; return decodeResult;
} }
......
...@@ -70,7 +70,7 @@ class CmakeCustomCommandMigration extends ProjectMigrator { ...@@ -70,7 +70,7 @@ class CmakeCustomCommandMigration extends ProjectMigrator {
} }
if (originalProjectContents != newProjectContents) { if (originalProjectContents != newProjectContents) {
logger.printStatus('add_custom_command() missing VERBATIM or FLUTTER_TARGET_PLATFORM, updating.'); logger.printStatus('add_custom_command() missing VERBATIM or FLUTTER_TARGET_PLATFORM, updating.');
_cmakeFile.writeAsStringSync(newProjectContents.toString()); _cmakeFile.writeAsStringSync(newProjectContents);
} }
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment