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() {
|
void main() {
|
||||||
final List<String> words = 'Lorem Ipsum is simply dummy text of the printing and'
|
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'
|
' standard dummy text ever since the 1500s, when an unknown'
|
||||||
' printer took a galley of type and scrambled it to make a'
|
' printer took a galley of type and scrambled it to make a'
|
||||||
' type specimen book'.split(' ');
|
' type specimen book'.split(' ');
|
||||||
|
@ -330,7 +330,7 @@ Future<void> verifyNoTestPackageImports(String workingDirectory) async {
|
|||||||
assert(count > 0);
|
assert(count > 0);
|
||||||
if (count == 1)
|
if (count == 1)
|
||||||
return null;
|
return null;
|
||||||
return ' $name: uses \'package:test\' $count times.';
|
return " $name: uses 'package:test' $count times.";
|
||||||
}
|
}
|
||||||
if (name.startsWith('packages/flutter_test/')) {
|
if (name.startsWith('packages/flutter_test/')) {
|
||||||
// flutter_test has deep ties to package:test
|
// flutter_test has deep ties to package:test
|
||||||
@ -341,7 +341,7 @@ Future<void> verifyNoTestPackageImports(String workingDirectory) async {
|
|||||||
if (count == 1)
|
if (count == 1)
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return ' $name: uses \'package:test\' directly';
|
return " $name: uses 'package:test' directly";
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
})
|
})
|
||||||
@ -354,11 +354,11 @@ Future<void> verifyNoTestPackageImports(String workingDirectory) async {
|
|||||||
final String s1 = errors.length == 1 ? 's' : '';
|
final String s1 = errors.length == 1 ? 's' : '';
|
||||||
final String s2 = errors.length == 1 ? '' : 's';
|
final String s2 = errors.length == 1 ? '' : 's';
|
||||||
exitWithError(<String>[
|
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,
|
...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,
|
...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) {
|
if (parsedArguments.rest.isEmpty) {
|
||||||
print('Error: No file arguments specified.');
|
print('Error: No file arguments specified.');
|
||||||
} else if (files.isEmpty) {
|
} 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;
|
return help;
|
||||||
|
@ -157,7 +157,7 @@ final ArgParser _argParser = ArgParser()
|
|||||||
..addFlag(
|
..addFlag(
|
||||||
'list',
|
'list',
|
||||||
abbr: 'l',
|
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.',
|
'have been run, in the order they would have run.',
|
||||||
)
|
)
|
||||||
..addOption(
|
..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 settingsGradle = File(path.join(projectDir.path, 'android', 'settings.gradle'));
|
||||||
final File newSettingsGradle = File(path.join(projectDir.path, 'android', 'settings_aar.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(
|
final File androidFolder = File(path.join(
|
||||||
projectDir.path,
|
projectDir.path,
|
||||||
|
@ -127,7 +127,7 @@ Future<void> main() async {
|
|||||||
|
|
||||||
final String sharedLibrary = path.join(androidArmSnapshotPath, 'app.so');
|
final String sharedLibrary = path.join(androidArmSnapshotPath, 'app.so');
|
||||||
if (!File(sharedLibrary).existsSync()) {
|
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:name="flutterProjectType"
|
||||||
android:value="module" />''')
|
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();
|
final String analyticsOutput = analyticsOutputFile.readAsStringSync();
|
||||||
@ -270,7 +270,7 @@ Future<void> main() async {
|
|||||||
android:name="flutterProjectType"
|
android:name="flutterProjectType"
|
||||||
android:value="module" />''')
|
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);
|
return TaskResult.success(null);
|
||||||
} on TaskResult catch (taskResult) {
|
} on TaskResult catch (taskResult) {
|
||||||
|
@ -170,7 +170,7 @@ public class DummyPluginAClass {
|
|||||||
File(path.join(exampleApp.path, '.flutter-plugins-dependencies'));
|
File(path.join(exampleApp.path, '.flutter-plugins-dependencies'));
|
||||||
|
|
||||||
if (!flutterPluginsDependenciesFile.existsSync()) {
|
if (!flutterPluginsDependenciesFile.existsSync()) {
|
||||||
return TaskResult.failure('${flutterPluginsDependenciesFile.path} doesn\'t exist');
|
return TaskResult.failure("${flutterPluginsDependenciesFile.path} doesn't exist");
|
||||||
}
|
}
|
||||||
|
|
||||||
final String flutterPluginsDependenciesFileContent = flutterPluginsDependenciesFile.readAsStringSync();
|
final String flutterPluginsDependenciesFileContent = flutterPluginsDependenciesFile.readAsStringSync();
|
||||||
|
@ -78,8 +78,8 @@ void main() {
|
|||||||
|
|
||||||
_findNextMatcherInList(
|
_findNextMatcherInList(
|
||||||
stdout,
|
stdout,
|
||||||
(String line) => line.startsWith('Running Gradle task \'assembleRelease\'...'),
|
(String line) => line.startsWith("Running Gradle task 'assembleRelease'..."),
|
||||||
'Running Gradle task \'assembleRelease\'...',
|
"Running Gradle task 'assembleRelease'...",
|
||||||
);
|
);
|
||||||
|
|
||||||
_findNextMatcherInList(
|
_findNextMatcherInList(
|
||||||
|
@ -225,7 +225,7 @@ class FuchsiaDeviceDiscovery implements DeviceDiscovery {
|
|||||||
String get _devFinder {
|
String get _devFinder {
|
||||||
final String devFinder = path.join(getArtifactPath(), 'fuchsia', 'tools', 'device-finder');
|
final String devFinder = path.join(getArtifactPath(), 'fuchsia', 'tools', 'device-finder');
|
||||||
if (!File(devFinder).existsSync()) {
|
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;
|
return devFinder;
|
||||||
}
|
}
|
||||||
|
@ -193,7 +193,7 @@ Future<void> checkApkContainsClasses(File apk, List<String> classes) async {
|
|||||||
final ApkExtractor extractor = ApkExtractor(apk);
|
final ApkExtractor extractor = ApkExtractor(apk);
|
||||||
for (final String className in classes) {
|
for (final String className in classes) {
|
||||||
if (!(await extractor.containsClass(className))) {
|
if (!(await extractor.containsClass(className))) {
|
||||||
throw Exception('APK doesn\'t contain class `$className`.');
|
throw Exception("APK doesn't contain class `$className`.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
extractor.dispose();
|
extractor.dispose();
|
||||||
|
@ -102,7 +102,7 @@ void main(List<String> argList) {
|
|||||||
_kShowDartPad,
|
_kShowDartPad,
|
||||||
defaultsTo: false,
|
defaultsTo: false,
|
||||||
negatable: 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 '
|
'final HTML output. This flag only applies when the type parameter is '
|
||||||
'"sample".',
|
'"sample".',
|
||||||
);
|
);
|
||||||
|
@ -73,7 +73,7 @@ Future<void> main(List<String> arguments) async {
|
|||||||
|
|
||||||
final StringBuffer contents = StringBuffer('library temp_doc;\n\n');
|
final StringBuffer contents = StringBuffer('library temp_doc;\n\n');
|
||||||
for (final String libraryRef in libraryRefs()) {
|
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());
|
File('$kDocsRoot/lib/temp_doc.dart').writeAsStringSync(contents.toString());
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ void main(List<String> args) {
|
|||||||
kJustPrint,
|
kJustPrint,
|
||||||
negatable: false,
|
negatable: false,
|
||||||
help:
|
help:
|
||||||
'Don\'t actually roll the dev channel; '
|
"Don't actually roll the dev channel; "
|
||||||
'just print the would-be version and quit.',
|
'just print the would-be version and quit.',
|
||||||
);
|
);
|
||||||
argParser.addFlag(kYes, negatable: false, abbr: 'y', help: 'Skip the confirmation prompt.');
|
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 '
|
'By default, the tool will generate the supported locales list in '
|
||||||
'alphabetical order. Use this flag if you would like to default to '
|
'alphabetical order. Use this flag if you would like to default to '
|
||||||
'a different locale. \n\n'
|
'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.',
|
'default to American English if a device supports it.',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ const Set<String> numberFormatsWithNamedParameters = <String>{
|
|||||||
};
|
};
|
||||||
|
|
||||||
List<String> generateIntlMethodArgs(Message message) {
|
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)
|
if (message.description != null)
|
||||||
methodArgs.add('desc: ${generateString(message.description)}');
|
methodArgs.add('desc: ${generateString(message.description)}');
|
||||||
if (message.placeholders.isNotEmpty) {
|
if (message.placeholders.isNotEmpty) {
|
||||||
@ -159,7 +159,7 @@ String generateDateFormattingLogic(Message message) {
|
|||||||
'the "${placeholder.type}" type. To properly resolve for the right '
|
'the "${placeholder.type}" type. To properly resolve for the right '
|
||||||
'${placeholder.type} format, the "format" attribute needs to be set '
|
'${placeholder.type} format, the "format" attribute needs to be set '
|
||||||
'to determine which DateFormat to use. \n'
|
'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.'
|
'date formats.'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -167,7 +167,7 @@ String generateDateFormattingLogic(Message message) {
|
|||||||
throw L10nException(
|
throw L10nException(
|
||||||
'Date format "${placeholder.format}" for placeholder '
|
'Date format "${placeholder.format}" for placeholder '
|
||||||
'${placeholder.name} does not have a corresponding DateFormat '
|
'${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.'
|
'constructors for allowed date formats.'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -192,7 +192,7 @@ String generateNumberFormattingLogic(Message message) {
|
|||||||
throw L10nException(
|
throw L10nException(
|
||||||
'Number format ${placeholder.format} for the ${placeholder.name} '
|
'Number format ${placeholder.format} for the ${placeholder.name} '
|
||||||
'placeholder does not have a corresponding NumberFormat constructor.\n'
|
'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.'
|
'number formats.'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -584,14 +584,14 @@ class LocalizationsGenerator {
|
|||||||
arbPathStrings.sort();
|
arbPathStrings.sort();
|
||||||
localeInfoList.sort();
|
localeInfoList.sort();
|
||||||
supportedLanguageCodes.addAll(localeInfoList.map((LocaleInfo localeInfo) {
|
supportedLanguageCodes.addAll(localeInfoList.map((LocaleInfo localeInfo) {
|
||||||
return '\'${localeInfo.languageCode}\'';
|
return "'${localeInfo.languageCode}'";
|
||||||
}));
|
}));
|
||||||
|
|
||||||
if (preferredSupportedLocales != null) {
|
if (preferredSupportedLocales != null) {
|
||||||
for (final LocaleInfo preferredLocale in preferredSupportedLocales) {
|
for (final LocaleInfo preferredLocale in preferredSupportedLocales) {
|
||||||
if (!localeInfoList.contains(preferredLocale)) {
|
if (!localeInfoList.contains(preferredLocale)) {
|
||||||
throw L10nException(
|
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 '
|
'added. Please make sure that there is a corresponding arb file '
|
||||||
'with translations for the locale, or remove the locale from the '
|
'with translations for the locale, or remove the locale from the '
|
||||||
'preferred supported locale list if there is no intent to support '
|
'preferred supported locale list if there is no intent to support '
|
||||||
@ -631,9 +631,9 @@ class LocalizationsGenerator {
|
|||||||
final String languageCode = locale.languageCode;
|
final String languageCode = locale.languageCode;
|
||||||
final String countryCode = locale.countryCode;
|
final String countryCode = locale.countryCode;
|
||||||
|
|
||||||
resultingProperty += '\'$languageCode\'';
|
resultingProperty += "'$languageCode'";
|
||||||
if (countryCode != null)
|
if (countryCode != null)
|
||||||
resultingProperty += ', \'$countryCode\'';
|
resultingProperty += ", '$countryCode'";
|
||||||
resultingProperty += '),\n Locale(';
|
resultingProperty += '),\n Locale(';
|
||||||
}
|
}
|
||||||
resultingProperty = resultingProperty.substring(0, resultingProperty.length - '),\n Locale('.length);
|
resultingProperty = resultingProperty.substring(0, resultingProperty.length - '),\n Locale('.length);
|
||||||
|
@ -518,7 +518,7 @@ void main() {
|
|||||||
expect(generator.supportedLocales.contains(LocaleInfo.fromString('am')), false);
|
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')
|
fs.currentDirectory.childDirectory('lib').childDirectory('l10n')
|
||||||
..createSync(recursive: true)
|
..createSync(recursive: true)
|
||||||
..childFile('app.arb')
|
..childFile('app.arb')
|
||||||
|
@ -18,7 +18,7 @@ void main(List<String> args) {
|
|||||||
'help',
|
'help',
|
||||||
abbr: 'h',
|
abbr: 'h',
|
||||||
negatable: false,
|
negatable: false,
|
||||||
help: 'Display the tool\'s usage instructions and quit.',
|
help: "Display the tool's usage instructions and quit.",
|
||||||
);
|
);
|
||||||
|
|
||||||
parser.addOption(
|
parser.addOption(
|
||||||
@ -36,7 +36,7 @@ void main(List<String> args) {
|
|||||||
parser.addOption(
|
parser.addOption(
|
||||||
'part-of',
|
'part-of',
|
||||||
abbr: 'p',
|
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(
|
parser.addOption(
|
||||||
|
@ -88,8 +88,8 @@ class PathAnimation {
|
|||||||
if (commandType != currentCommandType)
|
if (commandType != currentCommandType)
|
||||||
throw Exception(
|
throw Exception(
|
||||||
'Paths must be built from the same commands in all frames '
|
'Paths must be built from the same commands in all frames '
|
||||||
'command $commandIdx at frame 0 was of type \'$commandType\' '
|
"command $commandIdx at frame 0 was of type '$commandType' "
|
||||||
'command $commandIdx at frame $i was of type \'$currentCommandType\''
|
"command $commandIdx at frame $i was of type '$currentCommandType'"
|
||||||
);
|
);
|
||||||
for (int j = 0; j < numPointsInCommand; j += 1)
|
for (int j = 0; j < numPointsInCommand; j += 1)
|
||||||
points[j].add(frame.paths[pathIdx].commands[commandIdx].points[j]);
|
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) {
|
int parsePixels(String pixels) {
|
||||||
if (!_pixelsExp.hasMatch(pixels))
|
if (!_pixelsExp.hasMatch(pixels))
|
||||||
throw ArgumentError(
|
throw ArgumentError(
|
||||||
'illegal pixels expression: \'$pixels\''
|
"illegal pixels expression: '$pixels'"
|
||||||
' (the tool currently only support pixel units).');
|
' (the tool currently only support pixel units).');
|
||||||
return int.parse(_pixelsExp.firstMatch(pixels).group(1));
|
return int.parse(_pixelsExp.firstMatch(pixels).group(1));
|
||||||
}
|
}
|
||||||
@ -540,7 +540,7 @@ String _extractAttr(XmlElement element, String name) {
|
|||||||
.value;
|
.value;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw ArgumentError(
|
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}'
|
'attributes were: ${element.attributes}'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,7 @@ class _CupertinoAlertDemoState extends State<CupertinoAlertDemo> {
|
|||||||
'for directions, nearby search results, and estimated travel times.'),
|
'for directions, nearby search results, and estimated travel times.'),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
CupertinoDialogAction(
|
CupertinoDialogAction(
|
||||||
child: const Text('Don\'t Allow'),
|
child: const Text("Don't Allow"),
|
||||||
onPressed: () => Navigator.pop(context, 'Disallow'),
|
onPressed: () => Navigator.pop(context, 'Disallow'),
|
||||||
),
|
),
|
||||||
CupertinoDialogAction(
|
CupertinoDialogAction(
|
||||||
|
@ -25,7 +25,7 @@ const String _outlineText =
|
|||||||
const String _outlineCode = 'buttons_outline';
|
const String _outlineCode = 'buttons_outline';
|
||||||
|
|
||||||
const String _dropdownText =
|
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 '
|
'small set of values. The button displays the current value and a down '
|
||||||
'arrow.';
|
'arrow.';
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ const String _dropdownCode = 'buttons_dropdown';
|
|||||||
|
|
||||||
const String _iconText =
|
const String _iconText =
|
||||||
'IconButtons are appropriate for toggle buttons that allow a single choice '
|
'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';
|
const String _iconCode = 'buttons_icon';
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ class DialogDemoState extends State<DialogDemo> {
|
|||||||
showDemoDialog<DialogDemoAction>(
|
showDemoDialog<DialogDemoAction>(
|
||||||
context: context,
|
context: context,
|
||||||
child: AlertDialog(
|
child: AlertDialog(
|
||||||
title: const Text('Use Google\'s location service?'),
|
title: const Text("Use Google's location service?"),
|
||||||
content: Text(
|
content: Text(
|
||||||
_alertWithTitleText,
|
_alertWithTitleText,
|
||||||
style: dialogTextStyle,
|
style: dialogTextStyle,
|
||||||
|
@ -8,7 +8,7 @@ import '../../gallery/demo.dart';
|
|||||||
|
|
||||||
const String _checkboxText =
|
const String _checkboxText =
|
||||||
'Checkboxes allow the user to select multiple options from a set. '
|
'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.';
|
'value can also be null.';
|
||||||
|
|
||||||
const String _checkboxCode = 'selectioncontrols_checkbox';
|
const String _checkboxCode = 'selectioncontrols_checkbox';
|
||||||
|
@ -50,7 +50,7 @@ class _SnackBarDemoState extends State<SnackBarDemo> {
|
|||||||
label: 'ACTION',
|
label: 'ACTION',
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Scaffold.of(context).showSnackBar(SnackBar(
|
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.');
|
showInSnackBar('Please fix the errors in red before submitting.');
|
||||||
} else {
|
} else {
|
||||||
form.save();
|
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)
|
if (passwordField.value == null || passwordField.value.isEmpty)
|
||||||
return 'Please enter a password.';
|
return 'Please enter a password.';
|
||||||
if (passwordField.value != value)
|
if (passwordField.value != value)
|
||||||
return 'The passwords don\'t match';
|
return "The passwords don't match";
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -610,7 +610,7 @@ const List<Recipe> kPestoRecipes = <Recipe>[
|
|||||||
author: 'Ali Connors',
|
author: 'Ali Connors',
|
||||||
ingredientsImagePath: 'food/icons/main.png',
|
ingredientsImagePath: 'food/icons/main.png',
|
||||||
ingredientsImagePackage: _kGalleryAssetsPackage,
|
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',
|
imagePath: 'food/pesto_pasta.png',
|
||||||
imagePackage: _kGalleryAssetsPackage,
|
imagePackage: _kGalleryAssetsPackage,
|
||||||
ingredients: <RecipeIngredient>[
|
ingredients: <RecipeIngredient>[
|
||||||
@ -634,7 +634,7 @@ const List<Recipe> kPestoRecipes = <Recipe>[
|
|||||||
author: 'Sandra Adams',
|
author: 'Sandra Adams',
|
||||||
ingredientsImagePath: 'food/icons/main.png',
|
ingredientsImagePath: 'food/icons/main.png',
|
||||||
ingredientsImagePackage: _kGalleryAssetsPackage,
|
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',
|
imagePath: 'food/cherry_pie.png',
|
||||||
imagePackage: _kGalleryAssetsPackage,
|
imagePackage: _kGalleryAssetsPackage,
|
||||||
ingredients: <RecipeIngredient>[
|
ingredients: <RecipeIngredient>[
|
||||||
@ -654,7 +654,7 @@ const List<Recipe> kPestoRecipes = <Recipe>[
|
|||||||
author: 'Peter Carlsson',
|
author: 'Peter Carlsson',
|
||||||
ingredientsImagePath: 'food/icons/spicy.png',
|
ingredientsImagePath: 'food/icons/spicy.png',
|
||||||
ingredientsImagePackage: _kGalleryAssetsPackage,
|
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',
|
imagePath: 'food/spinach_onion_salad.png',
|
||||||
imagePackage: _kGalleryAssetsPackage,
|
imagePackage: _kGalleryAssetsPackage,
|
||||||
ingredients: <RecipeIngredient>[
|
ingredients: <RecipeIngredient>[
|
||||||
@ -694,7 +694,7 @@ const List<Recipe> kPestoRecipes = <Recipe>[
|
|||||||
author: 'Trevor Hansen',
|
author: 'Trevor Hansen',
|
||||||
ingredientsImagePath: 'food/icons/quick.png',
|
ingredientsImagePath: 'food/icons/quick.png',
|
||||||
ingredientsImagePackage: _kGalleryAssetsPackage,
|
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',
|
imagePath: 'food/spanakopita.png',
|
||||||
imagePackage: _kGalleryAssetsPackage,
|
imagePackage: _kGalleryAssetsPackage,
|
||||||
ingredients: <RecipeIngredient>[
|
ingredients: <RecipeIngredient>[
|
||||||
|
@ -77,7 +77,7 @@ class TabbedComponentDemoScaffold extends StatelessWidget {
|
|||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return SimpleDialog(
|
return SimpleDialog(
|
||||||
title: const Text('Couldn\'t display URL:'),
|
title: const Text("Couldn't display URL:"),
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
|
@ -285,7 +285,7 @@ class CupertinoTextField extends StatefulWidget {
|
|||||||
assert(minLines == null || minLines > 0),
|
assert(minLines == null || minLines > 0),
|
||||||
assert(
|
assert(
|
||||||
(maxLines == null) || (minLines == null) || (maxLines >= minLines),
|
(maxLines == null) || (minLines == null) || (maxLines >= minLines),
|
||||||
'minLines can\'t be greater than maxLines',
|
"minLines can't be greater than maxLines",
|
||||||
),
|
),
|
||||||
assert(expands != null),
|
assert(expands != null),
|
||||||
assert(
|
assert(
|
||||||
|
@ -82,7 +82,7 @@ class ValueKey<T> extends LocalKey {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
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
|
// The crazy on the next line is a workaround for
|
||||||
// https://github.com/dart-lang/sdk/issues/33297
|
// https://github.com/dart-lang/sdk/issues/33297
|
||||||
if (runtimeType == _TypeLiteral<ValueKey<T>>().type)
|
if (runtimeType == _TypeLiteral<ValueKey<T>>().type)
|
||||||
|
@ -31,7 +31,7 @@ bool debugCheckHasMaterial(BuildContext context) {
|
|||||||
'${context.widget.runtimeType} widgets require a Material '
|
'${context.widget.runtimeType} widgets require a Material '
|
||||||
'widget ancestor.\n'
|
'widget ancestor.\n'
|
||||||
'In material design, most widgets are conceptually "printed" on '
|
'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 is represented by the Material widget. It is the '
|
||||||
'Material widget that renders ink splashes, for instance. '
|
'Material widget that renders ink splashes, for instance. '
|
||||||
'Because of this, many material library widgets require that '
|
'Because of this, many material library widgets require that '
|
||||||
|
@ -804,7 +804,7 @@ class DropdownButton<T> extends StatefulWidget {
|
|||||||
items.where((DropdownMenuItem<T> item) {
|
items.where((DropdownMenuItem<T> item) {
|
||||||
return item.value == value;
|
return item.value == value;
|
||||||
}).length == 1,
|
}).length == 1,
|
||||||
'There should be exactly one item with [DropdownButton]\'s value: '
|
"There should be exactly one item with [DropdownButton]'s value: "
|
||||||
'$value. \n'
|
'$value. \n'
|
||||||
'Either zero or 2 or more [DropdownMenuItem]s were detected '
|
'Either zero or 2 or more [DropdownMenuItem]s were detected '
|
||||||
'with the same value',
|
'with the same value',
|
||||||
@ -1420,7 +1420,7 @@ class DropdownButtonFormField<T> extends FormField<T> {
|
|||||||
items.where((DropdownMenuItem<T> item) {
|
items.where((DropdownMenuItem<T> item) {
|
||||||
return item.value == value;
|
return item.value == value;
|
||||||
}).length == 1,
|
}).length == 1,
|
||||||
'There should be exactly one item with [DropdownButton]\'s value: '
|
"There should be exactly one item with [DropdownButton]'s value: "
|
||||||
'$value. \n'
|
'$value. \n'
|
||||||
'Either zero or 2 or more [DropdownMenuItem]s were detected '
|
'Either zero or 2 or more [DropdownMenuItem]s were detected '
|
||||||
'with the same value',
|
'with the same value',
|
||||||
|
@ -37,8 +37,8 @@ class _SaltedKey<S, V> extends LocalKey {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
final String saltString = S == String ? '<\'$salt\'>' : '<$salt>';
|
final String saltString = S == String ? "<'$salt'>" : '<$salt>';
|
||||||
final String valueString = V == String ? '<\'$value\'>' : '<$value>';
|
final String valueString = V == String ? "<'$value'>" : '<$value>';
|
||||||
return '[$saltString $valueString]';
|
return '[$saltString $valueString]';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -265,7 +265,7 @@ enum ListTileControlAffinity {
|
|||||||
/// // ...
|
/// // ...
|
||||||
/// ListTile(
|
/// ListTile(
|
||||||
/// leading: const Icon(Icons.flight_land),
|
/// 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,
|
/// subtitle: _act != 2 ? const Text('The airplane is only in Act II.') : null,
|
||||||
/// enabled: _act == 2,
|
/// enabled: _act == 2,
|
||||||
/// onTap: () { /* react to the tile being tapped */ }
|
/// onTap: () { /* react to the tile being tapped */ }
|
||||||
|
@ -1001,8 +1001,8 @@ class _TabBarState extends State<TabBar> {
|
|||||||
assert(() {
|
assert(() {
|
||||||
if (_controller.length != widget.tabs.length) {
|
if (_controller.length != widget.tabs.length) {
|
||||||
throw FlutterError(
|
throw FlutterError(
|
||||||
'Controller\'s length property (${_controller.length}) does not match the '
|
"Controller's length property (${_controller.length}) does not match the "
|
||||||
'number of tabs (${widget.tabs.length}) present in TabBar\'s tabs property.'
|
"number of tabs (${widget.tabs.length}) present in TabBar's tabs property."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -1326,8 +1326,8 @@ class _TabBarViewState extends State<TabBarView> {
|
|||||||
assert(() {
|
assert(() {
|
||||||
if (_controller.length != widget.children.length) {
|
if (_controller.length != widget.children.length) {
|
||||||
throw FlutterError(
|
throw FlutterError(
|
||||||
'Controller\'s length property (${_controller.length}) does not match the '
|
"Controller's length property (${_controller.length}) does not match the "
|
||||||
'number of tabs (${widget.children.length}) present in TabBar\'s tabs property.'
|
"number of tabs (${widget.children.length}) present in TabBar's tabs property."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -358,7 +358,7 @@ class TextField extends StatefulWidget {
|
|||||||
assert(minLines == null || minLines > 0),
|
assert(minLines == null || minLines > 0),
|
||||||
assert(
|
assert(
|
||||||
(maxLines == null) || (minLines == null) || (maxLines >= minLines),
|
(maxLines == null) || (minLines == null) || (maxLines >= minLines),
|
||||||
'minLines can\'t be greater than maxLines',
|
"minLines can't be greater than maxLines",
|
||||||
),
|
),
|
||||||
assert(expands != null),
|
assert(expands != null),
|
||||||
assert(
|
assert(
|
||||||
|
@ -139,7 +139,7 @@ class TextFormField extends FormField<String> {
|
|||||||
assert(minLines == null || minLines > 0),
|
assert(minLines == null || minLines > 0),
|
||||||
assert(
|
assert(
|
||||||
(maxLines == null) || (minLines == null) || (maxLines >= minLines),
|
(maxLines == null) || (minLines == null) || (maxLines >= minLines),
|
||||||
'minLines can\'t be greater than maxLines',
|
"minLines can't be greater than maxLines",
|
||||||
),
|
),
|
||||||
assert(expands != null),
|
assert(expands != null),
|
||||||
assert(
|
assert(
|
||||||
|
@ -97,7 +97,7 @@ class BoxDecoration extends Decoration {
|
|||||||
}) : assert(shape != null),
|
}) : assert(shape != null),
|
||||||
assert(
|
assert(
|
||||||
backgroundBlendMode == null || color != null || gradient != null,
|
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.'
|
'gradient, but no color or gradient was provided.'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor a
|
|||||||
///
|
///
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// Text(
|
/// 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),
|
/// style: TextStyle(fontStyle: FontStyle.italic),
|
||||||
/// )
|
/// )
|
||||||
/// ```
|
/// ```
|
||||||
@ -80,15 +80,15 @@ const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor a
|
|||||||
/// style: DefaultTextStyle.of(context).style,
|
/// style: DefaultTextStyle.of(context).style,
|
||||||
/// children: <TextSpan>[
|
/// children: <TextSpan>[
|
||||||
/// 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)),
|
/// style: TextStyle(color: Colors.black.withOpacity(0.6)),
|
||||||
/// ),
|
/// ),
|
||||||
/// 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.8)),
|
/// style: TextStyle(color: Colors.black.withOpacity(0.8)),
|
||||||
/// ),
|
/// ),
|
||||||
/// TextSpan(
|
/// 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)),
|
/// style: TextStyle(color: Colors.black.withOpacity(1.0)),
|
||||||
/// ),
|
/// ),
|
||||||
/// ],
|
/// ],
|
||||||
@ -106,7 +106,7 @@ const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor a
|
|||||||
///
|
///
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// Text(
|
/// 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),
|
/// style: DefaultTextStyle.of(context).style.apply(fontSizeFactor: 2.0),
|
||||||
/// )
|
/// )
|
||||||
/// ```
|
/// ```
|
||||||
@ -158,7 +158,7 @@ const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor a
|
|||||||
/// ```dart
|
/// ```dart
|
||||||
/// RichText(
|
/// RichText(
|
||||||
/// text: TextSpan(
|
/// text: TextSpan(
|
||||||
/// text: 'Don\'t tax the South ',
|
/// text: "Don't tax the South ",
|
||||||
/// children: <TextSpan>[
|
/// children: <TextSpan>[
|
||||||
/// TextSpan(
|
/// TextSpan(
|
||||||
/// text: 'cuz',
|
/// text: 'cuz',
|
||||||
|
@ -1800,7 +1800,7 @@ abstract class RenderBox extends RenderObject {
|
|||||||
}
|
}
|
||||||
if (!value._canBeUsedByParent) {
|
if (!value._canBeUsedByParent) {
|
||||||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
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'),
|
describeForError('The following render object'),
|
||||||
value._owner.describeForError('...was assigned a size obtained from its child'),
|
value._owner.describeForError('...was assigned a size obtained from its child'),
|
||||||
ErrorDescription(
|
ErrorDescription(
|
||||||
@ -2110,14 +2110,14 @@ abstract class RenderBox extends RenderObject {
|
|||||||
ErrorSummary('Cannot hit test a render box that has never been laid out.'),
|
ErrorSummary('Cannot hit test a render box that has never been laid out.'),
|
||||||
describeForError('The hitTest() method was called on this RenderBox'),
|
describeForError('The hitTest() method was called on this RenderBox'),
|
||||||
ErrorDescription(
|
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. '
|
'probably because it has never been laid out. '
|
||||||
'This means it cannot be accurately hit-tested.'
|
'This means it cannot be accurately hit-tested.'
|
||||||
),
|
),
|
||||||
ErrorHint(
|
ErrorHint(
|
||||||
'If you are trying '
|
'If you are trying '
|
||||||
'to perform a hit test during the layout phase itself, make sure '
|
'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).'
|
'children, after their layout() method has been called).'
|
||||||
),
|
),
|
||||||
]);
|
]);
|
||||||
|
@ -221,7 +221,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin {
|
|||||||
assert(endHandleLayerLink != null),
|
assert(endHandleLayerLink != null),
|
||||||
assert(
|
assert(
|
||||||
(maxLines == null) || (minLines == null) || (maxLines >= minLines),
|
(maxLines == null) || (minLines == null) || (maxLines >= minLines),
|
||||||
'minLines can\'t be greater than maxLines',
|
"minLines can't be greater than maxLines",
|
||||||
),
|
),
|
||||||
assert(expands != null),
|
assert(expands != null),
|
||||||
assert(
|
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),
|
DiagnosticsProperty<dynamic>('The creator information is set to', debugCreator, style: DiagnosticsTreeStyle.errorProperty),
|
||||||
...addendum,
|
...addendum,
|
||||||
ErrorDescription(
|
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'
|
' https://github.com/flutter/flutter/issues/new?template=BUG.md'
|
||||||
),
|
),
|
||||||
]);
|
]);
|
||||||
|
@ -134,7 +134,7 @@ abstract class Layer extends AbstractNode with DiagnosticableTreeMixin {
|
|||||||
assert(
|
assert(
|
||||||
!alwaysNeedsAddToScene,
|
!alwaysNeedsAddToScene,
|
||||||
'$runtimeType with alwaysNeedsAddToScene set called markNeedsAddToScene.\n'
|
'$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.
|
// Already marked. Short-circuit.
|
||||||
|
@ -104,7 +104,7 @@ class RenderListBody extends RenderBox
|
|||||||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||||
ErrorSummary('RenderListBody must have a bounded constraint for its cross axis.'),
|
ErrorSummary('RenderListBody must have a bounded constraint for its cross axis.'),
|
||||||
ErrorDescription(
|
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 '
|
'so it must be placed in a parent that constrains the cross '
|
||||||
'axis to a finite dimension.'
|
'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();
|
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.
|
// TODO(jacobr): this case is similar to displaying a single stack frame.
|
||||||
yield ErrorDescription(
|
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 '
|
'function by the following function, which probably computed the '
|
||||||
'invalid constraints in question:\n'
|
'invalid constraints in question:\n'
|
||||||
' $problemFunction'
|
' $problemFunction'
|
||||||
|
@ -466,7 +466,7 @@ class RenderAspectRatio extends RenderProxyBox {
|
|||||||
ErrorDescription(
|
ErrorDescription(
|
||||||
'This $runtimeType was given an aspect ratio of $aspectRatio but was given '
|
'This $runtimeType was given an aspect ratio of $aspectRatio but was given '
|
||||||
'both unbounded width and unbounded height constraints. Because both '
|
'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.'
|
'size to consume.'
|
||||||
)
|
)
|
||||||
]);
|
]);
|
||||||
|
@ -745,7 +745,7 @@ class SliverGeometry extends Diagnosticable {
|
|||||||
'The "maxPaintExtent" is less than the "paintExtent".',
|
'The "maxPaintExtent" is less than the "paintExtent".',
|
||||||
details:
|
details:
|
||||||
_debugCompareFloats('maxPaintExtent', maxPaintExtent, 'paintExtent', paintExtent)
|
_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.');
|
verify(hitTestExtent != null, 'The "hitTestExtent" is null.');
|
||||||
|
@ -1361,7 +1361,7 @@ class SemanticsNode extends AbstractNode with DiagnosticableTreeMixin {
|
|||||||
final List<DiagnosticsNode> mutationErrors = <DiagnosticsNode>[];
|
final List<DiagnosticsNode> mutationErrors = <DiagnosticsNode>[];
|
||||||
if (newChildren.length != _debugPreviousSnapshot.length) {
|
if (newChildren.length != _debugPreviousSnapshot.length) {
|
||||||
mutationErrors.add(ErrorDescription(
|
mutationErrors.add(ErrorDescription(
|
||||||
'The list\'s length has changed from ${_debugPreviousSnapshot.length} '
|
"The list's length has changed from ${_debugPreviousSnapshot.length} "
|
||||||
'to ${newChildren.length}.'
|
'to ${newChildren.length}.'
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
|
@ -76,13 +76,13 @@ BinaryMessenger get defaultBinaryMessenger {
|
|||||||
throw FlutterError(
|
throw FlutterError(
|
||||||
'ServicesBinding.defaultBinaryMessenger was accessed before the '
|
'ServicesBinding.defaultBinaryMessenger was accessed before the '
|
||||||
'binding was initialized.\n'
|
'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 '
|
'messenger before `runApp()` has been called (for example, during '
|
||||||
'plugin initialization), then you need to explicitly call the '
|
'plugin initialization), then you need to explicitly call the '
|
||||||
'`WidgetsFlutterBinding.ensureInitialized()` first.\n'
|
'`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 '
|
'`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;
|
return true;
|
||||||
|
@ -65,7 +65,7 @@ class PlatformViewsService {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -329,7 +329,7 @@ class Actions extends InheritedWidget {
|
|||||||
}
|
}
|
||||||
if (action == null) {
|
if (action == null) {
|
||||||
throw FlutterError('Unable to find an action for an intent in the $Actions widget in the context.\n'
|
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'
|
'contain a mapping for the given intent.\n'
|
||||||
'The context used was:\n'
|
'The context used was:\n'
|
||||||
' $context\n'
|
' $context\n'
|
||||||
|
@ -1250,7 +1250,7 @@ class _WidgetsAppState extends State<WidgetsApp> with WidgetsBindingObserver {
|
|||||||
final StringBuffer message = StringBuffer();
|
final StringBuffer message = StringBuffer();
|
||||||
message.writeln('\u2550' * 8);
|
message.writeln('\u2550' * 8);
|
||||||
message.writeln(
|
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.'
|
'localization delegates.'
|
||||||
);
|
);
|
||||||
for (final Type unsupportedType in unsupportedTypes) {
|
for (final Type unsupportedType in unsupportedTypes) {
|
||||||
@ -1265,7 +1265,7 @@ class _WidgetsAppState extends State<WidgetsApp> with WidgetsBindingObserver {
|
|||||||
}
|
}
|
||||||
message.writeln(
|
message.writeln(
|
||||||
'See https://flutter.dev/tutorials/internationalization/ for more\n'
|
'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.'
|
'and localizationsDelegates parameters.'
|
||||||
);
|
);
|
||||||
message.writeln('\u2550' * 8);
|
message.writeln('\u2550' * 8);
|
||||||
|
@ -144,7 +144,7 @@ class Directionality extends InheritedWidget {
|
|||||||
/// ```dart
|
/// ```dart
|
||||||
/// Opacity(
|
/// Opacity(
|
||||||
/// opacity: _visible ? 1.0 : 0.0,
|
/// 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}
|
/// {@end-tool}
|
||||||
@ -4029,7 +4029,7 @@ class Flex extends MultiChildRenderObjectWidget {
|
|||||||
/// Row(
|
/// Row(
|
||||||
/// children: <Widget>[
|
/// children: <Widget>[
|
||||||
/// const FlutterLogo(),
|
/// 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),
|
/// const Icon(Icons.sentiment_very_satisfied),
|
||||||
/// ],
|
/// ],
|
||||||
/// )
|
/// )
|
||||||
@ -4057,7 +4057,7 @@ class Flex extends MultiChildRenderObjectWidget {
|
|||||||
/// children: <Widget>[
|
/// children: <Widget>[
|
||||||
/// const FlutterLogo(),
|
/// const FlutterLogo(),
|
||||||
/// const Expanded(
|
/// 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),
|
/// const Icon(Icons.sentiment_very_satisfied),
|
||||||
/// ],
|
/// ],
|
||||||
|
@ -426,7 +426,7 @@ class EditableText extends StatefulWidget {
|
|||||||
assert(minLines == null || minLines > 0),
|
assert(minLines == null || minLines > 0),
|
||||||
assert(
|
assert(
|
||||||
(maxLines == null) || (minLines == null) || (maxLines >= minLines),
|
(maxLines == null) || (minLines == null) || (maxLines >= minLines),
|
||||||
'minLines can\'t be greater than maxLines',
|
"minLines can't be greater than maxLines",
|
||||||
),
|
),
|
||||||
assert(expands != null),
|
assert(expands != null),
|
||||||
assert(
|
assert(
|
||||||
|
@ -1222,7 +1222,7 @@ abstract class State<T extends StatefulWidget> extends Diagnosticable {
|
|||||||
ErrorSummary('setState() called in constructor: $this'),
|
ErrorSummary('setState() called in constructor: $this'),
|
||||||
ErrorHint(
|
ErrorHint(
|
||||||
'This happens when you call setState() on a State object for a widget that '
|
'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 '
|
'setState() in the constructor, since the state is already assumed to be dirty '
|
||||||
'when it is initially created.'
|
'when it is initially created.'
|
||||||
),
|
),
|
||||||
@ -3104,7 +3104,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
|
|||||||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
throw FlutterError.fromParts(<DiagnosticsNode>[
|
||||||
ErrorSummary('visitChildElements() called during build.'),
|
ErrorSummary('visitChildElements() called during build.'),
|
||||||
ErrorDescription(
|
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, '
|
'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 '
|
'so the children might not be constructed yet, or might be old children '
|
||||||
'that are going to be replaced.'
|
'that are going to be replaced.'
|
||||||
@ -3368,7 +3368,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
|
|||||||
assert(() {
|
assert(() {
|
||||||
if (parent == this) {
|
if (parent == this) {
|
||||||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
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),
|
DiagnosticsProperty<GlobalKey>('The offending GlobalKey was', key),
|
||||||
parent.describeElement('The parent of the widgets with that key was'),
|
parent.describeElement('The parent of the widgets with that key was'),
|
||||||
element.describeElement('The first child to get instantiated with that key became'),
|
element.describeElement('The first child to get instantiated with that key became'),
|
||||||
@ -3763,15 +3763,15 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
|
|||||||
assert(() {
|
assert(() {
|
||||||
if (_debugLifecycleState != _ElementLifecycle.active) {
|
if (_debugLifecycleState != _ElementLifecycle.active) {
|
||||||
throw FlutterError.fromParts(<DiagnosticsNode>[
|
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(
|
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.'
|
'stable.'
|
||||||
),
|
),
|
||||||
ErrorHint(
|
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() '
|
'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.'),
|
ErrorSummary('dependOnInheritedWidgetOfExactType<$targetType>() or dependOnInheritedElement() was called before ${_state.runtimeType}.initState() completed.'),
|
||||||
ErrorDescription(
|
ErrorDescription(
|
||||||
'When an inherited widget changes, for example if the value of Theme.of() changes, '
|
'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, '
|
'the inherited widget is in a constructor or an initState() method, '
|
||||||
'then the rebuilt dependent widget will not reflect the changes in the '
|
'then the rebuilt dependent widget will not reflect the changes in the '
|
||||||
'inherited widget.',
|
'inherited widget.',
|
||||||
|
@ -796,7 +796,7 @@ abstract class BoxScrollView extends ScrollView {
|
|||||||
/// shrinkWrap: true,
|
/// shrinkWrap: true,
|
||||||
/// padding: const EdgeInsets.all(20.0),
|
/// padding: const EdgeInsets.all(20.0),
|
||||||
/// children: <Widget>[
|
/// 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('Domestic life was never quite my style'),
|
||||||
/// const Text('When you smile, you knock me out, I fall apart'),
|
/// const Text('When you smile, you knock me out, I fall apart'),
|
||||||
/// const Text('And I thought I was so smart'),
|
/// const Text('And I thought I was so smart'),
|
||||||
@ -815,7 +815,7 @@ abstract class BoxScrollView extends ScrollView {
|
|||||||
/// sliver: SliverList(
|
/// sliver: SliverList(
|
||||||
/// delegate: SliverChildListDelegate(
|
/// delegate: SliverChildListDelegate(
|
||||||
/// <Widget>[
|
/// <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('Domestic life was never quite my style'),
|
||||||
/// const Text('When you smile, you knock me out, I fall apart'),
|
/// const Text('When you smile, you knock me out, I fall apart'),
|
||||||
/// const Text('And I thought I was so smart'),
|
/// const Text('And I thought I was so smart'),
|
||||||
@ -1307,7 +1307,7 @@ class ListView extends BoxScrollView {
|
|||||||
/// children: <Widget>[
|
/// children: <Widget>[
|
||||||
/// Container(
|
/// Container(
|
||||||
/// padding: const EdgeInsets.all(8),
|
/// 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],
|
/// color: Colors.teal[100],
|
||||||
/// ),
|
/// ),
|
||||||
/// Container(
|
/// Container(
|
||||||
@ -1359,7 +1359,7 @@ class ListView extends BoxScrollView {
|
|||||||
/// children: <Widget>[
|
/// children: <Widget>[
|
||||||
/// Container(
|
/// Container(
|
||||||
/// padding: const EdgeInsets.all(8),
|
/// 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],
|
/// color: Colors.green[100],
|
||||||
/// ),
|
/// ),
|
||||||
/// Container(
|
/// Container(
|
||||||
|
@ -1335,7 +1335,7 @@ class SliverMultiBoxAdaptorElement extends RenderObjectElement implements Render
|
|||||||
/// bool _visible = true;
|
/// bool _visible = true;
|
||||||
/// List<Widget> listItems = <Widget>[
|
/// List<Widget> listItems = <Widget>[
|
||||||
/// Text('Now you see me,'),
|
/// Text('Now you see me,'),
|
||||||
/// Text('Now you don\'t!'),
|
/// Text("Now you don't!"),
|
||||||
/// ];
|
/// ];
|
||||||
///
|
///
|
||||||
/// SliverOpacity(
|
/// SliverOpacity(
|
||||||
|
@ -156,7 +156,7 @@ void main() {
|
|||||||
expect(SchedulerBinding.instance.transientCallbackCount, equals(1));
|
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(
|
await tester.pumpWidget(boilerplate(child: const CupertinoButton(
|
||||||
child: Text('Tap me'),
|
child: Text('Tap me'),
|
||||||
onPressed: null,
|
onPressed: null,
|
||||||
|
@ -208,7 +208,7 @@ void main() {
|
|||||||
expect(_findStatic(), findsNothing);
|
expect(_findStatic(), findsNothing);
|
||||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/44152
|
}, 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();
|
final Widget child = _getChild();
|
||||||
await tester.pumpWidget(_getContextMenu(child: child));
|
await tester.pumpWidget(_getContextMenu(child: child));
|
||||||
expect(find.byType(BackdropFilter), findsNothing);
|
expect(find.byType(BackdropFilter), findsNothing);
|
||||||
@ -224,7 +224,7 @@ void main() {
|
|||||||
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/44152
|
}, 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 {
|
testWidgets('Portrait', (WidgetTester tester) async {
|
||||||
const Size portraitScreenSize = Size(600.0, 800.0);
|
const Size portraitScreenSize = Size(600.0, 800.0);
|
||||||
await binding.setSurfaceSize(portraitScreenSize);
|
await binding.setSurfaceSize(portraitScreenSize);
|
||||||
|
@ -163,7 +163,7 @@ Future<void> main() async {
|
|||||||
FlutterError.dumpErrorToConsole(FlutterErrorDetails(
|
FlutterError.dumpErrorToConsole(FlutterErrorDetails(
|
||||||
exception: getAssertionErrorWithoutMessage(),
|
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();
|
console.clear();
|
||||||
FlutterError.resetErrorCount();
|
FlutterError.resetErrorCount();
|
||||||
});
|
});
|
||||||
|
@ -6,7 +6,7 @@ import 'package:flutter_test/flutter_test.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
void main() {
|
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 List<String> log = <String>[];
|
||||||
final Widget app = MaterialApp(
|
final Widget app = MaterialApp(
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
@ -37,7 +37,7 @@ void main() {
|
|||||||
expect(log, <String>['build']);
|
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>[];
|
final List<String> log = <String>[];
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
MaterialApp(
|
MaterialApp(
|
||||||
|
@ -194,7 +194,7 @@ void main() {
|
|||||||
expect(material.color, persistentBackgroundColor);
|
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 double modalElevation = 5.0;
|
||||||
const Color modalBackgroundColor = Colors.yellow;
|
const Color modalBackgroundColor = Colors.yellow;
|
||||||
const BottomSheetThemeData bottomSheetTheme = BottomSheetThemeData(
|
const BottomSheetThemeData bottomSheetTheme = BottomSheetThemeData(
|
||||||
|
@ -29,7 +29,7 @@ void main() {
|
|||||||
' No Material widget found.\n'
|
' No Material widget found.\n'
|
||||||
' ListTile widgets require a Material widget ancestor.\n'
|
' ListTile widgets require a Material widget ancestor.\n'
|
||||||
' In material design, most widgets are conceptually "printed" on a\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'
|
' is represented by the Material widget. It is the Material widget\n'
|
||||||
' that renders ink splashes, for instance. Because of this, many\n'
|
' that renders ink splashes, for instance. Because of this, many\n'
|
||||||
' material library widgets require that there be a Material widget\n'
|
' material library widgets require that there be a Material widget\n'
|
||||||
|
@ -590,7 +590,7 @@ void main() {
|
|||||||
} on AssertionError catch (error) {
|
} on AssertionError catch (error) {
|
||||||
expect(
|
expect(
|
||||||
error.toString(),
|
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) {
|
} on AssertionError catch (error) {
|
||||||
expect(
|
expect(
|
||||||
error.toString(),
|
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) {
|
} on AssertionError catch (error) {
|
||||||
expect(
|
expect(
|
||||||
error.toString(),
|
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) {
|
} on AssertionError catch (error) {
|
||||||
expect(
|
expect(
|
||||||
error.toString(),
|
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();
|
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.
|
// Regression test for https://github.com/flutter/flutter/issues/30012.
|
||||||
|
|
||||||
final Finder rawButtonMaterial = find.descendant(
|
final Finder rawButtonMaterial = find.descendant(
|
||||||
|
@ -616,7 +616,7 @@ void main() {
|
|||||||
expect(tester.widget<OutlineButton>(outlineButton).enabled, false);
|
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) {
|
Widget buildFrame(VoidCallback onPressed) {
|
||||||
return Directionality(
|
return Directionality(
|
||||||
textDirection: TextDirection.ltr,
|
textDirection: TextDirection.ltr,
|
||||||
|
@ -36,7 +36,7 @@ Widget _buildBoilerplate({
|
|||||||
}
|
}
|
||||||
|
|
||||||
void main() {
|
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(
|
await tester.pumpWidget(
|
||||||
_buildBoilerplate(
|
_buildBoilerplate(
|
||||||
child: Center(
|
child: Center(
|
||||||
|
@ -80,15 +80,15 @@ void main() {
|
|||||||
'disabledThumbColor: Color(0xff000011)',
|
'disabledThumbColor: Color(0xff000011)',
|
||||||
'overlayColor: Color(0xff000012)',
|
'overlayColor: Color(0xff000012)',
|
||||||
'valueIndicatorColor: Color(0xff000013)',
|
'valueIndicatorColor: Color(0xff000013)',
|
||||||
'overlayShape: Instance of \'RoundSliderOverlayShape\'',
|
"overlayShape: Instance of 'RoundSliderOverlayShape'",
|
||||||
'tickMarkShape: Instance of \'RoundSliderTickMarkShape\'',
|
"tickMarkShape: Instance of 'RoundSliderTickMarkShape'",
|
||||||
'thumbShape: Instance of \'RoundSliderThumbShape\'',
|
"thumbShape: Instance of 'RoundSliderThumbShape'",
|
||||||
'trackShape: Instance of \'RoundedRectSliderTrackShape\'',
|
"trackShape: Instance of 'RoundedRectSliderTrackShape'",
|
||||||
'valueIndicatorShape: Instance of \'PaddleSliderValueIndicatorShape\'',
|
"valueIndicatorShape: Instance of 'PaddleSliderValueIndicatorShape'",
|
||||||
'rangeTickMarkShape: Instance of \'RoundRangeSliderTickMarkShape\'',
|
"rangeTickMarkShape: Instance of 'RoundRangeSliderTickMarkShape'",
|
||||||
'rangeThumbShape: Instance of \'RoundRangeSliderThumbShape\'',
|
"rangeThumbShape: Instance of 'RoundRangeSliderThumbShape'",
|
||||||
'rangeTrackShape: Instance of \'RoundedRectRangeSliderTrackShape\'',
|
"rangeTrackShape: Instance of 'RoundedRectRangeSliderTrackShape'",
|
||||||
'rangeValueIndicatorShape: Instance of \'PaddleRangeSliderValueIndicatorShape\'',
|
"rangeValueIndicatorShape: Instance of 'PaddleRangeSliderValueIndicatorShape'",
|
||||||
'showValueIndicator: always',
|
'showValueIndicator: always',
|
||||||
'valueIndicatorTextStyle: TextStyle(inherit: true, color: Color(0xff000000))',
|
'valueIndicatorTextStyle: TextStyle(inherit: true, color: Color(0xff000000))',
|
||||||
]);
|
]);
|
||||||
|
@ -2409,7 +2409,7 @@ void main() {
|
|||||||
),
|
),
|
||||||
body: tabTextContent.isNotEmpty
|
body: tabTextContent.isNotEmpty
|
||||||
? TabBarView(
|
? 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')),
|
: const Center(child: Text('No tabs')),
|
||||||
bottomNavigationBar: BottomAppBar(
|
bottomNavigationBar: BottomAppBar(
|
||||||
@ -2452,7 +2452,7 @@ void main() {
|
|||||||
await tester.tap(find.byKey(const Key('Add tab')));
|
await tester.tap(find.byKey(const Key('Add tab')));
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
expect(find.text('Tab 1'), findsOneWidget);
|
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
|
// Dynamically updates to zero tabs properly
|
||||||
await tester.tap(find.byKey(const Key('Delete tab')));
|
await tester.tap(find.byKey(const Key('Delete tab')));
|
||||||
|
@ -139,7 +139,7 @@ void main() {
|
|||||||
'Third line of stuff';
|
'Third line of stuff';
|
||||||
const String kMoreThanFourLines =
|
const String kMoreThanFourLines =
|
||||||
kThreeLines +
|
kThreeLines +
|
||||||
'\nFourth line won\'t display and ends at';
|
"\nFourth line won't display and ends at";
|
||||||
|
|
||||||
// Returns the first RenderEditable.
|
// Returns the first RenderEditable.
|
||||||
RenderEditable findRenderEditable(WidgetTester tester) {
|
RenderEditable findRenderEditable(WidgetTester tester) {
|
||||||
@ -914,7 +914,7 @@ void main() {
|
|||||||
expect(controller.selection.baseOffset, testValue.indexOf('h'));
|
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();
|
final TextEditingController controller = TextEditingController();
|
||||||
|
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
@ -2322,7 +2322,7 @@ void main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const String hintPlaceholder = 'Placeholder';
|
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));
|
await tester.pumpWidget(builder(null, hintPlaceholder));
|
||||||
|
|
||||||
RenderBox findHintText(String hint) => tester.renderObject(find.text(hint));
|
RenderBox findHintText(String hint) => tester.renderObject(find.text(hint));
|
||||||
@ -7367,7 +7367,7 @@ void main() {
|
|||||||
expect(renderBox.size.height, greaterThanOrEqualTo(kMinInteractiveDimension));
|
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(
|
await tester.pumpWidget(MaterialApp(
|
||||||
theme: ThemeData(),
|
theme: ThemeData(),
|
||||||
home: const Scaffold(
|
home: const Scaffold(
|
||||||
|
@ -121,7 +121,7 @@ void main() {
|
|||||||
expect(paint2.color, const Color(0x00000000));
|
expect(paint2.color, const Color(0x00000000));
|
||||||
expect(paint2.blendMode, BlendMode.srcOver);
|
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 side0 = BorderSide(width: 0.0);
|
||||||
const BorderSide side1 = BorderSide(width: 1.0);
|
const BorderSide side1 = BorderSide(width: 1.0);
|
||||||
const BorderSide side2 = BorderSide(width: 2.0);
|
const BorderSide side2 = BorderSide(width: 2.0);
|
||||||
|
@ -199,7 +199,7 @@ void main() {
|
|||||||
expect(resultingCompleter2, completer2);
|
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 TestImage testImage = TestImage(width: 8, height: 8);
|
||||||
|
|
||||||
const FailingTestImageProvider(1, 1, image: testImage)
|
const FailingTestImageProvider(1, 1, image: testImage)
|
||||||
|
@ -9,7 +9,7 @@ import 'package:flutter/painting.dart';
|
|||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
group('CircularNotchedRectangle', () {
|
group('CircularNotchedRectangle', () {
|
||||||
test('guest and host don\'t overlap', () {
|
test("guest and host don't overlap", () {
|
||||||
const CircularNotchedRectangle shape = CircularNotchedRectangle();
|
const CircularNotchedRectangle shape = CircularNotchedRectangle();
|
||||||
const Rect host = Rect.fromLTRB(0.0, 100.0, 300.0, 300.0);
|
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);
|
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'
|
' This RenderAspectRatio was given an aspect ratio of 0.5 but was\n'
|
||||||
' given both unbounded width and unbounded height constraints.\n'
|
' given both unbounded width and unbounded height constraints.\n'
|
||||||
' Because both constraints were unbounded, this render object\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.
|
// 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'
|
' constraints: MISSING\n'
|
||||||
' size: MISSING\n'
|
' size: MISSING\n'
|
||||||
' additionalConstraints: BoxConstraints(0.0<=w<=Infinity, h=100.0)\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'
|
' probably because it has never been laid out. This means it cannot\n'
|
||||||
' be accurately hit-tested.\n'
|
' be accurately hit-tested.\n'
|
||||||
' If you are trying to perform a hit test during the layout phase\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'
|
' 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'
|
' been called).\n'
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -954,7 +954,7 @@ void main() {
|
|||||||
result.diagnostics.singleWhere((DiagnosticsNode node) => node.level == DiagnosticLevel.hint).toString(),
|
result.diagnostics.singleWhere((DiagnosticsNode node) => node.level == DiagnosticLevel.hint).toString(),
|
||||||
'If you are trying to perform a hit test during the layout phase '
|
'If you are trying to perform a hit test during the layout phase '
|
||||||
'itself, make sure you only hit test nodes that have completed '
|
'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).',
|
'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,
|
final Layer root = _withBackgroundAnnotation(1000,
|
||||||
_Layers(
|
_Layers(
|
||||||
ContainerLayer(),
|
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,
|
final Layer root = _withBackgroundAnnotation(1000,
|
||||||
_Layers(
|
_Layers(
|
||||||
ContainerLayer(),
|
ContainerLayer(),
|
||||||
@ -574,7 +574,7 @@ void main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('AnnotatedRegionLayer.findAllAnnotations should still check children and return '
|
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);
|
const Offset position = Offset(5, 5);
|
||||||
|
|
||||||
final Layer root = _withBackgroundAnnotation(1000,
|
final Layer root = _withBackgroundAnnotation(1000,
|
||||||
@ -596,7 +596,7 @@ void main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('AnnotatedRegionLayer.findAllAnnotations should still check children and return '
|
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);
|
const Offset position = Offset(5, 5);
|
||||||
|
|
||||||
final Layer root = _withBackgroundAnnotation(1000,
|
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', () {
|
'during a successful hit if it is not opaque', () {
|
||||||
const Offset position = Offset(5, 5);
|
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', () {
|
'during a successful hit if it is opaque', () {
|
||||||
const Offset position = Offset(5, 5);
|
const Offset position = Offset(5, 5);
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ import 'package:flutter_test/flutter_test.dart';
|
|||||||
|
|
||||||
import 'rendering_tester.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() {
|
void main() {
|
||||||
test('getOffsetForCaret control test', () {
|
test('getOffsetForCaret control test', () {
|
||||||
@ -88,7 +88,7 @@ void main() {
|
|||||||
expect(range50.textInside(_kText), equals(' '));
|
expect(range50.textInside(_kText), equals(' '));
|
||||||
|
|
||||||
final TextRange range85 = paragraph.getWordBoundary(const TextPosition(offset: 75));
|
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);
|
}, skip: isBrowser);
|
||||||
|
|
||||||
test('overflow test', () {
|
test('overflow test', () {
|
||||||
@ -170,7 +170,7 @@ void main() {
|
|||||||
test('maxLines', () {
|
test('maxLines', () {
|
||||||
final RenderParagraph paragraph = RenderParagraph(
|
final RenderParagraph paragraph = RenderParagraph(
|
||||||
const TextSpan(
|
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
|
// 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
|
// 0 1 2 3 4 5 6 7 8 9 10 11 12
|
||||||
style: TextStyle(fontFamily: 'Ahem', fontSize: 10.0),
|
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'
|
'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'
|
'Instead of mutating the existing list, create a new list containing the desired `SemanticsNode`s.\n'
|
||||||
'Error details:\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(
|
expect(
|
||||||
error.diagnostics.singleWhere((DiagnosticsNode node) => node.level == DiagnosticLevel.hint).toString(),
|
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');
|
viewsController.registerViewType('webview');
|
||||||
final AndroidViewController viewController =
|
final AndroidViewController viewController =
|
||||||
PlatformViewsService.initAndroidView(id: 0, viewType: 'webview', layoutDirection: TextDirection.rtl);
|
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');
|
viewsController.registerViewType('webview');
|
||||||
final AndroidViewController viewController =
|
final AndroidViewController viewController =
|
||||||
PlatformViewsService.initAndroidView(id: 0, viewType: 'webview', layoutDirection: TextDirection.ltr);
|
PlatformViewsService.initAndroidView(id: 0, viewType: 'webview', layoutDirection: TextDirection.ltr);
|
||||||
|
@ -343,7 +343,7 @@ void main() {
|
|||||||
.map((DiagnosticsNode node) => node.toString())
|
.map((DiagnosticsNode node) => node.toString())
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
expect(description, equals(<String>['key: [<\'foo\'>]']));
|
expect(description, equals(<String>["key: [<'foo'>]"]));
|
||||||
});
|
});
|
||||||
testWidgets('CallbackAction debugFillProperties', (WidgetTester tester) async {
|
testWidgets('CallbackAction debugFillProperties', (WidgetTester tester) async {
|
||||||
final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
|
final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
|
||||||
@ -360,7 +360,7 @@ void main() {
|
|||||||
.map((DiagnosticsNode node) => node.toString())
|
.map((DiagnosticsNode node) => node.toString())
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
expect(description, equals(<String>['intentKey: [<\'foo\'>]']));
|
expect(description, equals(<String>["intentKey: [<'foo'>]"]));
|
||||||
});
|
});
|
||||||
testWidgets('default Actions debugFillProperties', (WidgetTester tester) async {
|
testWidgets('default Actions debugFillProperties', (WidgetTester tester) async {
|
||||||
final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
|
final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
|
||||||
@ -401,7 +401,7 @@ void main() {
|
|||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
expect(description[0], equalsIgnoringHashCodes('dispatcher: ActionDispatcher#00000'));
|
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);
|
}, skip: isBrowser);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ import 'package:flutter_test/flutter_test.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
void main() {
|
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));
|
tester.binding.addTime(const Duration(seconds: 15));
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
MaterialApp(
|
MaterialApp(
|
||||||
|
@ -309,7 +309,7 @@ class DoesNotHitRenderBox extends Matcher {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Description describe(Description description) =>
|
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
|
@override
|
||||||
bool matches(dynamic item, Map<dynamic, dynamic> matchState) {
|
bool matches(dynamic item, Map<dynamic, dynamic> matchState) {
|
||||||
|
@ -162,7 +162,7 @@ void main() {
|
|||||||
expect(error.toStringDeep(), equalsIgnoringHashCodes(
|
expect(error.toStringDeep(), equalsIgnoringHashCodes(
|
||||||
'FlutterError\n'
|
'FlutterError\n'
|
||||||
' Failed to update the list of CustomPainterSemantics:\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'
|
' must have unique keys.\n'
|
||||||
' Flex(direction: vertical, mainAxisAlignment: start,\n'
|
' Flex(direction: vertical, mainAxisAlignment: start,\n'
|
||||||
' crossAxisAlignment: center) has multiple children with key\n'
|
' crossAxisAlignment: center) has multiple children with key\n'
|
||||||
' [<\'key\'>].\n',
|
" [<'key'>].\n",
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -56,7 +56,7 @@ void main() {
|
|||||||
error.toStringDeep(),
|
error.toStringDeep(),
|
||||||
equalsIgnoringHashCodes(
|
equalsIgnoringHashCodes(
|
||||||
'FlutterError\n'
|
'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'
|
' A build function returned context.widget.\n'
|
||||||
' The offending widget is:\n'
|
' The offending widget is:\n'
|
||||||
' Container\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'
|
' 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'
|
' introduces a loop in the widget tree that can cause the app to\n'
|
||||||
' crash.\n'
|
' crash.\n'
|
||||||
|
@ -63,7 +63,7 @@ void main() {
|
|||||||
expect(good, isTrue);
|
expect(good, isTrue);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Directionality can\'t be null', (WidgetTester tester) async {
|
testWidgets("Directionality can't be null", (WidgetTester tester) async {
|
||||||
expect(() {
|
expect(() {
|
||||||
Directionality(textDirection: nonconst(null), child: const Placeholder());
|
Directionality(textDirection: nonconst(null), child: const Placeholder());
|
||||||
}, throwsAssertionError);
|
}, throwsAssertionError);
|
||||||
|
@ -3043,7 +3043,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw TestFailure('HandlePositionInViewport can\'t be null.');
|
throw TestFailure("HandlePositionInViewport can't be null.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
expect(state.selectionOverlay.handlesAreVisible, isTrue);
|
expect(state.selectionOverlay.handlesAreVisible, isTrue);
|
||||||
@ -3923,7 +3923,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw TestFailure('HandlePositionInViewport can\'t be null.');
|
throw TestFailure("HandlePositionInViewport can't be null.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
expect(state.selectionOverlay.handlesAreVisible, isTrue);
|
expect(state.selectionOverlay.handlesAreVisible, isTrue);
|
||||||
@ -3969,7 +3969,7 @@ void main() {
|
|||||||
await verifyVisibility(HandlePositionInViewport.rightEdge, false, HandlePositionInViewport.rightEdge, false);
|
await verifyVisibility(HandlePositionInViewport.rightEdge, false, HandlePositionInViewport.rightEdge, false);
|
||||||
}, skip: isBrowser, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS, TargetPlatform.macOS }));
|
}, 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.
|
// 3 lines of text, where the last line overflows and requires scrolling.
|
||||||
const String testText = 'XXXXX\nXXXXX\nXXXXX';
|
const String testText = 'XXXXX\nXXXXX\nXXXXX';
|
||||||
final TextEditingController controller = TextEditingController(text: testText);
|
final TextEditingController controller = TextEditingController(text: testText);
|
||||||
|
@ -251,7 +251,7 @@ Future<void> main() async {
|
|||||||
expect(findFadeInImage(tester).target.opacity, moreOrLessEquals(1));
|
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 placeholderProvider = TestImageProvider(placeholderImage);
|
||||||
final TestImageProvider imageProvider = TestImageProvider(targetImage);
|
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
|
// both of these cases have failed in the past due to floating point issues
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
Center(
|
Center(
|
||||||
|
@ -174,7 +174,7 @@ void main() {
|
|||||||
semantics.dispose();
|
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 {
|
testWidgets('should update semantics notations when switching from the default delegate', (WidgetTester tester) async {
|
||||||
final SemanticsTester semantics = SemanticsTester(tester);
|
final SemanticsTester semantics = SemanticsTester(tester);
|
||||||
final Map<Type, GestureRecognizerFactory> gestures =
|
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', () {
|
group('should map onTap to', () {
|
||||||
testWidgets('null when there is no TapGR', (WidgetTester tester) async {
|
testWidgets('null when there is no TapGR', (WidgetTester tester) async {
|
||||||
final SemanticsTester semantics = SemanticsTester(tester);
|
final SemanticsTester semantics = SemanticsTester(tester);
|
||||||
|
@ -91,7 +91,7 @@ void main() {
|
|||||||
await tester.pumpWidget(Container());
|
await tester.pumpWidget(Container());
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Pan doesn\'t crash', (WidgetTester tester) async {
|
testWidgets("Pan doesn't crash", (WidgetTester tester) async {
|
||||||
bool didStartPan = false;
|
bool didStartPan = false;
|
||||||
Offset panDelta;
|
Offset panDelta;
|
||||||
bool didEndPan = false;
|
bool didEndPan = false;
|
||||||
@ -523,7 +523,7 @@ void main() {
|
|||||||
expect(forcePressStart, 0);
|
expect(forcePressStart, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
group('RawGestureDetectorState\'s debugFillProperties', () {
|
group("RawGestureDetectorState's debugFillProperties", () {
|
||||||
testWidgets('when default', (WidgetTester tester) async {
|
testWidgets('when default', (WidgetTester tester) async {
|
||||||
final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
|
final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
|
||||||
final GlobalKey key = GlobalKey();
|
final GlobalKey key = GlobalKey();
|
||||||
|
@ -53,7 +53,7 @@ void main() {
|
|||||||
expect(error.toString(), startsWith('Multiple widgets used the same GlobalKey.\n'));
|
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(), isNot(contains('different widgets that both had the following description')));
|
||||||
expect(error.toString(), contains('Container'));
|
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(), contains('[GlobalObjectKey ${describeIdentity(0)}]'));
|
||||||
expect(error.toString(), endsWith('\nA GlobalKey can only be specified on one widget at a time in the widget tree.'));
|
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();
|
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(
|
await tester.pumpWidget(
|
||||||
const Directionality(
|
const Directionality(
|
||||||
textDirection: TextDirection.ltr,
|
textDirection: TextDirection.ltr,
|
||||||
|
@ -64,7 +64,7 @@ void main() {
|
|||||||
expect(renderImage.image, isNull);
|
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 GlobalKey key = GlobalKey();
|
||||||
final TestImageProvider imageProvider1 = TestImageProvider();
|
final TestImageProvider imageProvider1 = TestImageProvider();
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
@ -144,7 +144,7 @@ void main() {
|
|||||||
expect(renderImage.image, isNull);
|
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 GlobalKey key = GlobalKey();
|
||||||
final TestImageProvider imageProvider1 = TestImageProvider();
|
final TestImageProvider imageProvider1 = TestImageProvider();
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
@ -1199,7 +1199,7 @@ void main() {
|
|||||||
expect(find.byType(RawImage), findsOneWidget);
|
expect(find.byType(RawImage), findsOneWidget);
|
||||||
}, skip: isBrowser);
|
}, 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 ui.Image image = await tester.runAsync(createTestImage);
|
||||||
final TestImageStreamCompleter streamCompleter = TestImageStreamCompleter();
|
final TestImageStreamCompleter streamCompleter = TestImageStreamCompleter();
|
||||||
final TestImageProvider imageProvider = TestImageProvider(streamCompleter: streamCompleter);
|
final TestImageProvider imageProvider = TestImageProvider(streamCompleter: streamCompleter);
|
||||||
|
@ -408,7 +408,7 @@ void main() {
|
|||||||
expect(inheritedValue, equals(3));
|
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;
|
int buildCount = 0;
|
||||||
|
|
||||||
final Widget inner = Container(
|
final Widget inner = Container(
|
||||||
|
@ -185,7 +185,7 @@ void main() {
|
|||||||
'FlutterError\n'
|
'FlutterError\n'
|
||||||
' RenderListBody must have a bounded constraint for its cross axis.\n'
|
' RenderListBody must have a bounded constraint for its cross axis.\n'
|
||||||
' RenderListBody forces its children to expand to fit the\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'
|
' constrains the cross axis to a finite dimension.\n'
|
||||||
' If you are attempting to nest a RenderListBody with one direction\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'
|
' 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;
|
const double kFlingOffset = kHeight * 20.0;
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
testWidgets('Flings don\'t stutter', (WidgetTester tester) async {
|
testWidgets("Flings don't stutter", (WidgetTester tester) async {
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
Directionality(
|
Directionality(
|
||||||
textDirection: TextDirection.ltr,
|
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();
|
final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
|
||||||
RenderPointerListener().debugFillProperties(builder);
|
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();
|
final DiagnosticPropertiesBuilder builder = DiagnosticPropertiesBuilder();
|
||||||
RenderPointerListener(
|
RenderPointerListener(
|
||||||
onPointerDown: (PointerDownEvent event) {},
|
onPointerDown: (PointerDownEvent event) {},
|
||||||
|
@ -162,7 +162,7 @@ void main() {
|
|||||||
expect(painter, doesNotOverscroll);
|
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 {
|
testWidgets('down', (WidgetTester tester) async {
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
const Directionality(
|
const Directionality(
|
||||||
|
@ -198,7 +198,7 @@ void main() {
|
|||||||
expect(settingsOffset.dy, 100.0);
|
expect(settingsOffset.dy, 100.0);
|
||||||
}, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS, TargetPlatform.macOS }));
|
}, 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 containerKey1 = GlobalKey();
|
||||||
final GlobalKey containerKey2 = GlobalKey();
|
final GlobalKey containerKey2 = GlobalKey();
|
||||||
final Map<String, WidgetBuilder> routes = <String, WidgetBuilder>{
|
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