change quote to avoid escapes (#50368)
This commit is contained in:
parent
fd1062debd
commit
f15c887c63
@ -11,7 +11,7 @@ const int _kNumWarmUp = 100;
|
||||
|
||||
void main() {
|
||||
final List<String> words = 'Lorem Ipsum is simply dummy text of the printing and'
|
||||
' typesetting industry. Lorem Ipsum has been the industry\'s'
|
||||
" typesetting industry. Lorem Ipsum has been the industry's"
|
||||
' standard dummy text ever since the 1500s, when an unknown'
|
||||
' printer took a galley of type and scrambled it to make a'
|
||||
' type specimen book'.split(' ');
|
||||
|
@ -330,7 +330,7 @@ Future<void> verifyNoTestPackageImports(String workingDirectory) async {
|
||||
assert(count > 0);
|
||||
if (count == 1)
|
||||
return null;
|
||||
return ' $name: uses \'package:test\' $count times.';
|
||||
return " $name: uses 'package:test' $count times.";
|
||||
}
|
||||
if (name.startsWith('packages/flutter_test/')) {
|
||||
// flutter_test has deep ties to package:test
|
||||
@ -341,7 +341,7 @@ Future<void> verifyNoTestPackageImports(String workingDirectory) async {
|
||||
if (count == 1)
|
||||
return null;
|
||||
}
|
||||
return ' $name: uses \'package:test\' directly';
|
||||
return " $name: uses 'package:test' directly";
|
||||
}
|
||||
return null;
|
||||
})
|
||||
@ -354,11 +354,11 @@ Future<void> verifyNoTestPackageImports(String workingDirectory) async {
|
||||
final String s1 = errors.length == 1 ? 's' : '';
|
||||
final String s2 = errors.length == 1 ? '' : 's';
|
||||
exitWithError(<String>[
|
||||
'${bold}The following file$s2 use$s1 \'package:test\' incorrectly:$reset',
|
||||
"${bold}The following file$s2 use$s1 'package:test' incorrectly:$reset",
|
||||
...errors,
|
||||
'Rather than depending on \'package:test\' directly, use one of the shims:',
|
||||
"Rather than depending on 'package:test' directly, use one of the shims:",
|
||||
...shims,
|
||||
'This insulates us from breaking changes in \'package:test\'.'
|
||||
"This insulates us from breaking changes in 'package:test'."
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ Future<bool> run(List<String> arguments) async {
|
||||
if (parsedArguments.rest.isEmpty) {
|
||||
print('Error: No file arguments specified.');
|
||||
} else if (files.isEmpty) {
|
||||
print('Error: File arguments ("${parsedArguments.rest.join("\", \"")}") did not identify any real files.');
|
||||
print('Error: File arguments ("${parsedArguments.rest.join('", "')}") did not identify any real files.');
|
||||
}
|
||||
}
|
||||
return help;
|
||||
|
@ -157,7 +157,7 @@ final ArgParser _argParser = ArgParser()
|
||||
..addFlag(
|
||||
'list',
|
||||
abbr: 'l',
|
||||
help: 'Don\'t actually run the tasks, but list out the tasks that would\n'
|
||||
help: "Don't actually run the tasks, but list out the tasks that would\n"
|
||||
'have been run, in the order they would have run.',
|
||||
)
|
||||
..addOption(
|
||||
|
@ -53,7 +53,7 @@ Future<void> main() async {
|
||||
);
|
||||
});
|
||||
|
||||
const String newFileContent = 'include \':app\'';
|
||||
const String newFileContent = "include ':app'";
|
||||
|
||||
final File settingsGradle = File(path.join(projectDir.path, 'android', 'settings.gradle'));
|
||||
final File newSettingsGradle = File(path.join(projectDir.path, 'android', 'settings_aar.gradle'));
|
||||
|
@ -37,7 +37,7 @@ Future<void> main() async {
|
||||
);
|
||||
});
|
||||
|
||||
section('Delete plugin\'s Android folder');
|
||||
section("Delete plugin's Android folder");
|
||||
|
||||
final File androidFolder = File(path.join(
|
||||
projectDir.path,
|
||||
|
@ -127,7 +127,7 @@ Future<void> main() async {
|
||||
|
||||
final String sharedLibrary = path.join(androidArmSnapshotPath, 'app.so');
|
||||
if (!File(sharedLibrary).existsSync()) {
|
||||
throw TaskResult.failure('Shared library doesn\'t exist');
|
||||
throw TaskResult.failure("Shared library doesn't exist");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -212,7 +212,7 @@ Future<void> main() async {
|
||||
android:name="flutterProjectType"
|
||||
android:value="module" />''')
|
||||
) {
|
||||
return TaskResult.failure('Debug host APK doesn\'t contain metadata: flutterProjectType = module ');
|
||||
return TaskResult.failure("Debug host APK doesn't contain metadata: flutterProjectType = module ");
|
||||
}
|
||||
|
||||
final String analyticsOutput = analyticsOutputFile.readAsStringSync();
|
||||
@ -270,7 +270,7 @@ Future<void> main() async {
|
||||
android:name="flutterProjectType"
|
||||
android:value="module" />''')
|
||||
) {
|
||||
return TaskResult.failure('Release host APK doesn\'t contain metadata: flutterProjectType = module ');
|
||||
return TaskResult.failure("Release host APK doesn't contain metadata: flutterProjectType = module ");
|
||||
}
|
||||
return TaskResult.success(null);
|
||||
} on TaskResult catch (taskResult) {
|
||||
|
@ -170,7 +170,7 @@ public class DummyPluginAClass {
|
||||
File(path.join(exampleApp.path, '.flutter-plugins-dependencies'));
|
||||
|
||||
if (!flutterPluginsDependenciesFile.existsSync()) {
|
||||
return TaskResult.failure('${flutterPluginsDependenciesFile.path} doesn\'t exist');
|
||||
return TaskResult.failure("${flutterPluginsDependenciesFile.path} doesn't exist");
|
||||
}
|
||||
|
||||
final String flutterPluginsDependenciesFileContent = flutterPluginsDependenciesFile.readAsStringSync();
|
||||
|
@ -78,8 +78,8 @@ void main() {
|
||||
|
||||
_findNextMatcherInList(
|
||||
stdout,
|
||||
(String line) => line.startsWith('Running Gradle task \'assembleRelease\'...'),
|
||||
'Running Gradle task \'assembleRelease\'...',
|
||||
(String line) => line.startsWith("Running Gradle task 'assembleRelease'..."),
|
||||
"Running Gradle task 'assembleRelease'...",
|
||||
);
|
||||
|
||||
_findNextMatcherInList(
|
||||
|
@ -225,7 +225,7 @@ class FuchsiaDeviceDiscovery implements DeviceDiscovery {
|
||||
String get _devFinder {
|
||||
final String devFinder = path.join(getArtifactPath(), 'fuchsia', 'tools', 'device-finder');
|
||||
if (!File(devFinder).existsSync()) {
|
||||
throw FileSystemException('Couldn\'t find device-finder at location $devFinder');
|
||||
throw FileSystemException("Couldn't find device-finder at location $devFinder");
|
||||
}
|
||||
return devFinder;
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ Future<void> checkApkContainsClasses(File apk, List<String> classes) async {
|
||||
final ApkExtractor extractor = ApkExtractor(apk);
|
||||
for (final String className in classes) {
|
||||
if (!(await extractor.containsClass(className))) {
|
||||
throw Exception('APK doesn\'t contain class `$className`.');
|
||||
throw Exception("APK doesn't contain class `$className`.");
|
||||
}
|
||||
}
|
||||
extractor.dispose();
|
||||
|
@ -102,7 +102,7 @@ void main(List<String> argList) {
|
||||
_kShowDartPad,
|
||||
defaultsTo: false,
|
||||
negatable: false,
|
||||
help: 'Indicates whether DartPad should be included in the sample\'s '
|
||||
help: "Indicates whether DartPad should be included in the sample's "
|
||||
'final HTML output. This flag only applies when the type parameter is '
|
||||
'"sample".',
|
||||
);
|
||||
|
@ -73,7 +73,7 @@ Future<void> main(List<String> arguments) async {
|
||||
|
||||
final StringBuffer contents = StringBuffer('library temp_doc;\n\n');
|
||||
for (final String libraryRef in libraryRefs()) {
|
||||
contents.writeln('import \'package:$libraryRef\';');
|
||||
contents.writeln("import 'package:$libraryRef';");
|
||||
}
|
||||
File('$kDocsRoot/lib/temp_doc.dart').writeAsStringSync(contents.toString());
|
||||
|
||||
|
@ -52,7 +52,7 @@ void main(List<String> args) {
|
||||
kJustPrint,
|
||||
negatable: false,
|
||||
help:
|
||||
'Don\'t actually roll the dev channel; '
|
||||
"Don't actually roll the dev channel; "
|
||||
'just print the would-be version and quit.',
|
||||
);
|
||||
argParser.addFlag(kYes, negatable: false, abbr: 'y', help: 'Skip the confirmation prompt.');
|
||||
|
@ -53,7 +53,7 @@ Future<void> main(List<String> arguments) async {
|
||||
'By default, the tool will generate the supported locales list in '
|
||||
'alphabetical order. Use this flag if you would like to default to '
|
||||
'a different locale. \n\n'
|
||||
'For example, pass in [\'en_US\'] if you would like your app to '
|
||||
"For example, pass in ['en_US'] if you would like your app to "
|
||||
'default to American English if a device supports it.',
|
||||
);
|
||||
|
||||
|
@ -126,7 +126,7 @@ const Set<String> numberFormatsWithNamedParameters = <String>{
|
||||
};
|
||||
|
||||
List<String> generateIntlMethodArgs(Message message) {
|
||||
final List<String> methodArgs = <String>['name: \'${message.resourceId}\''];
|
||||
final List<String> methodArgs = <String>["name: '${message.resourceId}'"];
|
||||
if (message.description != null)
|
||||
methodArgs.add('desc: ${generateString(message.description)}');
|
||||
if (message.placeholders.isNotEmpty) {
|
||||
@ -159,7 +159,7 @@ String generateDateFormattingLogic(Message message) {
|
||||
'the "${placeholder.type}" type. To properly resolve for the right '
|
||||
'${placeholder.type} format, the "format" attribute needs to be set '
|
||||
'to determine which DateFormat to use. \n'
|
||||
'Check the intl library\'s DateFormat class constructors for allowed '
|
||||
"Check the intl library's DateFormat class constructors for allowed "
|
||||
'date formats.'
|
||||
);
|
||||
}
|
||||
@ -167,7 +167,7 @@ String generateDateFormattingLogic(Message message) {
|
||||
throw L10nException(
|
||||
'Date format "${placeholder.format}" for placeholder '
|
||||
'${placeholder.name} does not have a corresponding DateFormat '
|
||||
'constructor\n. Check the intl library\'s DateFormat class '
|
||||
"constructor\n. Check the intl library's DateFormat class "
|
||||
'constructors for allowed date formats.'
|
||||
);
|
||||
}
|
||||
@ -192,7 +192,7 @@ String generateNumberFormattingLogic(Message message) {
|
||||
throw L10nException(
|
||||
'Number format ${placeholder.format} for the ${placeholder.name} '
|
||||
'placeholder does not have a corresponding NumberFormat constructor.\n'
|
||||
'Check the intl library\'s NumberFormat class constructors for allowed '
|
||||
"Check the intl library's NumberFormat class constructors for allowed "
|
||||
'number formats.'
|
||||
);
|
||||
}
|
||||
@ -584,14 +584,14 @@ class LocalizationsGenerator {
|
||||
arbPathStrings.sort();
|
||||
localeInfoList.sort();
|
||||
supportedLanguageCodes.addAll(localeInfoList.map((LocaleInfo localeInfo) {
|
||||
return '\'${localeInfo.languageCode}\'';
|
||||
return "'${localeInfo.languageCode}'";
|
||||
}));
|
||||
|
||||
if (preferredSupportedLocales != null) {
|
||||
for (final LocaleInfo preferredLocale in preferredSupportedLocales) {
|
||||
if (!localeInfoList.contains(preferredLocale)) {
|
||||
throw L10nException(
|
||||
'The preferred supported locale, \'$preferredLocale\', cannot be '
|
||||
"The preferred supported locale, '$preferredLocale', cannot be "
|
||||
'added. Please make sure that there is a corresponding arb file '
|
||||
'with translations for the locale, or remove the locale from the '
|
||||
'preferred supported locale list if there is no intent to support '
|
||||
@ -631,9 +631,9 @@ class LocalizationsGenerator {
|
||||
final String languageCode = locale.languageCode;
|
||||
final String countryCode = locale.countryCode;
|
||||
|
||||
resultingProperty += '\'$languageCode\'';
|
||||
resultingProperty += "'$languageCode'";
|
||||
if (countryCode != null)
|
||||
resultingProperty += ', \'$countryCode\'';
|
||||
resultingProperty += ", '$countryCode'";
|
||||
resultingProperty += '),\n Locale(';
|
||||
}
|
||||
resultingProperty = resultingProperty.substring(0, resultingProperty.length - '),\n Locale('.length);
|
||||
|
@ -518,7 +518,7 @@ void main() {
|
||||
expect(generator.supportedLocales.contains(LocaleInfo.fromString('am')), false);
|
||||
});
|
||||
|
||||
test('throws when arb file\'s locale could not be determined', () {
|
||||
test("throws when arb file's locale could not be determined", () {
|
||||
fs.currentDirectory.childDirectory('lib').childDirectory('l10n')
|
||||
..createSync(recursive: true)
|
||||
..childFile('app.arb')
|
||||
|
@ -18,7 +18,7 @@ void main(List<String> args) {
|
||||
'help',
|
||||
abbr: 'h',
|
||||
negatable: false,
|
||||
help: 'Display the tool\'s usage instructions and quit.',
|
||||
help: "Display the tool's usage instructions and quit.",
|
||||
);
|
||||
|
||||
parser.addOption(
|
||||
@ -36,7 +36,7 @@ void main(List<String> args) {
|
||||
parser.addOption(
|
||||
'part-of',
|
||||
abbr: 'p',
|
||||
help: 'Library name to add a dart \'part of\' clause for.',
|
||||
help: "Library name to add a dart 'part of' clause for.",
|
||||
);
|
||||
|
||||
parser.addOption(
|
||||
|
@ -88,8 +88,8 @@ class PathAnimation {
|
||||
if (commandType != currentCommandType)
|
||||
throw Exception(
|
||||
'Paths must be built from the same commands in all frames '
|
||||
'command $commandIdx at frame 0 was of type \'$commandType\' '
|
||||
'command $commandIdx at frame $i was of type \'$currentCommandType\''
|
||||
"command $commandIdx at frame 0 was of type '$commandType' "
|
||||
"command $commandIdx at frame $i was of type '$currentCommandType'"
|
||||
);
|
||||
for (int j = 0; j < numPointsInCommand; j += 1)
|
||||
points[j].add(frame.paths[pathIdx].commands[commandIdx].points[j]);
|
||||
@ -529,7 +529,7 @@ final RegExp _pixelsExp = RegExp(r'^([0-9]+)px$');
|
||||
int parsePixels(String pixels) {
|
||||
if (!_pixelsExp.hasMatch(pixels))
|
||||
throw ArgumentError(
|
||||
'illegal pixels expression: \'$pixels\''
|
||||
"illegal pixels expression: '$pixels'"
|
||||
' (the tool currently only support pixel units).');
|
||||
return int.parse(_pixelsExp.firstMatch(pixels).group(1));
|
||||
}
|
||||
@ -540,7 +540,7 @@ String _extractAttr(XmlElement element, String name) {
|
||||
.value;
|
||||
} catch (e) {
|
||||
throw ArgumentError(
|
||||
'Can\'t find a single \'$name\' attributes in ${element.name}, '
|
||||
"Can't find a single '$name' attributes in ${element.name}, "
|
||||
'attributes were: ${element.attributes}'
|
||||
);
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ class _CupertinoAlertDemoState extends State<CupertinoAlertDemo> {
|
||||
'for directions, nearby search results, and estimated travel times.'),
|
||||
actions: <Widget>[
|
||||
CupertinoDialogAction(
|
||||
child: const Text('Don\'t Allow'),
|
||||
child: const Text("Don't Allow"),
|
||||
onPressed: () => Navigator.pop(context, 'Disallow'),
|
||||
),
|
||||
CupertinoDialogAction(
|
||||
|
@ -25,7 +25,7 @@ const String _outlineText =
|
||||
const String _outlineCode = 'buttons_outline';
|
||||
|
||||
const String _dropdownText =
|
||||
'A dropdown button displays a menu that\'s used to select a value from a '
|
||||
"A dropdown button displays a menu that's used to select a value from a "
|
||||
'small set of values. The button displays the current value and a down '
|
||||
'arrow.';
|
||||
|
||||
@ -33,7 +33,7 @@ const String _dropdownCode = 'buttons_dropdown';
|
||||
|
||||
const String _iconText =
|
||||
'IconButtons are appropriate for toggle buttons that allow a single choice '
|
||||
'to be selected or deselected, such as adding or removing an item\'s star.';
|
||||
"to be selected or deselected, such as adding or removing an item's star.";
|
||||
|
||||
const String _iconCode = 'buttons_icon';
|
||||
|
||||
|
@ -124,7 +124,7 @@ class DialogDemoState extends State<DialogDemo> {
|
||||
showDemoDialog<DialogDemoAction>(
|
||||
context: context,
|
||||
child: AlertDialog(
|
||||
title: const Text('Use Google\'s location service?'),
|
||||
title: const Text("Use Google's location service?"),
|
||||
content: Text(
|
||||
_alertWithTitleText,
|
||||
style: dialogTextStyle,
|
||||
|
@ -8,7 +8,7 @@ import '../../gallery/demo.dart';
|
||||
|
||||
const String _checkboxText =
|
||||
'Checkboxes allow the user to select multiple options from a set. '
|
||||
'A normal checkbox\'s value is true or false and a tristate checkbox\'s '
|
||||
"A normal checkbox's value is true or false and a tristate checkbox's "
|
||||
'value can also be null.';
|
||||
|
||||
const String _checkboxCode = 'selectioncontrols_checkbox';
|
||||
|
@ -50,7 +50,7 @@ class _SnackBarDemoState extends State<SnackBarDemo> {
|
||||
label: 'ACTION',
|
||||
onPressed: () {
|
||||
Scaffold.of(context).showSnackBar(SnackBar(
|
||||
content: Text('You pressed snackbar $thisSnackBarIndex\'s action.'),
|
||||
content: Text("You pressed snackbar $thisSnackBarIndex's action."),
|
||||
));
|
||||
},
|
||||
),
|
||||
|
@ -108,7 +108,7 @@ class TextFormFieldDemoState extends State<TextFormFieldDemo> {
|
||||
showInSnackBar('Please fix the errors in red before submitting.');
|
||||
} else {
|
||||
form.save();
|
||||
showInSnackBar('${person.name}\'s phone number is ${person.phoneNumber}');
|
||||
showInSnackBar("${person.name}'s phone number is ${person.phoneNumber}");
|
||||
}
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ class TextFormFieldDemoState extends State<TextFormFieldDemo> {
|
||||
if (passwordField.value == null || passwordField.value.isEmpty)
|
||||
return 'Please enter a password.';
|
||||
if (passwordField.value != value)
|
||||
return 'The passwords don\'t match';
|
||||
return "The passwords don't match";
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -610,7 +610,7 @@ const List<Recipe> kPestoRecipes = <Recipe>[
|
||||
author: 'Ali Connors',
|
||||
ingredientsImagePath: 'food/icons/main.png',
|
||||
ingredientsImagePackage: _kGalleryAssetsPackage,
|
||||
description: 'With this pesto recipe, you can quickly whip up a meal to satisfy your savory needs. And if you\'re feeling festive, you can add bacon to taste.',
|
||||
description: "With this pesto recipe, you can quickly whip up a meal to satisfy your savory needs. And if you're feeling festive, you can add bacon to taste.",
|
||||
imagePath: 'food/pesto_pasta.png',
|
||||
imagePackage: _kGalleryAssetsPackage,
|
||||
ingredients: <RecipeIngredient>[
|
||||
@ -634,7 +634,7 @@ const List<Recipe> kPestoRecipes = <Recipe>[
|
||||
author: 'Sandra Adams',
|
||||
ingredientsImagePath: 'food/icons/main.png',
|
||||
ingredientsImagePackage: _kGalleryAssetsPackage,
|
||||
description: 'Sometimes when you\'re craving some cheer in your life you can jumpstart your day with some cherry pie. Dessert for breakfast is perfectly acceptable.',
|
||||
description: "Sometimes when you're craving some cheer in your life you can jumpstart your day with some cherry pie. Dessert for breakfast is perfectly acceptable.",
|
||||
imagePath: 'food/cherry_pie.png',
|
||||
imagePackage: _kGalleryAssetsPackage,
|
||||
ingredients: <RecipeIngredient>[
|
||||
@ -654,7 +654,7 @@ const List<Recipe> kPestoRecipes = <Recipe>[
|
||||
author: 'Peter Carlsson',
|
||||
ingredientsImagePath: 'food/icons/spicy.png',
|
||||
ingredientsImagePackage: _kGalleryAssetsPackage,
|
||||
description: 'Everyone\'s favorite leafy green is back. Paired with fresh sliced onion, it\'s ready to tackle any dish, whether it be a salad or an egg scramble.',
|
||||
description: "Everyone's favorite leafy green is back. Paired with fresh sliced onion, it's ready to tackle any dish, whether it be a salad or an egg scramble.",
|
||||
imagePath: 'food/spinach_onion_salad.png',
|
||||
imagePackage: _kGalleryAssetsPackage,
|
||||
ingredients: <RecipeIngredient>[
|
||||
@ -694,7 +694,7 @@ const List<Recipe> kPestoRecipes = <Recipe>[
|
||||
author: 'Trevor Hansen',
|
||||
ingredientsImagePath: 'food/icons/quick.png',
|
||||
ingredientsImagePackage: _kGalleryAssetsPackage,
|
||||
description: 'You \'feta\' believe this is a crowd-pleaser! Flaky phyllo pastry surrounds a delicious mixture of spinach and cheeses to create the perfect appetizer.',
|
||||
description: "You 'feta' believe this is a crowd-pleaser! Flaky phyllo pastry surrounds a delicious mixture of spinach and cheeses to create the perfect appetizer.",
|
||||
imagePath: 'food/spanakopita.png',
|
||||
imagePackage: _kGalleryAssetsPackage,
|
||||
ingredients: <RecipeIngredient>[
|
||||
|
@ -77,7 +77,7 @@ class TabbedComponentDemoScaffold extends StatelessWidget {
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return SimpleDialog(
|
||||
title: const Text('Couldn\'t display URL:'),
|
||||
title: const Text("Couldn't display URL:"),
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
|
@ -285,7 +285,7 @@ class CupertinoTextField extends StatefulWidget {
|
||||
assert(minLines == null || minLines > 0),
|
||||
assert(
|
||||
(maxLines == null) || (minLines == null) || (maxLines >= minLines),
|
||||
'minLines can\'t be greater than maxLines',
|
||||
"minLines can't be greater than maxLines",
|
||||
),
|
||||
assert(expands != null),
|
||||
assert(
|
||||
|
@ -82,7 +82,7 @@ class ValueKey<T> extends LocalKey {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
final String valueString = T == String ? '<\'$value\'>' : '<$value>';
|
||||
final String valueString = T == String ? "<'$value'>" : '<$value>';
|
||||
// The crazy on the next line is a workaround for
|
||||
// https://github.com/dart-lang/sdk/issues/33297
|
||||
if (runtimeType == _TypeLiteral<ValueKey<T>>().type)
|
||||
|
@ -31,7 +31,7 @@ bool debugCheckHasMaterial(BuildContext context) {
|
||||
'${context.widget.runtimeType} widgets require a Material '
|
||||
'widget ancestor.\n'
|
||||
'In material design, most widgets are conceptually "printed" on '
|
||||
'a sheet of material. In Flutter\'s material library, that '
|
||||
"a sheet of material. In Flutter's material library, that "
|
||||
'material is represented by the Material widget. It is the '
|
||||
'Material widget that renders ink splashes, for instance. '
|
||||
'Because of this, many material library widgets require that '
|
||||
|
@ -804,7 +804,7 @@ class DropdownButton<T> extends StatefulWidget {
|
||||
items.where((DropdownMenuItem<T> item) {
|
||||
return item.value == value;
|
||||
}).length == 1,
|
||||
'There should be exactly one item with [DropdownButton]\'s value: '
|
||||
"There should be exactly one item with [DropdownButton]'s value: "
|
||||
'$value. \n'
|
||||
'Either zero or 2 or more [DropdownMenuItem]s were detected '
|
||||
'with the same value',
|
||||
@ -1420,7 +1420,7 @@ class DropdownButtonFormField<T> extends FormField<T> {
|
||||
items.where((DropdownMenuItem<T> item) {
|
||||
return item.value == value;
|
||||
}).length == 1,
|
||||
'There should be exactly one item with [DropdownButton]\'s value: '
|
||||
"There should be exactly one item with [DropdownButton]'s value: "
|
||||
'$value. \n'
|
||||
'Either zero or 2 or more [DropdownMenuItem]s were detected '
|
||||
'with the same value',
|
||||
|
@ -37,8 +37,8 @@ class _SaltedKey<S, V> extends LocalKey {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
final String saltString = S == String ? '<\'$salt\'>' : '<$salt>';
|
||||
final String valueString = V == String ? '<\'$value\'>' : '<$value>';
|
||||
final String saltString = S == String ? "<'$salt'>" : '<$salt>';
|
||||
final String valueString = V == String ? "<'$value'>" : '<$value>';
|
||||
return '[$saltString $valueString]';
|
||||
}
|
||||
}
|
||||
|
@ -265,7 +265,7 @@ enum ListTileControlAffinity {
|
||||
/// // ...
|
||||
/// ListTile(
|
||||
/// leading: const Icon(Icons.flight_land),
|
||||
/// title: const Text('Trix\'s airplane'),
|
||||
/// title: const Text("Trix's airplane"),
|
||||
/// subtitle: _act != 2 ? const Text('The airplane is only in Act II.') : null,
|
||||
/// enabled: _act == 2,
|
||||
/// onTap: () { /* react to the tile being tapped */ }
|
||||
|
@ -1001,8 +1001,8 @@ class _TabBarState extends State<TabBar> {
|
||||
assert(() {
|
||||
if (_controller.length != widget.tabs.length) {
|
||||
throw FlutterError(
|
||||
'Controller\'s length property (${_controller.length}) does not match the '
|
||||
'number of tabs (${widget.tabs.length}) present in TabBar\'s tabs property.'
|
||||
"Controller's length property (${_controller.length}) does not match the "
|
||||
"number of tabs (${widget.tabs.length}) present in TabBar's tabs property."
|
||||
);
|
||||
}
|
||||
return true;
|
||||
@ -1326,8 +1326,8 @@ class _TabBarViewState extends State<TabBarView> {
|
||||
assert(() {
|
||||
if (_controller.length != widget.children.length) {
|
||||
throw FlutterError(
|
||||
'Controller\'s length property (${_controller.length}) does not match the '
|
||||
'number of tabs (${widget.children.length}) present in TabBar\'s tabs property.'
|
||||
"Controller's length property (${_controller.length}) does not match the "
|
||||
"number of tabs (${widget.children.length}) present in TabBar's tabs property."
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
@ -358,7 +358,7 @@ class TextField extends StatefulWidget {
|
||||
assert(minLines == null || minLines > 0),
|
||||
assert(
|
||||
(maxLines == null) || (minLines == null) || (maxLines >= minLines),
|
||||
'minLines can\'t be greater than maxLines',
|
||||
"minLines can't be greater than maxLines",
|
||||
),
|
||||
assert(expands != null),
|
||||
assert(
|
||||
|
@ -139,7 +139,7 @@ class TextFormField extends FormField<String> {
|
||||
assert(minLines == null || minLines > 0),
|
||||
assert(
|
||||
(maxLines == null) || (minLines == null) || (maxLines >= minLines),
|
||||
'minLines can\'t be greater than maxLines',
|
||||
"minLines can't be greater than maxLines",
|
||||
),
|
||||
assert(expands != null),
|
||||
assert(
|
||||
|
@ -97,7 +97,7 @@ class BoxDecoration extends Decoration {
|
||||
}) : assert(shape != null),
|
||||
assert(
|
||||
backgroundBlendMode == null || color != null || gradient != null,
|
||||
'backgroundBlendMode applies to BoxDecoration\'s background color or '
|
||||
"backgroundBlendMode applies to BoxDecoration's background color or "
|
||||
'gradient, but no color or gradient was provided.'
|
||||
);
|
||||
|
||||
|
@ -50,7 +50,7 @@ const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor a
|
||||
///
|
||||
/// ```dart
|
||||
/// Text(
|
||||
/// 'Welcome to the present, we\'re running a real nation.',
|
||||
/// "Welcome to the present, we're running a real nation.",
|
||||
/// style: TextStyle(fontStyle: FontStyle.italic),
|
||||
/// )
|
||||
/// ```
|
||||
@ -80,15 +80,15 @@ const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor a
|
||||
/// style: DefaultTextStyle.of(context).style,
|
||||
/// children: <TextSpan>[
|
||||
/// TextSpan(
|
||||
/// text: 'You don\'t have the votes.\n',
|
||||
/// text: "You don't have the votes.\n",
|
||||
/// style: TextStyle(color: Colors.black.withOpacity(0.6)),
|
||||
/// ),
|
||||
/// TextSpan(
|
||||
/// text: 'You don\'t have the votes!\n',
|
||||
/// text: "You don't have the votes!\n",
|
||||
/// style: TextStyle(color: Colors.black.withOpacity(0.8)),
|
||||
/// ),
|
||||
/// TextSpan(
|
||||
/// text: 'You\'re gonna need congressional approval and you don\'t have the votes!\n',
|
||||
/// text: "You're gonna need congressional approval and you don't have the votes!\n",
|
||||
/// style: TextStyle(color: Colors.black.withOpacity(1.0)),
|
||||
/// ),
|
||||
/// ],
|
||||
@ -106,7 +106,7 @@ const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor a
|
||||
///
|
||||
/// ```dart
|
||||
/// Text(
|
||||
/// 'These are wise words, enterprising men quote \'em.',
|
||||
/// "These are wise words, enterprising men quote 'em.",
|
||||
/// style: DefaultTextStyle.of(context).style.apply(fontSizeFactor: 2.0),
|
||||
/// )
|
||||
/// ```
|
||||
@ -158,7 +158,7 @@ const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor a
|
||||
/// ```dart
|
||||
/// RichText(
|
||||
/// text: TextSpan(
|
||||
/// text: 'Don\'t tax the South ',
|
||||
/// text: "Don't tax the South ",
|
||||
/// children: <TextSpan>[
|
||||
/// TextSpan(
|
||||
/// text: 'cuz',
|
||||
|
@ -1800,7 +1800,7 @@ abstract class RenderBox extends RenderObject {
|
||||
}
|
||||
if (!value._canBeUsedByParent) {
|
||||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||
ErrorSummary('A child\'s size was used without setting parentUsesSize.'),
|
||||
ErrorSummary("A child's size was used without setting parentUsesSize."),
|
||||
describeForError('The following render object'),
|
||||
value._owner.describeForError('...was assigned a size obtained from its child'),
|
||||
ErrorDescription(
|
||||
@ -2110,14 +2110,14 @@ abstract class RenderBox extends RenderObject {
|
||||
ErrorSummary('Cannot hit test a render box that has never been laid out.'),
|
||||
describeForError('The hitTest() method was called on this RenderBox'),
|
||||
ErrorDescription(
|
||||
'Unfortunately, this object\'s geometry is not known at this time, '
|
||||
"Unfortunately, this object's geometry is not known at this time, "
|
||||
'probably because it has never been laid out. '
|
||||
'This means it cannot be accurately hit-tested.'
|
||||
),
|
||||
ErrorHint(
|
||||
'If you are trying '
|
||||
'to perform a hit test during the layout phase itself, make sure '
|
||||
'you only hit test nodes that have completed layout (e.g. the node\'s '
|
||||
"you only hit test nodes that have completed layout (e.g. the node's "
|
||||
'children, after their layout() method has been called).'
|
||||
),
|
||||
]);
|
||||
|
@ -221,7 +221,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin {
|
||||
assert(endHandleLayerLink != null),
|
||||
assert(
|
||||
(maxLines == null) || (minLines == null) || (maxLines >= minLines),
|
||||
'minLines can\'t be greater than maxLines',
|
||||
"minLines can't be greater than maxLines",
|
||||
),
|
||||
assert(expands != null),
|
||||
assert(
|
||||
|
@ -711,7 +711,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
|
||||
DiagnosticsProperty<dynamic>('The creator information is set to', debugCreator, style: DiagnosticsTreeStyle.errorProperty),
|
||||
...addendum,
|
||||
ErrorDescription(
|
||||
'If none of the above helps enough to fix this problem, please don\'t hesitate to file a bug:\n'
|
||||
"If none of the above helps enough to fix this problem, please don't hesitate to file a bug:\n"
|
||||
' https://github.com/flutter/flutter/issues/new?template=BUG.md'
|
||||
),
|
||||
]);
|
||||
|
@ -134,7 +134,7 @@ abstract class Layer extends AbstractNode with DiagnosticableTreeMixin {
|
||||
assert(
|
||||
!alwaysNeedsAddToScene,
|
||||
'$runtimeType with alwaysNeedsAddToScene set called markNeedsAddToScene.\n'
|
||||
'The layer\'s alwaysNeedsAddToScene is set to true, and therefore it should not call markNeedsAddToScene.',
|
||||
"The layer's alwaysNeedsAddToScene is set to true, and therefore it should not call markNeedsAddToScene.",
|
||||
);
|
||||
|
||||
// Already marked. Short-circuit.
|
||||
|
@ -104,7 +104,7 @@ class RenderListBody extends RenderBox
|
||||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||
ErrorSummary('RenderListBody must have a bounded constraint for its cross axis.'),
|
||||
ErrorDescription(
|
||||
'RenderListBody forces its children to expand to fit the RenderListBody\'s container, '
|
||||
"RenderListBody forces its children to expand to fit the RenderListBody's container, "
|
||||
'so it must be placed in a parent that constrains the cross '
|
||||
'axis to a finite dimension.'
|
||||
),
|
||||
|
@ -1683,7 +1683,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
|
||||
final String problemFunction = (targetFrameMatch != null && targetFrameMatch.groupCount > 0) ? targetFrameMatch.group(1) : stack[targetFrame].trim();
|
||||
// TODO(jacobr): this case is similar to displaying a single stack frame.
|
||||
yield ErrorDescription(
|
||||
'These invalid constraints were provided to $runtimeType\'s layout() '
|
||||
"These invalid constraints were provided to $runtimeType's layout() "
|
||||
'function by the following function, which probably computed the '
|
||||
'invalid constraints in question:\n'
|
||||
' $problemFunction'
|
||||
|
@ -466,7 +466,7 @@ class RenderAspectRatio extends RenderProxyBox {
|
||||
ErrorDescription(
|
||||
'This $runtimeType was given an aspect ratio of $aspectRatio but was given '
|
||||
'both unbounded width and unbounded height constraints. Because both '
|
||||
'constraints were unbounded, this render object doesn\'t know how much '
|
||||
"constraints were unbounded, this render object doesn't know how much "
|
||||
'size to consume.'
|
||||
)
|
||||
]);
|
||||
|
@ -745,7 +745,7 @@ class SliverGeometry extends Diagnosticable {
|
||||
'The "maxPaintExtent" is less than the "paintExtent".',
|
||||
details:
|
||||
_debugCompareFloats('maxPaintExtent', maxPaintExtent, 'paintExtent', paintExtent)
|
||||
..add(ErrorDescription('By definition, a sliver can\'t paint more than the maximum that it can paint!')),
|
||||
..add(ErrorDescription("By definition, a sliver can't paint more than the maximum that it can paint!")),
|
||||
);
|
||||
}
|
||||
verify(hitTestExtent != null, 'The "hitTestExtent" is null.');
|
||||
|
@ -1361,7 +1361,7 @@ class SemanticsNode extends AbstractNode with DiagnosticableTreeMixin {
|
||||
final List<DiagnosticsNode> mutationErrors = <DiagnosticsNode>[];
|
||||
if (newChildren.length != _debugPreviousSnapshot.length) {
|
||||
mutationErrors.add(ErrorDescription(
|
||||
'The list\'s length has changed from ${_debugPreviousSnapshot.length} '
|
||||
"The list's length has changed from ${_debugPreviousSnapshot.length} "
|
||||
'to ${newChildren.length}.'
|
||||
));
|
||||
} else {
|
||||
|
@ -76,13 +76,13 @@ BinaryMessenger get defaultBinaryMessenger {
|
||||
throw FlutterError(
|
||||
'ServicesBinding.defaultBinaryMessenger was accessed before the '
|
||||
'binding was initialized.\n'
|
||||
'If you\'re running an application and need to access the binary '
|
||||
"If you're running an application and need to access the binary "
|
||||
'messenger before `runApp()` has been called (for example, during '
|
||||
'plugin initialization), then you need to explicitly call the '
|
||||
'`WidgetsFlutterBinding.ensureInitialized()` first.\n'
|
||||
'If you\'re running a test, you can call the '
|
||||
"If you're running a test, you can call the "
|
||||
'`TestWidgetsFlutterBinding.ensureInitialized()` as the first line in '
|
||||
'your test\'s `main()` method to initialize the binding.'
|
||||
"your test's `main()` method to initialize the binding."
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
@ -65,7 +65,7 @@ class PlatformViewsService {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw UnimplementedError('${call.method} was invoked but isn\'t implemented by PlatformViewsService');
|
||||
throw UnimplementedError("${call.method} was invoked but isn't implemented by PlatformViewsService");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ class Actions extends InheritedWidget {
|
||||
}
|
||||
if (action == null) {
|
||||
throw FlutterError('Unable to find an action for an intent in the $Actions widget in the context.\n'
|
||||
'$Actions.invoke() was called on an $Actions widget that doesn\'t '
|
||||
"$Actions.invoke() was called on an $Actions widget that doesn't "
|
||||
'contain a mapping for the given intent.\n'
|
||||
'The context used was:\n'
|
||||
' $context\n'
|
||||
|
@ -1250,7 +1250,7 @@ class _WidgetsAppState extends State<WidgetsApp> with WidgetsBindingObserver {
|
||||
final StringBuffer message = StringBuffer();
|
||||
message.writeln('\u2550' * 8);
|
||||
message.writeln(
|
||||
'Warning: This application\'s locale, $appLocale, is not supported by all of its\n'
|
||||
"Warning: This application's locale, $appLocale, is not supported by all of its\n"
|
||||
'localization delegates.'
|
||||
);
|
||||
for (final Type unsupportedType in unsupportedTypes) {
|
||||
@ -1265,7 +1265,7 @@ class _WidgetsAppState extends State<WidgetsApp> with WidgetsBindingObserver {
|
||||
}
|
||||
message.writeln(
|
||||
'See https://flutter.dev/tutorials/internationalization/ for more\n'
|
||||
'information about configuring an app\'s locale, supportedLocales,\n'
|
||||
"information about configuring an app's locale, supportedLocales,\n"
|
||||
'and localizationsDelegates parameters.'
|
||||
);
|
||||
message.writeln('\u2550' * 8);
|
||||
|
@ -144,7 +144,7 @@ class Directionality extends InheritedWidget {
|
||||
/// ```dart
|
||||
/// Opacity(
|
||||
/// opacity: _visible ? 1.0 : 0.0,
|
||||
/// child: const Text('Now you see me, now you don\'t!'),
|
||||
/// child: const Text("Now you see me, now you don't!"),
|
||||
/// )
|
||||
/// ```
|
||||
/// {@end-tool}
|
||||
@ -4029,7 +4029,7 @@ class Flex extends MultiChildRenderObjectWidget {
|
||||
/// Row(
|
||||
/// children: <Widget>[
|
||||
/// const FlutterLogo(),
|
||||
/// const Text('Flutter\'s hot reload helps you quickly and easily experiment, build UIs, add features, and fix bug faster. Experience sub-second reload times, without losing state, on emulators, simulators, and hardware for iOS and Android.'),
|
||||
/// const Text("Flutter's hot reload helps you quickly and easily experiment, build UIs, add features, and fix bug faster. Experience sub-second reload times, without losing state, on emulators, simulators, and hardware for iOS and Android."),
|
||||
/// const Icon(Icons.sentiment_very_satisfied),
|
||||
/// ],
|
||||
/// )
|
||||
@ -4057,7 +4057,7 @@ class Flex extends MultiChildRenderObjectWidget {
|
||||
/// children: <Widget>[
|
||||
/// const FlutterLogo(),
|
||||
/// const Expanded(
|
||||
/// child: Text('Flutter\'s hot reload helps you quickly and easily experiment, build UIs, add features, and fix bug faster. Experience sub-second reload times, without losing state, on emulators, simulators, and hardware for iOS and Android.'),
|
||||
/// child: Text("Flutter's hot reload helps you quickly and easily experiment, build UIs, add features, and fix bug faster. Experience sub-second reload times, without losing state, on emulators, simulators, and hardware for iOS and Android."),
|
||||
/// ),
|
||||
/// const Icon(Icons.sentiment_very_satisfied),
|
||||
/// ],
|
||||
|
@ -426,7 +426,7 @@ class EditableText extends StatefulWidget {
|
||||
assert(minLines == null || minLines > 0),
|
||||
assert(
|
||||
(maxLines == null) || (minLines == null) || (maxLines >= minLines),
|
||||
'minLines can\'t be greater than maxLines',
|
||||
"minLines can't be greater than maxLines",
|
||||
),
|
||||
assert(expands != null),
|
||||
assert(
|
||||
|
@ -1222,7 +1222,7 @@ abstract class State<T extends StatefulWidget> extends Diagnosticable {
|
||||
ErrorSummary('setState() called in constructor: $this'),
|
||||
ErrorHint(
|
||||
'This happens when you call setState() on a State object for a widget that '
|
||||
'hasn\'t been inserted into the widget tree yet. It is not necessary to call '
|
||||
"hasn't been inserted into the widget tree yet. It is not necessary to call "
|
||||
'setState() in the constructor, since the state is already assumed to be dirty '
|
||||
'when it is initially created.'
|
||||
),
|
||||
@ -3104,7 +3104,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
|
||||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||
ErrorSummary('visitChildElements() called during build.'),
|
||||
ErrorDescription(
|
||||
'The BuildContext.visitChildElements() method can\'t be called during '
|
||||
"The BuildContext.visitChildElements() method can't be called during "
|
||||
'build because the child list is still being updated at that point, '
|
||||
'so the children might not be constructed yet, or might be old children '
|
||||
'that are going to be replaced.'
|
||||
@ -3368,7 +3368,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
|
||||
assert(() {
|
||||
if (parent == this) {
|
||||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||
ErrorSummary('A GlobalKey was used multiple times inside one widget\'s child list.'),
|
||||
ErrorSummary("A GlobalKey was used multiple times inside one widget's child list."),
|
||||
DiagnosticsProperty<GlobalKey>('The offending GlobalKey was', key),
|
||||
parent.describeElement('The parent of the widgets with that key was'),
|
||||
element.describeElement('The first child to get instantiated with that key became'),
|
||||
@ -3763,15 +3763,15 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
|
||||
assert(() {
|
||||
if (_debugLifecycleState != _ElementLifecycle.active) {
|
||||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||
ErrorSummary('Looking up a deactivated widget\'s ancestor is unsafe.'),
|
||||
ErrorSummary("Looking up a deactivated widget's ancestor is unsafe."),
|
||||
ErrorDescription(
|
||||
'At this point the state of the widget\'s element tree is no longer '
|
||||
"At this point the state of the widget's element tree is no longer "
|
||||
'stable.'
|
||||
),
|
||||
ErrorHint(
|
||||
'To safely refer to a widget\'s ancestor in its dispose() method, '
|
||||
"To safely refer to a widget's ancestor in its dispose() method, "
|
||||
'save a reference to the ancestor by calling dependOnInheritedWidgetOfExactType() '
|
||||
'in the widget\'s didChangeDependencies() method.'
|
||||
"in the widget's didChangeDependencies() method."
|
||||
),
|
||||
]);
|
||||
}
|
||||
@ -4733,7 +4733,7 @@ class StatefulElement extends ComponentElement {
|
||||
ErrorSummary('dependOnInheritedWidgetOfExactType<$targetType>() or dependOnInheritedElement() was called before ${_state.runtimeType}.initState() completed.'),
|
||||
ErrorDescription(
|
||||
'When an inherited widget changes, for example if the value of Theme.of() changes, '
|
||||
'its dependent widgets are rebuilt. If the dependent widget\'s reference to '
|
||||
"its dependent widgets are rebuilt. If the dependent widget's reference to "
|
||||
'the inherited widget is in a constructor or an initState() method, '
|
||||
'then the rebuilt dependent widget will not reflect the changes in the '
|
||||
'inherited widget.',
|
||||
|
@ -796,7 +796,7 @@ abstract class BoxScrollView extends ScrollView {
|
||||
/// shrinkWrap: true,
|
||||
/// padding: const EdgeInsets.all(20.0),
|
||||
/// children: <Widget>[
|
||||
/// const Text('I\'m dedicating every day to you'),
|
||||
/// const Text("I'm dedicating every day to you"),
|
||||
/// const Text('Domestic life was never quite my style'),
|
||||
/// const Text('When you smile, you knock me out, I fall apart'),
|
||||
/// const Text('And I thought I was so smart'),
|
||||
@ -815,7 +815,7 @@ abstract class BoxScrollView extends ScrollView {
|
||||
/// sliver: SliverList(
|
||||
/// delegate: SliverChildListDelegate(
|
||||
/// <Widget>[
|
||||
/// const Text('I\'m dedicating every day to you'),
|
||||
/// const Text("I'm dedicating every day to you"),
|
||||
/// const Text('Domestic life was never quite my style'),
|
||||
/// const Text('When you smile, you knock me out, I fall apart'),
|
||||
/// const Text('And I thought I was so smart'),
|
||||
@ -1307,7 +1307,7 @@ class ListView extends BoxScrollView {
|
||||
/// children: <Widget>[
|
||||
/// Container(
|
||||
/// padding: const EdgeInsets.all(8),
|
||||
/// child: const Text('He\'d have you all unravel at the'),
|
||||
/// child: const Text("He'd have you all unravel at the"),
|
||||
/// color: Colors.teal[100],
|
||||
/// ),
|
||||
/// Container(
|
||||
@ -1359,7 +1359,7 @@ class ListView extends BoxScrollView {
|
||||
/// children: <Widget>[
|
||||
/// Container(
|
||||
/// padding: const EdgeInsets.all(8),
|
||||
/// child: const Text('He\'d have you all unravel at the'),
|
||||
/// child: const Text("He'd have you all unravel at the"),
|
||||
/// color: Colors.green[100],
|
||||
/// ),
|
||||
/// Container(
|
||||
|
@ -1335,7 +1335,7 @@ class SliverMultiBoxAdaptorElement extends RenderObjectElement implements Render
|
||||
/// bool _visible = true;
|
||||
/// List<Widget> listItems = <Widget>[
|
||||
/// Text('Now you see me,'),
|
||||
/// Text('Now you don\'t!'),
|
||||
/// Text("Now you don't!"),
|
||||
/// ];
|
||||
///
|
||||
/// SliverOpacity(
|
||||
|
@ -156,7 +156,7 @@ void main() {
|
||||
expect(SchedulerBinding.instance.transientCallbackCount, equals(1));
|
||||
});
|
||||
|
||||
testWidgets('Disabled button doesn\'t animate', (WidgetTester tester) async {
|
||||
testWidgets("Disabled button doesn't animate", (WidgetTester tester) async {
|
||||
await tester.pumpWidget(boilerplate(child: const CupertinoButton(
|
||||
child: Text('Tap me'),
|
||||
onPressed: null,
|
||||
|
@ -208,7 +208,7 @@ void main() {
|
||||
expect(_findStatic(), findsNothing);
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/44152
|
||||
|
||||
testWidgets('Backdrop is added using ModalRoute\'s filter parameter', (WidgetTester tester) async {
|
||||
testWidgets("Backdrop is added using ModalRoute's filter parameter", (WidgetTester tester) async {
|
||||
final Widget child = _getChild();
|
||||
await tester.pumpWidget(_getContextMenu(child: child));
|
||||
expect(find.byType(BackdropFilter), findsNothing);
|
||||
@ -224,7 +224,7 @@ void main() {
|
||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/44152
|
||||
});
|
||||
|
||||
group('Open layout differs depending on child\'s position on screen', () {
|
||||
group("Open layout differs depending on child's position on screen", () {
|
||||
testWidgets('Portrait', (WidgetTester tester) async {
|
||||
const Size portraitScreenSize = Size(600.0, 800.0);
|
||||
await binding.setSurfaceSize(portraitScreenSize);
|
||||
|
@ -163,7 +163,7 @@ Future<void> main() async {
|
||||
FlutterError.dumpErrorToConsole(FlutterErrorDetails(
|
||||
exception: getAssertionErrorWithoutMessage(),
|
||||
));
|
||||
expect(console.join('\n'), matches('Another exception was thrown: \'[^\']+flutter/test/foundation/error_reporting_test\\.dart\': Failed assertion: line [0-9]+ pos [0-9]+: \'false\': is not true\\.'));
|
||||
expect(console.join('\n'), matches("Another exception was thrown: '[^']+flutter/test/foundation/error_reporting_test\\.dart': Failed assertion: line [0-9]+ pos [0-9]+: 'false': is not true\\."));
|
||||
console.clear();
|
||||
FlutterError.resetErrorCount();
|
||||
});
|
||||
|
@ -6,7 +6,7 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('builder doesn\'t get called if app doesn\'t change', (WidgetTester tester) async {
|
||||
testWidgets("builder doesn't get called if app doesn't change", (WidgetTester tester) async {
|
||||
final List<String> log = <String>[];
|
||||
final Widget app = MaterialApp(
|
||||
theme: ThemeData(
|
||||
@ -37,7 +37,7 @@ void main() {
|
||||
expect(log, <String>['build']);
|
||||
});
|
||||
|
||||
testWidgets('builder doesn\'t get called if app doesn\'t change', (WidgetTester tester) async {
|
||||
testWidgets("builder doesn't get called if app doesn't change", (WidgetTester tester) async {
|
||||
final List<String> log = <String>[];
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
|
@ -194,7 +194,7 @@ void main() {
|
||||
expect(material.color, persistentBackgroundColor);
|
||||
});
|
||||
|
||||
testWidgets('Modal bottom sheet-specific parameters don\'t apply to persistent bottom sheets', (WidgetTester tester) async {
|
||||
testWidgets("Modal bottom sheet-specific parameters don't apply to persistent bottom sheets", (WidgetTester tester) async {
|
||||
const double modalElevation = 5.0;
|
||||
const Color modalBackgroundColor = Colors.yellow;
|
||||
const BottomSheetThemeData bottomSheetTheme = BottomSheetThemeData(
|
||||
|
@ -29,7 +29,7 @@ void main() {
|
||||
' No Material widget found.\n'
|
||||
' ListTile widgets require a Material widget ancestor.\n'
|
||||
' In material design, most widgets are conceptually "printed" on a\n'
|
||||
' sheet of material. In Flutter\'s material library, that material\n'
|
||||
" sheet of material. In Flutter's material library, that material\n"
|
||||
' is represented by the Material widget. It is the Material widget\n'
|
||||
' that renders ink splashes, for instance. Because of this, many\n'
|
||||
' material library widgets require that there be a Material widget\n'
|
||||
|
@ -590,7 +590,7 @@ void main() {
|
||||
} on AssertionError catch (error) {
|
||||
expect(
|
||||
error.toString(),
|
||||
contains('There should be exactly one item with [DropdownButton]\'s value'),
|
||||
contains("There should be exactly one item with [DropdownButton]'s value"),
|
||||
);
|
||||
}
|
||||
});
|
||||
@ -621,7 +621,7 @@ void main() {
|
||||
} on AssertionError catch (error) {
|
||||
expect(
|
||||
error.toString(),
|
||||
contains('There should be exactly one item with [DropdownButton]\'s value'),
|
||||
contains("There should be exactly one item with [DropdownButton]'s value"),
|
||||
);
|
||||
}
|
||||
});
|
||||
|
@ -324,7 +324,7 @@ void main() {
|
||||
} on AssertionError catch (error) {
|
||||
expect(
|
||||
error.toString(),
|
||||
contains('There should be exactly one item with [DropdownButton]\'s value'),
|
||||
contains("There should be exactly one item with [DropdownButton]'s value"),
|
||||
);
|
||||
}
|
||||
});
|
||||
@ -355,7 +355,7 @@ void main() {
|
||||
} on AssertionError catch (error) {
|
||||
expect(
|
||||
error.toString(),
|
||||
contains('There should be exactly one item with [DropdownButton]\'s value'),
|
||||
contains("There should be exactly one item with [DropdownButton]'s value"),
|
||||
);
|
||||
}
|
||||
});
|
||||
|
@ -213,7 +213,7 @@ void main() {
|
||||
await gesture2.up();
|
||||
});
|
||||
|
||||
testWidgets('MaterialButton\'s disabledColor takes precedence over its default disabled color.', (WidgetTester tester) async {
|
||||
testWidgets("MaterialButton's disabledColor takes precedence over its default disabled color.", (WidgetTester tester) async {
|
||||
// Regression test for https://github.com/flutter/flutter/issues/30012.
|
||||
|
||||
final Finder rawButtonMaterial = find.descendant(
|
||||
|
@ -616,7 +616,7 @@ void main() {
|
||||
expect(tester.widget<OutlineButton>(outlineButton).enabled, false);
|
||||
});
|
||||
|
||||
testWidgets('Outline button doesn\'t crash if disabled during a gesture', (WidgetTester tester) async {
|
||||
testWidgets("Outline button doesn't crash if disabled during a gesture", (WidgetTester tester) async {
|
||||
Widget buildFrame(VoidCallback onPressed) {
|
||||
return Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
|
@ -36,7 +36,7 @@ Widget _buildBoilerplate({
|
||||
}
|
||||
|
||||
void main() {
|
||||
testWidgets('Scrollbar doesn\'t show when tapping list', (WidgetTester tester) async {
|
||||
testWidgets("Scrollbar doesn't show when tapping list", (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
_buildBoilerplate(
|
||||
child: Center(
|
||||
|
@ -80,15 +80,15 @@ void main() {
|
||||
'disabledThumbColor: Color(0xff000011)',
|
||||
'overlayColor: Color(0xff000012)',
|
||||
'valueIndicatorColor: Color(0xff000013)',
|
||||
'overlayShape: Instance of \'RoundSliderOverlayShape\'',
|
||||
'tickMarkShape: Instance of \'RoundSliderTickMarkShape\'',
|
||||
'thumbShape: Instance of \'RoundSliderThumbShape\'',
|
||||
'trackShape: Instance of \'RoundedRectSliderTrackShape\'',
|
||||
'valueIndicatorShape: Instance of \'PaddleSliderValueIndicatorShape\'',
|
||||
'rangeTickMarkShape: Instance of \'RoundRangeSliderTickMarkShape\'',
|
||||
'rangeThumbShape: Instance of \'RoundRangeSliderThumbShape\'',
|
||||
'rangeTrackShape: Instance of \'RoundedRectRangeSliderTrackShape\'',
|
||||
'rangeValueIndicatorShape: Instance of \'PaddleRangeSliderValueIndicatorShape\'',
|
||||
"overlayShape: Instance of 'RoundSliderOverlayShape'",
|
||||
"tickMarkShape: Instance of 'RoundSliderTickMarkShape'",
|
||||
"thumbShape: Instance of 'RoundSliderThumbShape'",
|
||||
"trackShape: Instance of 'RoundedRectSliderTrackShape'",
|
||||
"valueIndicatorShape: Instance of 'PaddleSliderValueIndicatorShape'",
|
||||
"rangeTickMarkShape: Instance of 'RoundRangeSliderTickMarkShape'",
|
||||
"rangeThumbShape: Instance of 'RoundRangeSliderThumbShape'",
|
||||
"rangeTrackShape: Instance of 'RoundedRectRangeSliderTrackShape'",
|
||||
"rangeValueIndicatorShape: Instance of 'PaddleRangeSliderValueIndicatorShape'",
|
||||
'showValueIndicator: always',
|
||||
'valueIndicatorTextStyle: TextStyle(inherit: true, color: Color(0xff000000))',
|
||||
]);
|
||||
|
@ -2409,7 +2409,7 @@ void main() {
|
||||
),
|
||||
body: tabTextContent.isNotEmpty
|
||||
? TabBarView(
|
||||
children: tabTextContent.map((String textContent) => Tab(text: '$textContent\'s view')).toList()
|
||||
children: tabTextContent.map((String textContent) => Tab(text: "$textContent's view")).toList()
|
||||
)
|
||||
: const Center(child: Text('No tabs')),
|
||||
bottomNavigationBar: BottomAppBar(
|
||||
@ -2452,7 +2452,7 @@ void main() {
|
||||
await tester.tap(find.byKey(const Key('Add tab')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('Tab 1'), findsOneWidget);
|
||||
expect(find.text('Tab 1\'s view'), findsOneWidget);
|
||||
expect(find.text("Tab 1's view"), findsOneWidget);
|
||||
|
||||
// Dynamically updates to zero tabs properly
|
||||
await tester.tap(find.byKey(const Key('Delete tab')));
|
||||
|
@ -139,7 +139,7 @@ void main() {
|
||||
'Third line of stuff';
|
||||
const String kMoreThanFourLines =
|
||||
kThreeLines +
|
||||
'\nFourth line won\'t display and ends at';
|
||||
"\nFourth line won't display and ends at";
|
||||
|
||||
// Returns the first RenderEditable.
|
||||
RenderEditable findRenderEditable(WidgetTester tester) {
|
||||
@ -914,7 +914,7 @@ void main() {
|
||||
expect(controller.selection.baseOffset, testValue.indexOf('h'));
|
||||
});
|
||||
|
||||
testWidgets('Slight movements in longpress don\'t hide/show handles', (WidgetTester tester) async {
|
||||
testWidgets("Slight movements in longpress don't hide/show handles", (WidgetTester tester) async {
|
||||
final TextEditingController controller = TextEditingController();
|
||||
|
||||
await tester.pumpWidget(
|
||||
@ -2322,7 +2322,7 @@ void main() {
|
||||
}
|
||||
|
||||
const String hintPlaceholder = 'Placeholder';
|
||||
const String multipleLineText = 'Here\'s a text, which is more than one line, to demostrate the multiple line hint text';
|
||||
const String multipleLineText = "Here's a text, which is more than one line, to demostrate the multiple line hint text";
|
||||
await tester.pumpWidget(builder(null, hintPlaceholder));
|
||||
|
||||
RenderBox findHintText(String hint) => tester.renderObject(find.text(hint));
|
||||
@ -7367,7 +7367,7 @@ void main() {
|
||||
expect(renderBox.size.height, greaterThanOrEqualTo(kMinInteractiveDimension));
|
||||
});
|
||||
|
||||
testWidgets('When text is very small, TextField still doesn\'t go below kMinInteractiveDimension height', (WidgetTester tester) async {
|
||||
testWidgets("When text is very small, TextField still doesn't go below kMinInteractiveDimension height", (WidgetTester tester) async {
|
||||
await tester.pumpWidget(MaterialApp(
|
||||
theme: ThemeData(),
|
||||
home: const Scaffold(
|
||||
|
@ -121,7 +121,7 @@ void main() {
|
||||
expect(paint2.color, const Color(0x00000000));
|
||||
expect(paint2.blendMode, BlendMode.srcOver);
|
||||
});
|
||||
test('BorderSide - won\'t lerp into negative widths', () {
|
||||
test("BorderSide - won't lerp into negative widths", () {
|
||||
const BorderSide side0 = BorderSide(width: 0.0);
|
||||
const BorderSide side1 = BorderSide(width: 1.0);
|
||||
const BorderSide side2 = BorderSide(width: 2.0);
|
||||
|
@ -199,7 +199,7 @@ void main() {
|
||||
expect(resultingCompleter2, completer2);
|
||||
});
|
||||
|
||||
test('failed image can successfully be removed from the cache\'s pending images', () async {
|
||||
test("failed image can successfully be removed from the cache's pending images", () async {
|
||||
const TestImage testImage = TestImage(width: 8, height: 8);
|
||||
|
||||
const FailingTestImageProvider(1, 1, image: testImage)
|
||||
|
@ -9,7 +9,7 @@ import 'package:flutter/painting.dart';
|
||||
|
||||
void main() {
|
||||
group('CircularNotchedRectangle', () {
|
||||
test('guest and host don\'t overlap', () {
|
||||
test("guest and host don't overlap", () {
|
||||
const CircularNotchedRectangle shape = CircularNotchedRectangle();
|
||||
const Rect host = Rect.fromLTRB(0.0, 100.0, 300.0, 300.0);
|
||||
const Rect guest = Rect.fromLTWH(50.0, 50.0, 10.0, 10.0);
|
||||
|
@ -121,7 +121,7 @@ void main() {
|
||||
' This RenderAspectRatio was given an aspect ratio of 0.5 but was\n'
|
||||
' given both unbounded width and unbounded height constraints.\n'
|
||||
' Because both constraints were unbounded, this render object\n'
|
||||
' doesn\'t know how much size to consume.\n'
|
||||
" doesn't know how much size to consume.\n"
|
||||
);
|
||||
// The second error message is a generic message generated by the Dart VM. Not worth testing.
|
||||
});
|
||||
|
@ -941,12 +941,12 @@ void main() {
|
||||
' constraints: MISSING\n'
|
||||
' size: MISSING\n'
|
||||
' additionalConstraints: BoxConstraints(0.0<=w<=Infinity, h=100.0)\n'
|
||||
' Unfortunately, this object\'s geometry is not known at this time,\n'
|
||||
" Unfortunately, this object's geometry is not known at this time,\n"
|
||||
' probably because it has never been laid out. This means it cannot\n'
|
||||
' be accurately hit-tested.\n'
|
||||
' If you are trying to perform a hit test during the layout phase\n'
|
||||
' itself, make sure you only hit test nodes that have completed\n'
|
||||
' layout (e.g. the node\'s children, after their layout() method has\n'
|
||||
" layout (e.g. the node's children, after their layout() method has\n"
|
||||
' been called).\n'
|
||||
),
|
||||
);
|
||||
@ -954,7 +954,7 @@ void main() {
|
||||
result.diagnostics.singleWhere((DiagnosticsNode node) => node.level == DiagnosticLevel.hint).toString(),
|
||||
'If you are trying to perform a hit test during the layout phase '
|
||||
'itself, make sure you only hit test nodes that have completed '
|
||||
'layout (e.g. the node\'s children, after their layout() method has '
|
||||
"layout (e.g. the node's children, after their layout() method has "
|
||||
'been called).',
|
||||
);
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ void main() {
|
||||
);
|
||||
});
|
||||
|
||||
test('ContainerLayer.findAllAnnotations returns children\'s opacity (true)', () {
|
||||
test("ContainerLayer.findAllAnnotations returns children's opacity (true)", () {
|
||||
final Layer root = _withBackgroundAnnotation(1000,
|
||||
_Layers(
|
||||
ContainerLayer(),
|
||||
@ -107,7 +107,7 @@ void main() {
|
||||
);
|
||||
});
|
||||
|
||||
test('ContainerLayer.findAllAnnotations returns children\'s opacity (false)', () {
|
||||
test("ContainerLayer.findAllAnnotations returns children's opacity (false)", () {
|
||||
final Layer root = _withBackgroundAnnotation(1000,
|
||||
_Layers(
|
||||
ContainerLayer(),
|
||||
@ -574,7 +574,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('AnnotatedRegionLayer.findAllAnnotations should still check children and return '
|
||||
'children\'s opacity (false) during a failed hit', () {
|
||||
"children's opacity (false) during a failed hit", () {
|
||||
const Offset position = Offset(5, 5);
|
||||
|
||||
final Layer root = _withBackgroundAnnotation(1000,
|
||||
@ -596,7 +596,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('AnnotatedRegionLayer.findAllAnnotations should still check children and return '
|
||||
'children\'s opacity (true) during a failed hit', () {
|
||||
"children's opacity (true) during a failed hit", () {
|
||||
const Offset position = Offset(5, 5);
|
||||
|
||||
final Layer root = _withBackgroundAnnotation(1000,
|
||||
@ -616,7 +616,7 @@ void main() {
|
||||
);
|
||||
});
|
||||
|
||||
test('AnnotatedRegionLayer.findAllAnnotations should not add to children\'s opacity '
|
||||
test("AnnotatedRegionLayer.findAllAnnotations should not add to children's opacity "
|
||||
'during a successful hit if it is not opaque', () {
|
||||
const Offset position = Offset(5, 5);
|
||||
|
||||
@ -639,7 +639,7 @@ void main() {
|
||||
);
|
||||
});
|
||||
|
||||
test('AnnotatedRegionLayer.findAllAnnotations should add to children\'s opacity '
|
||||
test("AnnotatedRegionLayer.findAllAnnotations should add to children's opacity "
|
||||
'during a successful hit if it is opaque', () {
|
||||
const Offset position = Offset(5, 5);
|
||||
|
||||
|
@ -12,7 +12,7 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'rendering_tester.dart';
|
||||
|
||||
const String _kText = 'I polished up that handle so carefullee\nThat now I am the Ruler of the Queen\'s Navee!';
|
||||
const String _kText = "I polished up that handle so carefullee\nThat now I am the Ruler of the Queen's Navee!";
|
||||
|
||||
void main() {
|
||||
test('getOffsetForCaret control test', () {
|
||||
@ -88,7 +88,7 @@ void main() {
|
||||
expect(range50.textInside(_kText), equals(' '));
|
||||
|
||||
final TextRange range85 = paragraph.getWordBoundary(const TextPosition(offset: 75));
|
||||
expect(range85.textInside(_kText), equals('Queen\'s'));
|
||||
expect(range85.textInside(_kText), equals("Queen's"));
|
||||
}, skip: isBrowser);
|
||||
|
||||
test('overflow test', () {
|
||||
@ -170,7 +170,7 @@ void main() {
|
||||
test('maxLines', () {
|
||||
final RenderParagraph paragraph = RenderParagraph(
|
||||
const TextSpan(
|
||||
text: 'How do you write like you\'re running out of time? Write day and night like you\'re running out of time?',
|
||||
text: "How do you write like you're running out of time? Write day and night like you're running out of time?",
|
||||
// 0123456789 0123456789 012 345 0123456 012345 01234 012345678 012345678 0123 012 345 0123456 012345 01234
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12
|
||||
style: TextStyle(fontFamily: 'Ahem', fontSize: 10.0),
|
||||
|
@ -102,7 +102,7 @@ void main() {
|
||||
'Failed to replace child semantics nodes because the list of `SemanticsNode`s was mutated.\n'
|
||||
'Instead of mutating the existing list, create a new list containing the desired `SemanticsNode`s.\n'
|
||||
'Error details:\n'
|
||||
'The list\'s length has changed from 1 to 2.'
|
||||
"The list's length has changed from 1 to 2."
|
||||
));
|
||||
expect(
|
||||
error.diagnostics.singleWhere((DiagnosticsNode node) => node.level == DiagnosticLevel.hint).toString(),
|
||||
|
@ -128,7 +128,7 @@ void main() {
|
||||
|
||||
});
|
||||
|
||||
test('change Android view\'s directionality before creation', () async {
|
||||
test("change Android view's directionality before creation", () async {
|
||||
viewsController.registerViewType('webview');
|
||||
final AndroidViewController viewController =
|
||||
PlatformViewsService.initAndroidView(id: 0, viewType: 'webview', layoutDirection: TextDirection.rtl);
|
||||
@ -141,7 +141,7 @@ void main() {
|
||||
]));
|
||||
});
|
||||
|
||||
test('change Android view\'s directionality after creation', () async {
|
||||
test("change Android view's directionality after creation", () async {
|
||||
viewsController.registerViewType('webview');
|
||||
final AndroidViewController viewController =
|
||||
PlatformViewsService.initAndroidView(id: 0, viewType: 'webview', layoutDirection: TextDirection.ltr);
|
||||
|
@ -343,7 +343,7 @@ void main() {
|
||||
.map((DiagnosticsNode node) => node.toString())
|
||||
.toList();
|
||||
|
||||
expect(description, equals(<String>['key: [<\'foo\'>]']));
|
||||
expect(description, equals(<String>["key: [<'foo'>]"]));
|
||||
});
|
||||
testWidgets('CallbackAction debugFillProperties', (WidgetTester tester) async {
|
||||
final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
|
||||
@ -360,7 +360,7 @@ void main() {
|
||||
.map((DiagnosticsNode node) => node.toString())
|
||||
.toList();
|
||||
|
||||
expect(description, equals(<String>['intentKey: [<\'foo\'>]']));
|
||||
expect(description, equals(<String>["intentKey: [<'foo'>]"]));
|
||||
});
|
||||
testWidgets('default Actions debugFillProperties', (WidgetTester tester) async {
|
||||
final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
|
||||
@ -401,7 +401,7 @@ void main() {
|
||||
.toList();
|
||||
|
||||
expect(description[0], equalsIgnoringHashCodes('dispatcher: ActionDispatcher#00000'));
|
||||
expect(description[1], equals('actions: {[<\'bar\'>]: Closure: () => TestAction}'));
|
||||
expect(description[1], equals("actions: {[<'bar'>]: Closure: () => TestAction}"));
|
||||
}, skip: isBrowser);
|
||||
});
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('BackdropFilter\'s cull rect does not shrink', (WidgetTester tester) async {
|
||||
testWidgets("BackdropFilter's cull rect does not shrink", (WidgetTester tester) async {
|
||||
tester.binding.addTime(const Duration(seconds: 15));
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
|
@ -309,7 +309,7 @@ class DoesNotHitRenderBox extends Matcher {
|
||||
|
||||
@override
|
||||
Description describe(Description description) =>
|
||||
description.add('hit test result doesn\'t contain ').addDescriptionOf(renderBox);
|
||||
description.add("hit test result doesn't contain ").addDescriptionOf(renderBox);
|
||||
|
||||
@override
|
||||
bool matches(dynamic item, Map<dynamic, dynamic> matchState) {
|
||||
|
@ -162,7 +162,7 @@ void main() {
|
||||
expect(error.toStringDeep(), equalsIgnoringHashCodes(
|
||||
'FlutterError\n'
|
||||
' Failed to update the list of CustomPainterSemantics:\n'
|
||||
' - duplicate key [<\'0\'>] found at position 1\n'
|
||||
" - duplicate key [<'0'>] found at position 1\n"
|
||||
));
|
||||
});
|
||||
|
||||
|
@ -33,7 +33,7 @@ void main() {
|
||||
' must have unique keys.\n'
|
||||
' Flex(direction: vertical, mainAxisAlignment: start,\n'
|
||||
' crossAxisAlignment: center) has multiple children with key\n'
|
||||
' [<\'key\'>].\n',
|
||||
" [<'key'>].\n",
|
||||
),
|
||||
);
|
||||
}
|
||||
@ -56,7 +56,7 @@ void main() {
|
||||
error.toStringDeep(),
|
||||
equalsIgnoringHashCodes(
|
||||
'FlutterError\n'
|
||||
' Duplicate key found: [<\'key\'>].\n'
|
||||
" Duplicate key found: [<'key'>].\n"
|
||||
),
|
||||
);
|
||||
}
|
||||
@ -206,7 +206,7 @@ void main() {
|
||||
' A build function returned context.widget.\n'
|
||||
' The offending widget is:\n'
|
||||
' Container\n'
|
||||
' Build functions must never return their BuildContext parameter\'s\n'
|
||||
" Build functions must never return their BuildContext parameter's\n"
|
||||
' widget or a child that contains "context.widget". Doing so\n'
|
||||
' introduces a loop in the widget tree that can cause the app to\n'
|
||||
' crash.\n'
|
||||
|
@ -63,7 +63,7 @@ void main() {
|
||||
expect(good, isTrue);
|
||||
});
|
||||
|
||||
testWidgets('Directionality can\'t be null', (WidgetTester tester) async {
|
||||
testWidgets("Directionality can't be null", (WidgetTester tester) async {
|
||||
expect(() {
|
||||
Directionality(textDirection: nonconst(null), child: const Placeholder());
|
||||
}, throwsAssertionError);
|
||||
|
@ -3043,7 +3043,7 @@ void main() {
|
||||
);
|
||||
break;
|
||||
default:
|
||||
throw TestFailure('HandlePositionInViewport can\'t be null.');
|
||||
throw TestFailure("HandlePositionInViewport can't be null.");
|
||||
}
|
||||
}
|
||||
expect(state.selectionOverlay.handlesAreVisible, isTrue);
|
||||
@ -3923,7 +3923,7 @@ void main() {
|
||||
);
|
||||
break;
|
||||
default:
|
||||
throw TestFailure('HandlePositionInViewport can\'t be null.');
|
||||
throw TestFailure("HandlePositionInViewport can't be null.");
|
||||
}
|
||||
}
|
||||
expect(state.selectionOverlay.handlesAreVisible, isTrue);
|
||||
@ -3969,7 +3969,7 @@ void main() {
|
||||
await verifyVisibility(HandlePositionInViewport.rightEdge, false, HandlePositionInViewport.rightEdge, false);
|
||||
}, skip: isBrowser, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS, TargetPlatform.macOS }));
|
||||
|
||||
testWidgets('scrolling doesn\'t bounce', (WidgetTester tester) async {
|
||||
testWidgets("scrolling doesn't bounce", (WidgetTester tester) async {
|
||||
// 3 lines of text, where the last line overflows and requires scrolling.
|
||||
const String testText = 'XXXXX\nXXXXX\nXXXXX';
|
||||
final TextEditingController controller = TextEditingController(text: testText);
|
||||
|
@ -251,7 +251,7 @@ Future<void> main() async {
|
||||
expect(findFadeInImage(tester).target.opacity, moreOrLessEquals(1));
|
||||
});
|
||||
|
||||
testWidgets('doesn\'t interrupt in-progress animation when animation values are updated', (WidgetTester tester) async {
|
||||
testWidgets("doesn't interrupt in-progress animation when animation values are updated", (WidgetTester tester) async {
|
||||
final TestImageProvider placeholderProvider = TestImageProvider(placeholderImage);
|
||||
final TestImageProvider imageProvider = TestImageProvider(targetImage);
|
||||
|
||||
|
@ -73,7 +73,7 @@ void main() {
|
||||
);
|
||||
});
|
||||
|
||||
testWidgets('Doesn\'t overflow because of floating point accumulated error', (WidgetTester tester) async {
|
||||
testWidgets("Doesn't overflow because of floating point accumulated error", (WidgetTester tester) async {
|
||||
// both of these cases have failed in the past due to floating point issues
|
||||
await tester.pumpWidget(
|
||||
Center(
|
||||
|
@ -174,7 +174,7 @@ void main() {
|
||||
semantics.dispose();
|
||||
});
|
||||
|
||||
group('RawGestureDetector\'s custom semantics delegate', () {
|
||||
group("RawGestureDetector's custom semantics delegate", () {
|
||||
testWidgets('should update semantics notations when switching from the default delegate', (WidgetTester tester) async {
|
||||
final SemanticsTester semantics = SemanticsTester(tester);
|
||||
final Map<Type, GestureRecognizerFactory> gestures =
|
||||
@ -322,7 +322,7 @@ void main() {
|
||||
});
|
||||
});
|
||||
|
||||
group('RawGestureDetector\'s default semantics delegate', () {
|
||||
group("RawGestureDetector's default semantics delegate", () {
|
||||
group('should map onTap to', () {
|
||||
testWidgets('null when there is no TapGR', (WidgetTester tester) async {
|
||||
final SemanticsTester semantics = SemanticsTester(tester);
|
||||
|
@ -91,7 +91,7 @@ void main() {
|
||||
await tester.pumpWidget(Container());
|
||||
});
|
||||
|
||||
testWidgets('Pan doesn\'t crash', (WidgetTester tester) async {
|
||||
testWidgets("Pan doesn't crash", (WidgetTester tester) async {
|
||||
bool didStartPan = false;
|
||||
Offset panDelta;
|
||||
bool didEndPan = false;
|
||||
@ -523,7 +523,7 @@ void main() {
|
||||
expect(forcePressStart, 0);
|
||||
});
|
||||
|
||||
group('RawGestureDetectorState\'s debugFillProperties', () {
|
||||
group("RawGestureDetectorState's debugFillProperties", () {
|
||||
testWidgets('when default', (WidgetTester tester) async {
|
||||
final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
|
||||
final GlobalKey key = GlobalKey();
|
||||
|
@ -53,7 +53,7 @@ void main() {
|
||||
expect(error.toString(), startsWith('Multiple widgets used the same GlobalKey.\n'));
|
||||
expect(error.toString(), isNot(contains('different widgets that both had the following description')));
|
||||
expect(error.toString(), contains('Container'));
|
||||
expect(error.toString(), contains('Container-[<\'x\'>]'));
|
||||
expect(error.toString(), contains("Container-[<'x'>]"));
|
||||
expect(error.toString(), contains('[GlobalObjectKey ${describeIdentity(0)}]'));
|
||||
expect(error.toString(), endsWith('\nA GlobalKey can only be specified on one widget at a time in the widget tree.'));
|
||||
});
|
||||
|
@ -166,7 +166,7 @@ void main() {
|
||||
semantics.dispose();
|
||||
});
|
||||
|
||||
testWidgets('Changing semantic label from null doesn\'t rebuild tree ', (WidgetTester tester) async {
|
||||
testWidgets("Changing semantic label from null doesn't rebuild tree ", (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
|
@ -64,7 +64,7 @@ void main() {
|
||||
expect(renderImage.image, isNull);
|
||||
});
|
||||
|
||||
testWidgets('Verify Image doesn\'t reset its RenderImage when changing providers if it has gaplessPlayback set', (WidgetTester tester) async {
|
||||
testWidgets("Verify Image doesn't reset its RenderImage when changing providers if it has gaplessPlayback set", (WidgetTester tester) async {
|
||||
final GlobalKey key = GlobalKey();
|
||||
final TestImageProvider imageProvider1 = TestImageProvider();
|
||||
await tester.pumpWidget(
|
||||
@ -144,7 +144,7 @@ void main() {
|
||||
expect(renderImage.image, isNull);
|
||||
});
|
||||
|
||||
testWidgets('Verify Image doesn\'t reset its RenderImage when changing providers if it has gaplessPlayback set', (WidgetTester tester) async {
|
||||
testWidgets("Verify Image doesn't reset its RenderImage when changing providers if it has gaplessPlayback set", (WidgetTester tester) async {
|
||||
final GlobalKey key = GlobalKey();
|
||||
final TestImageProvider imageProvider1 = TestImageProvider();
|
||||
await tester.pumpWidget(
|
||||
@ -1199,7 +1199,7 @@ void main() {
|
||||
expect(find.byType(RawImage), findsOneWidget);
|
||||
}, skip: isBrowser);
|
||||
|
||||
testWidgets('Image doesn\'t rebuild on chunk events if loadingBuilder is null', (WidgetTester tester) async {
|
||||
testWidgets("Image doesn't rebuild on chunk events if loadingBuilder is null", (WidgetTester tester) async {
|
||||
final ui.Image image = await tester.runAsync(createTestImage);
|
||||
final TestImageStreamCompleter streamCompleter = TestImageStreamCompleter();
|
||||
final TestImageProvider imageProvider = TestImageProvider(streamCompleter: streamCompleter);
|
||||
|
@ -408,7 +408,7 @@ void main() {
|
||||
expect(inheritedValue, equals(3));
|
||||
});
|
||||
|
||||
testWidgets('Inherited widget doesn\'t notify descendants when descendant did not previously fail to find a match and had no dependencies', (WidgetTester tester) async {
|
||||
testWidgets("Inherited widget doesn't notify descendants when descendant did not previously fail to find a match and had no dependencies", (WidgetTester tester) async {
|
||||
int buildCount = 0;
|
||||
|
||||
final Widget inner = Container(
|
||||
|
@ -185,7 +185,7 @@ void main() {
|
||||
'FlutterError\n'
|
||||
' RenderListBody must have a bounded constraint for its cross axis.\n'
|
||||
' RenderListBody forces its children to expand to fit the\n'
|
||||
' RenderListBody\'s container, so it must be placed in a parent that\n'
|
||||
" RenderListBody's container, so it must be placed in a parent that\n"
|
||||
' constrains the cross axis to a finite dimension.\n'
|
||||
' If you are attempting to nest a RenderListBody with one direction\n'
|
||||
' inside one of another direction, you will want to wrap the inner\n'
|
||||
|
@ -9,7 +9,7 @@ const double kHeight = 10.0;
|
||||
const double kFlingOffset = kHeight * 20.0;
|
||||
|
||||
void main() {
|
||||
testWidgets('Flings don\'t stutter', (WidgetTester tester) async {
|
||||
testWidgets("Flings don't stutter", (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
|
@ -354,7 +354,7 @@ void main() {
|
||||
});
|
||||
});
|
||||
|
||||
testWidgets('RenderPointerListener\'s debugFillProperties when default', (WidgetTester tester) async {
|
||||
testWidgets("RenderPointerListener's debugFillProperties when default", (WidgetTester tester) async {
|
||||
final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
|
||||
RenderPointerListener().debugFillProperties(builder);
|
||||
|
||||
@ -372,7 +372,7 @@ void main() {
|
||||
]);
|
||||
});
|
||||
|
||||
testWidgets('RenderPointerListener\'s debugFillProperties when full', (WidgetTester tester) async {
|
||||
testWidgets("RenderPointerListener's debugFillProperties when full", (WidgetTester tester) async {
|
||||
final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
|
||||
RenderPointerListener(
|
||||
onPointerDown: (PointerDownEvent event) {},
|
||||
|
@ -162,7 +162,7 @@ void main() {
|
||||
expect(painter, doesNotOverscroll);
|
||||
});
|
||||
|
||||
group('Flipping direction of scrollable doesn\'t change overscroll behavior', () {
|
||||
group("Flipping direction of scrollable doesn't change overscroll behavior", () {
|
||||
testWidgets('down', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
const Directionality(
|
||||
|
@ -198,7 +198,7 @@ void main() {
|
||||
expect(settingsOffset.dy, 100.0);
|
||||
}, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS, TargetPlatform.macOS }));
|
||||
|
||||
testWidgets('Check back gesture doesn\'t start during transitions', (WidgetTester tester) async {
|
||||
testWidgets("Check back gesture doesn't start during transitions", (WidgetTester tester) async {
|
||||
final GlobalKey containerKey1 = GlobalKey();
|
||||
final GlobalKey containerKey2 = GlobalKey();
|
||||
final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user