diff --git a/analysis_options.yaml b/analysis_options.yaml index 04c0a6d1cf..520b410bf3 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -125,7 +125,7 @@ linter: # - prefer_interpolation_to_compose_strings # not yet tested - prefer_is_empty - prefer_is_not_empty - # - prefer_single_quote_strings # not yet tested + - prefer_single_quotes # - public_member_api_docs # this is the only difference from analysis_options_repo.yaml - recursive_getters - slash_for_doc_comments diff --git a/analysis_options_repo.yaml b/analysis_options_repo.yaml index d4e5409eea..27d679cb89 100644 --- a/analysis_options_repo.yaml +++ b/analysis_options_repo.yaml @@ -119,7 +119,7 @@ linter: # - prefer_interpolation_to_compose_strings # not yet tested - prefer_is_empty - prefer_is_not_empty - # - prefer_single_quote_strings # not yet tested + - prefer_single_quotes - public_member_api_docs # this is the only difference from analysis_options_repo.yaml - recursive_getters - slash_for_doc_comments diff --git a/dev/automated_tests/flutter_test/filtering_test.dart b/dev/automated_tests/flutter_test/filtering_test.dart index 1cf3277f46..c525b9e125 100644 --- a/dev/automated_tests/flutter_test/filtering_test.dart +++ b/dev/automated_tests/flutter_test/filtering_test.dart @@ -9,6 +9,6 @@ void main() { expect(2 + 2, 4); }); test('excluded', () { - throw "this test should have been filtered out"; + throw 'this test should have been filtered out'; }); } diff --git a/dev/benchmarks/complex_layout/test_driver/semantics_perf_test.dart b/dev/benchmarks/complex_layout/test_driver/semantics_perf_test.dart index 28b1ed026c..b00af20cc3 100644 --- a/dev/benchmarks/complex_layout/test_driver/semantics_perf_test.dart +++ b/dev/benchmarks/complex_layout/test_driver/semantics_perf_test.dart @@ -31,7 +31,7 @@ void main() { expect(await driver.setSemantics(true), isTrue); }); - final Iterable semanticsEvents = timeline.events.where((TimelineEvent event) => event.name == "Semantics"); + final Iterable semanticsEvents = timeline.events.where((TimelineEvent event) => event.name == 'Semantics'); if (semanticsEvents.length != 1) fail('Expected exactly one semantics event, got ${semanticsEvents.length}'); final Duration semanticsTreeCreation = semanticsEvents.first.duration; diff --git a/dev/manual_tests/lib/card_collection.dart b/dev/manual_tests/lib/card_collection.dart index b9a3e27d1a..a4e11b6a4b 100644 --- a/dev/manual_tests/lib/card_collection.dart +++ b/dev/manual_tests/lib/card_collection.dart @@ -29,7 +29,7 @@ class CardCollectionState extends State { const TextStyle(color: Colors.white, fontSize: 18.0, fontWeight: FontWeight.bold); // TODO(hansmuller): need a local image asset - static const String _sunshineURL = "http://www.walltor.com/images/wallpaper/good-morning-sunshine-58540.jpg"; + static const String _sunshineURL = 'http://www.walltor.com/images/wallpaper/good-morning-sunshine-58540.jpg'; static const double kCardMargins = 8.0; static const double kFixedCardHeight = 100.0; @@ -103,23 +103,23 @@ class CardCollectionState extends State { child: new ListView( children: [ const DrawerHeader(child: const Center(child: const Text('Options'))), - buildDrawerCheckbox("Make card labels editable", _editable, _toggleEditable), - buildDrawerCheckbox("Fixed size cards", _fixedSizeCards, _toggleFixedSizeCards), - buildDrawerCheckbox("Let the sun shine", _sunshine, _toggleSunshine), - buildDrawerCheckbox("Vary font sizes", _varyFontSizes, _toggleVaryFontSizes, enabled: !_editable), + buildDrawerCheckbox('Make card labels editable', _editable, _toggleEditable), + buildDrawerCheckbox('Fixed size cards', _fixedSizeCards, _toggleFixedSizeCards), + buildDrawerCheckbox('Let the sun shine', _sunshine, _toggleSunshine), + buildDrawerCheckbox('Vary font sizes', _varyFontSizes, _toggleVaryFontSizes, enabled: !_editable), const Divider(), - buildDrawerColorRadioItem("Deep Purple", Colors.deepPurple, _primaryColor, _selectColor), - buildDrawerColorRadioItem("Green", Colors.green, _primaryColor, _selectColor), - buildDrawerColorRadioItem("Amber", Colors.amber, _primaryColor, _selectColor), - buildDrawerColorRadioItem("Teal", Colors.teal, _primaryColor, _selectColor), + buildDrawerColorRadioItem('Deep Purple', Colors.deepPurple, _primaryColor, _selectColor), + buildDrawerColorRadioItem('Green', Colors.green, _primaryColor, _selectColor), + buildDrawerColorRadioItem('Amber', Colors.amber, _primaryColor, _selectColor), + buildDrawerColorRadioItem('Teal', Colors.teal, _primaryColor, _selectColor), const Divider(), - buildDrawerDirectionRadioItem("Dismiss horizontally", DismissDirection.horizontal, _dismissDirection, _changeDismissDirection, icon: Icons.code), - buildDrawerDirectionRadioItem("Dismiss left", DismissDirection.endToStart, _dismissDirection, _changeDismissDirection, icon: Icons.arrow_back), - buildDrawerDirectionRadioItem("Dismiss right", DismissDirection.startToEnd, _dismissDirection, _changeDismissDirection, icon: Icons.arrow_forward), + buildDrawerDirectionRadioItem('Dismiss horizontally', DismissDirection.horizontal, _dismissDirection, _changeDismissDirection, icon: Icons.code), + buildDrawerDirectionRadioItem('Dismiss left', DismissDirection.endToStart, _dismissDirection, _changeDismissDirection, icon: Icons.arrow_back), + buildDrawerDirectionRadioItem('Dismiss right', DismissDirection.startToEnd, _dismissDirection, _changeDismissDirection, icon: Icons.arrow_forward), const Divider(), - buildFontRadioItem("Left-align text", TextAlign.left, _textAlign, _changeTextAlign, icon: Icons.format_align_left, enabled: !_editable), - buildFontRadioItem("Center-align text", TextAlign.center, _textAlign, _changeTextAlign, icon: Icons.format_align_center, enabled: !_editable), - buildFontRadioItem("Right-align text", TextAlign.right, _textAlign, _changeTextAlign, icon: Icons.format_align_right, enabled: !_editable), + buildFontRadioItem('Left-align text', TextAlign.left, _textAlign, _changeTextAlign, icon: Icons.format_align_left, enabled: !_editable), + buildFontRadioItem('Center-align text', TextAlign.center, _textAlign, _changeTextAlign, icon: Icons.format_align_center, enabled: !_editable), + buildFontRadioItem('Right-align text', TextAlign.right, _textAlign, _changeTextAlign, icon: Icons.format_align_right, enabled: !_editable), const Divider(), new ListTile( leading: const Icon(Icons.dvr), @@ -282,16 +282,16 @@ class CardCollectionState extends State { String backgroundMessage; switch (_dismissDirection) { case DismissDirection.horizontal: - backgroundMessage = "Swipe in either direction"; + backgroundMessage = 'Swipe in either direction'; break; case DismissDirection.endToStart: - backgroundMessage = "Swipe left to dismiss"; + backgroundMessage = 'Swipe left to dismiss'; break; case DismissDirection.startToEnd: - backgroundMessage = "Swipe right to dismiss"; + backgroundMessage = 'Swipe right to dismiss'; break; default: - backgroundMessage = "Unsupported dismissDirection"; + backgroundMessage = 'Unsupported dismissDirection'; } // TODO(abarth): This icon is wrong in RTL. diff --git a/dev/manual_tests/lib/material_arc.dart b/dev/manual_tests/lib/material_arc.dart index 4846ab6eea..3e1d13063b 100644 --- a/dev/manual_tests/lib/material_arc.dart +++ b/dev/manual_tests/lib/material_arc.dart @@ -211,7 +211,7 @@ class _PointDemoState extends State<_PointDemo> { child: new Padding( padding: const EdgeInsets.all(16.0), child: new Text( - "Tap the refresh button to run the animation. Drag the green " + 'Tap the refresh button to run the animation. Drag the green ' "and red points to change the animation's path.", style: Theme.of(context).textTheme.caption.copyWith(fontSize: 16.0) ) @@ -384,7 +384,7 @@ class _RectangleDemoState extends State<_RectangleDemo> { child: new Padding( padding: const EdgeInsets.all(16.0), child: new Text( - "Tap the refresh button to run the animation. Drag the rectangles " + 'Tap the refresh button to run the animation. Drag the rectangles ' "to change the animation's path.", style: Theme.of(context).textTheme.caption.copyWith(fontSize: 16.0) ) diff --git a/dev/manual_tests/lib/page_view.dart b/dev/manual_tests/lib/page_view.dart index 5425d945da..ea08fa259a 100644 --- a/dev/manual_tests/lib/page_view.dart +++ b/dev/manual_tests/lib/page_view.dart @@ -112,7 +112,7 @@ class PageViewAppState extends State { return new AppBar( title: const Text('PageView'), actions: [ - new Text(scrollDirection == Axis.horizontal ? "horizontal" : "vertical"), + new Text(scrollDirection == Axis.horizontal ? 'horizontal' : 'vertical'), ], ); } diff --git a/dev/manual_tests/test/card_collection_test.dart b/dev/manual_tests/test/card_collection_test.dart index b35352d148..93cb39761c 100644 --- a/dev/manual_tests/test/card_collection_test.dart +++ b/dev/manual_tests/test/card_collection_test.dart @@ -8,7 +8,7 @@ import 'package:flutter_test/flutter_test.dart'; import '../lib/card_collection.dart' as card_collection; void main() { - testWidgets("Card Collection smoke test", (WidgetTester tester) async { + testWidgets('Card Collection smoke test', (WidgetTester tester) async { card_collection.main(); // builds the app and schedules a frame but doesn't trigger one await tester.pump(); // see https://github.com/flutter/flutter/issues/1865 await tester.pump(); // triggers a frame diff --git a/dev/manual_tests/test/color_testing_demo_test.dart b/dev/manual_tests/test/color_testing_demo_test.dart index f7cb3973bb..c00f64c8e4 100644 --- a/dev/manual_tests/test/color_testing_demo_test.dart +++ b/dev/manual_tests/test/color_testing_demo_test.dart @@ -8,7 +8,7 @@ import 'package:flutter_test/flutter_test.dart'; import '../lib/color_testing_demo.dart' as color_testing_demo; void main() { - testWidgets("Color testing demo smoke test", (WidgetTester tester) async { + testWidgets('Color testing demo smoke test', (WidgetTester tester) async { color_testing_demo.main(); // builds the app and schedules a frame but doesn't trigger one await tester.pump(); // see https://github.com/flutter/flutter/issues/1865 await tester.pump(); // triggers a frame diff --git a/dev/tools/gen_localizations.dart b/dev/tools/gen_localizations.dart index b3e9e61b66..d2558ebf01 100644 --- a/dev/tools/gen_localizations.dart +++ b/dev/tools/gen_localizations.dart @@ -42,34 +42,35 @@ const String outputHeader = ''' final Map> localeToResources = >{}; /// Maps locales to resource attributes. -/// +/// /// See also https://github.com/googlei18n/app-resource-bundle/wiki/ApplicationResourceBundleSpecification#resource-attributes final Map> localeToResourceAttributes = >{}; -// Return s as a Dart-parseable raw string in double quotes. Expand double quotes: -// foo => r"foo" -// foo "bar" => r"foo " '"' r"bar" '"' +// Return s as a Dart-parseable raw string in single or double quotes. Expand double quotes: +// foo => r'foo' +// foo "bar" => r'foo "bar"' +// foo 'bar' => r'foo ' "'" r'bar' "'" String generateString(String s) { - if (!s.contains('"')) - return 'r"$s"'; + if (!s.contains("'")) + return "r'$s'"; final StringBuffer output = new StringBuffer(); bool started = false; // Have we started writing a raw string. for (int i = 0; i < s.length; i++) { - if (s[i] == '"') { + if (s[i] == "'") { if (started) - output.write('"'); - output.write(' \'"\' '); + output.write("'"); + output.write(' "\'" '); started = false; } else if (!started) { - output.write('r"${s[i]}'); + output.write("r'${s[i]}"); started = true; } else { output.write(s[i]); } } if (started) - output.write('"'); + output.write("'"); return output.toString(); } @@ -84,12 +85,12 @@ String generateLocalizationsMap() { const Map> localizations = const > {'''); for (String locale in localeToResources.keys.toList()..sort()) { - output.writeln(' "$locale": const {'); + output.writeln(" '$locale': const {"); final Map resources = localeToResources[locale]; for (String name in resources.keys) { final String value = generateString(resources[name]); - output.writeln(' "$name": $value,'); + output.writeln(" '$name': $value,"); } output.writeln(' },'); } diff --git a/dev/tools/mega_gallery.dart b/dev/tools/mega_gallery.dart index 371d1d64b2..34bb04bf97 100644 --- a/dev/tools/mega_gallery.dart +++ b/dev/tools/mega_gallery.dart @@ -91,7 +91,7 @@ void _createEntry(File mainFile, int copies) { for (int i = 1; i < copies; i++) { imports.writeln("import 'gallery_$i/main.dart' as main_$i;"); - importRefs.writeln(" main_$i.main;"); + importRefs.writeln(' main_$i.main;'); } final String contents = ''' diff --git a/examples/catalog/bin/sample_page.dart b/examples/catalog/bin/sample_page.dart index 6efa4c4732..29a5b0932a 100644 --- a/examples/catalog/bin/sample_page.dart +++ b/examples/catalog/bin/sample_page.dart @@ -57,7 +57,7 @@ String expandTemplate(String template, Map values) { if (match.groupCount != 1) throw new SampleError('bad template keyword $match[0]'); final String keyword = match[1]; - return (values[keyword] ?? ""); + return (values[keyword] ?? ''); }); } diff --git a/examples/catalog/test/animated_list_test.dart b/examples/catalog/test/animated_list_test.dart index df741e7f9e..2436d24e71 100644 --- a/examples/catalog/test/animated_list_test.dart +++ b/examples/catalog/test/animated_list_test.dart @@ -8,7 +8,7 @@ import 'package:flutter_test/flutter_test.dart'; import '../lib/animated_list.dart' as animated_list_sample; void main() { - testWidgets("animated_list sample app smoke test", (WidgetTester tester) async { + testWidgets('animated_list sample app smoke test', (WidgetTester tester) async { animated_list_sample.main(); await tester.pump(); diff --git a/examples/catalog/test/basic_app_bar_test.dart b/examples/catalog/test/basic_app_bar_test.dart index 9e1923c695..b4f44d26bb 100644 --- a/examples/catalog/test/basic_app_bar_test.dart +++ b/examples/catalog/test/basic_app_bar_test.dart @@ -20,7 +20,7 @@ Finder findChoiceCard(IconData icon) { } void main() { - testWidgets("basic_app_bar sample smoke test", (WidgetTester tester) async { + testWidgets('basic_app_bar sample smoke test', (WidgetTester tester) async { basic_app_bar_sample.main(); await tester.pump(); diff --git a/examples/catalog/test/expansion_tile_sample_test.dart b/examples/catalog/test/expansion_tile_sample_test.dart index 55fbf4ed9f..caf5e1eb51 100644 --- a/examples/catalog/test/expansion_tile_sample_test.dart +++ b/examples/catalog/test/expansion_tile_sample_test.dart @@ -9,7 +9,7 @@ import '../lib/expansion_tile_sample.dart' as expansion_tile_sample; import '../lib/expansion_tile_sample.dart' show Entry; void main() { - testWidgets("expansion_tile sample smoke test", (WidgetTester tester) async { + testWidgets('expansion_tile sample smoke test', (WidgetTester tester) async { expansion_tile_sample.main(); await tester.pump(); diff --git a/examples/catalog/test/tabbed_app_bar_test.dart b/examples/catalog/test/tabbed_app_bar_test.dart index 4eec07daf0..2b1ef58e59 100644 --- a/examples/catalog/test/tabbed_app_bar_test.dart +++ b/examples/catalog/test/tabbed_app_bar_test.dart @@ -19,7 +19,7 @@ Finder findTab(IconData icon) { } void main() { - testWidgets("tabbed_app_bar sample smoke test", (WidgetTester tester) async { + testWidgets('tabbed_app_bar sample smoke test', (WidgetTester tester) async { tabbed_app_bar_sample.main(); await tester.pump(); diff --git a/examples/flutter_gallery/lib/demo/material/dialog_demo.dart b/examples/flutter_gallery/lib/demo/material/dialog_demo.dart index 506dc3e36b..e0331ba6b9 100644 --- a/examples/flutter_gallery/lib/demo/material/dialog_demo.dart +++ b/examples/flutter_gallery/lib/demo/material/dialog_demo.dart @@ -13,11 +13,11 @@ enum DialogDemoAction { agree, } -const String _alertWithoutTitleText = "Discard draft?"; +const String _alertWithoutTitleText = 'Discard draft?'; const String _alertWithTitleText = - "Let Google help apps determine location. This means sending anyonmous location " - "data to Google, even when no apps are running."; + 'Let Google help apps determine location. This means sending anyonmous location ' + 'data to Google, even when no apps are running.'; class DialogDemoItem extends StatelessWidget { const DialogDemoItem({ Key key, this.icon, this.color, this.text, this.onPressed }) : super(key: key); diff --git a/examples/flutter_gallery/lib/demo/material/expansion_panels_demo.dart b/examples/flutter_gallery/lib/demo/material/expansion_panels_demo.dart index 175a134da5..1409ab10c0 100644 --- a/examples/flutter_gallery/lib/demo/material/expansion_panels_demo.dart +++ b/examples/flutter_gallery/lib/demo/material/expansion_panels_demo.dart @@ -225,7 +225,7 @@ class _ExpansionPanelsDemoState extends State { name: 'Location', value: _Location.Bahamas, hint: 'Select location', - valueToString: (_Location location) => location.toString().split(".")[1], + valueToString: (_Location location) => location.toString().split('.')[1], builder: (DemoItem<_Location> item) { void close() { setState(() { diff --git a/examples/flutter_gallery/lib/demo/material/list_demo.dart b/examples/flutter_gallery/lib/demo/material/list_demo.dart index f14b6906f0..82093bab45 100644 --- a/examples/flutter_gallery/lib/demo/material/list_demo.dart +++ b/examples/flutter_gallery/lib/demo/material/list_demo.dart @@ -172,10 +172,10 @@ class _ListDemoState extends State { Widget buildListTile(BuildContext context, String item) { Widget secondary; if (_itemType == _MaterialListType.twoLine) { - secondary = const Text("Additional item information."); + secondary = const Text('Additional item information.'); } else if (_itemType == _MaterialListType.threeLine) { secondary = const Text( - "Even more additional list item information appears on line three.", + 'Even more additional list item information appears on line three.', ); } return new MergeSemantics( @@ -192,7 +192,7 @@ class _ListDemoState extends State { @override Widget build(BuildContext context) { - final String layoutText = _dense ? " \u2013 Dense" : ""; + final String layoutText = _dense ? ' \u2013 Dense' : ''; String itemTypeText; switch (_itemType) { case _MaterialListType.oneLine: diff --git a/examples/flutter_gallery/lib/demo/material/overscroll_demo.dart b/examples/flutter_gallery/lib/demo/material/overscroll_demo.dart index d61e78220f..5e73d9770d 100644 --- a/examples/flutter_gallery/lib/demo/material/overscroll_demo.dart +++ b/examples/flutter_gallery/lib/demo/material/overscroll_demo.dart @@ -29,7 +29,7 @@ class OverscrollDemoState extends State { new Timer(const Duration(seconds: 3), () { completer.complete(null); }); return completer.future.then((_) { _scaffoldKey.currentState?.showSnackBar(new SnackBar( - content: const Text("Refresh complete"), + content: const Text('Refresh complete'), action: new SnackBarAction( label: 'RETRY', onPressed: () { diff --git a/examples/flutter_gallery/lib/demo/material/selection_controls_demo.dart b/examples/flutter_gallery/lib/demo/material/selection_controls_demo.dart index 1e31cb0d92..a06a089bb5 100644 --- a/examples/flutter_gallery/lib/demo/material/selection_controls_demo.dart +++ b/examples/flutter_gallery/lib/demo/material/selection_controls_demo.dart @@ -7,21 +7,21 @@ import 'package:flutter/material.dart'; import '../../gallery/demo.dart'; 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.'; const String _checkboxCode = 'selectioncontrols_checkbox'; const String _radioText = - "Radio buttons allow the user to select one option from a set. Use radio " - "buttons for exclusive selection if you think that the user needs to see " - "all available options side-by-side."; + 'Radio buttons allow the user to select one option from a set. Use radio ' + 'buttons for exclusive selection if you think that the user needs to see ' + 'all available options side-by-side.'; const String _radioCode = 'selectioncontrols_radio'; const String _switchText = - "On/off switches toggle the state of a single settings option. The option " - "that the switch controls, as well as the state it’s in, should be made " - "clear from the corresponding inline label."; + 'On/off switches toggle the state of a single settings option. The option ' + 'that the switch controls, as well as the state it’s in, should be made ' + 'clear from the corresponding inline label.'; const String _switchCode = 'selectioncontrols_switch'; @@ -37,19 +37,19 @@ class _SelectionControlsDemoState extends State { Widget build(BuildContext context) { final List demos = [ new ComponentDemoTabData( - tabName: "CHECKBOX", + tabName: 'CHECKBOX', description: _checkboxText, demoWidget: buildCheckbox(), exampleCodeTag: _checkboxCode ), new ComponentDemoTabData( - tabName: "RADIO", + tabName: 'RADIO', description: _radioText, demoWidget: buildRadio(), exampleCodeTag: _radioCode ), new ComponentDemoTabData( - tabName: "SWITCH", + tabName: 'SWITCH', description: _switchText, demoWidget: buildSwitch(), exampleCodeTag: _switchCode diff --git a/examples/flutter_gallery/lib/demo/material/snack_bar_demo.dart b/examples/flutter_gallery/lib/demo/material/snack_bar_demo.dart index e2de8792f9..b6e7c600af 100644 --- a/examples/flutter_gallery/lib/demo/material/snack_bar_demo.dart +++ b/examples/flutter_gallery/lib/demo/material/snack_bar_demo.dart @@ -5,16 +5,16 @@ import 'package:flutter/material.dart'; const String _text1 = - "Snackbars provide lightweight feedback about an operation by " - "showing a brief message at the bottom of the screen. Snackbars " - "can contain an action."; + 'Snackbars provide lightweight feedback about an operation by ' + 'showing a brief message at the bottom of the screen. Snackbars ' + 'can contain an action.'; const String _text2 = - "Snackbars should contain a single line of text directly related " - "to the operation performed. They cannot contain icons."; + 'Snackbars should contain a single line of text directly related ' + 'to the operation performed. They cannot contain icons.'; const String _text3 = - "By default snackbars automatically disappear after a few seconds "; + 'By default snackbars automatically disappear after a few seconds '; class SnackBarDemo extends StatefulWidget { const SnackBarDemo({ Key key }) : super(key: key); diff --git a/examples/flutter_gallery/lib/demo/material/tabs_fab_demo.dart b/examples/flutter_gallery/lib/demo/material/tabs_fab_demo.dart index 018be7932d..ac28a643ce 100644 --- a/examples/flutter_gallery/lib/demo/material/tabs_fab_demo.dart +++ b/examples/flutter_gallery/lib/demo/material/tabs_fab_demo.dart @@ -6,9 +6,9 @@ import 'package:flutter/material.dart'; const String _explanatoryText = "When the Scaffold's floating action button changes, the new button fades and " - "turns into view. In this demo, changing tabs can cause the app to be rebuilt " - "with a FloatingActionButton that the Scaffold distinguishes from the others " - "by its key."; + 'turns into view. In this demo, changing tabs can cause the app to be rebuilt ' + 'with a FloatingActionButton that the Scaffold distinguishes from the others ' + 'by its key.'; class _Page { _Page({ this.label, this.colors, this.icon }); diff --git a/examples/flutter_gallery/lib/demo/material/tooltip_demo.dart b/examples/flutter_gallery/lib/demo/material/tooltip_demo.dart index c7bd7f3e01..063678ae76 100644 --- a/examples/flutter_gallery/lib/demo/material/tooltip_demo.dart +++ b/examples/flutter_gallery/lib/demo/material/tooltip_demo.dart @@ -5,9 +5,9 @@ import 'package:flutter/material.dart'; const String _introText = - "Tooltips are short identifying messages that briefly appear in response to " - "a long press. Tooltip messages are also used by services that make Flutter " - "apps accessible, like screen readers."; + 'Tooltips are short identifying messages that briefly appear in response to ' + 'a long press. Tooltip messages are also used by services that make Flutter ' + 'apps accessible, like screen readers.'; class TooltipDemo extends StatelessWidget { diff --git a/examples/flutter_gallery/lib/demo/pesto_demo.dart b/examples/flutter_gallery/lib/demo/pesto_demo.dart index c92d673756..b850ec87e6 100644 --- a/examples/flutter_gallery/lib/demo/pesto_demo.dart +++ b/examples/flutter_gallery/lib/demo/pesto_demo.dart @@ -162,14 +162,14 @@ class _RecipeGridPageState extends State { void showFavoritesPage(BuildContext context) { Navigator.push(context, new MaterialPageRoute( - settings: const RouteSettings(name: "/pesto/favorites"), + settings: const RouteSettings(name: '/pesto/favorites'), builder: (BuildContext context) => new PestoFavorites(), )); } void showRecipePage(BuildContext context, Recipe recipe) { Navigator.push(context, new MaterialPageRoute( - settings: const RouteSettings(name: "/pesto/recipe"), + settings: const RouteSettings(name: '/pesto/recipe'), builder: (BuildContext context) { return new Theme( data: _kTheme.copyWith(platform: Theme.of(context).platform), diff --git a/examples/flutter_gallery/lib/gallery/syntax_highlighter.dart b/examples/flutter_gallery/lib/gallery/syntax_highlighter.dart index eb6a1ad730..51b1215fa1 100644 --- a/examples/flutter_gallery/lib/gallery/syntax_highlighter.dart +++ b/examples/flutter_gallery/lib/gallery/syntax_highlighter.dart @@ -118,10 +118,10 @@ class DartSyntaxHighlighter extends SyntaxHighlighter { while (!_scanner.isDone) { // Skip White space - _scanner.scan(new RegExp(r"\s+")); + _scanner.scan(new RegExp(r'\s+')); // Block comments - if (_scanner.scan(new RegExp(r"/\*(.|\n)*\*/"))) { + if (_scanner.scan(new RegExp(r'/\*(.|\n)*\*/'))) { _spans.add(new _HighlightSpan( _HighlightType.comment, _scanner.lastMatch.start, @@ -131,12 +131,12 @@ class DartSyntaxHighlighter extends SyntaxHighlighter { } // Line comments - if (_scanner.scan("//")) { + if (_scanner.scan('//')) { final int startComment = _scanner.lastMatch.start; bool eof = false; int endComment; - if (_scanner.scan(new RegExp(r".*\n"))) { + if (_scanner.scan(new RegExp(r'.*\n'))) { endComment = _scanner.lastMatch.end - 1; } else { eof = true; @@ -216,7 +216,7 @@ class DartSyntaxHighlighter extends SyntaxHighlighter { } // Double - if (_scanner.scan(new RegExp(r"\d+\.\d+"))) { + if (_scanner.scan(new RegExp(r'\d+\.\d+'))) { _spans.add(new _HighlightSpan( _HighlightType.number, _scanner.lastMatch.start, @@ -226,7 +226,7 @@ class DartSyntaxHighlighter extends SyntaxHighlighter { } // Integer - if (_scanner.scan(new RegExp(r"\d+"))) { + if (_scanner.scan(new RegExp(r'\d+'))) { _spans.add(new _HighlightSpan( _HighlightType.number, _scanner.lastMatch.start, @@ -236,7 +236,7 @@ class DartSyntaxHighlighter extends SyntaxHighlighter { } // Punctuation - if (_scanner.scan(new RegExp(r"[\[\]{}().!=<>&\|\?\+\-\*/%\^~;:,]"))) { + if (_scanner.scan(new RegExp(r'[\[\]{}().!=<>&\|\?\+\-\*/%\^~;:,]'))) { _spans.add(new _HighlightSpan( _HighlightType.punctuation, _scanner.lastMatch.start, @@ -246,7 +246,7 @@ class DartSyntaxHighlighter extends SyntaxHighlighter { } // Meta data - if (_scanner.scan(new RegExp(r"@\w+"))) { + if (_scanner.scan(new RegExp(r'@\w+'))) { _spans.add(new _HighlightSpan( _HighlightType.keyword, _scanner.lastMatch.start, @@ -256,11 +256,11 @@ class DartSyntaxHighlighter extends SyntaxHighlighter { } // Words - if (_scanner.scan(new RegExp(r"\w+"))) { + if (_scanner.scan(new RegExp(r'\w+'))) { _HighlightType type; String word = _scanner.lastMatch[0]; - if (word.startsWith("_")) + if (word.startsWith('_')) word = word.substring(1); if (_kKeywords.contains(word)) @@ -269,7 +269,7 @@ class DartSyntaxHighlighter extends SyntaxHighlighter { type = _HighlightType.keyword; else if (_firstLetterIsUpperCase(word)) type = _HighlightType.klass; - else if (word.length >= 2 && word.startsWith("k") && _firstLetterIsUpperCase(word.substring(1))) + else if (word.length >= 2 && word.startsWith('k') && _firstLetterIsUpperCase(word.substring(1))) type = _HighlightType.constant; if (type != null) { diff --git a/examples/flutter_gallery/test/calculator/logic.dart b/examples/flutter_gallery/test/calculator/logic.dart index 3ddc7f297a..d4545925c6 100644 --- a/examples/flutter_gallery/test/calculator/logic.dart +++ b/examples/flutter_gallery/test/calculator/logic.dart @@ -16,7 +16,7 @@ void main() { expression = expression.appendDigit(4); expression = expression.computeResult(); expect(expression.state, equals(ExpressionState.Result)); - expect(expression.toString(), equals("24")); + expect(expression.toString(), equals('24')); }); test('Test floating point 0.1 + 0.2 = 0.3', () { @@ -30,7 +30,7 @@ void main() { expression = expression.appendDigit(2); expression = expression.computeResult(); expect(expression.state, equals(ExpressionState.Result)); - expect(expression.toString(), equals("0.3")); + expect(expression.toString(), equals('0.3')); }); test('Test floating point 1.0/10.0 = 0.1', () { @@ -45,7 +45,7 @@ void main() { expression = expression.appendDigit(0); expression = expression.computeResult(); expect(expression.state, equals(ExpressionState.Result)); - expect(expression.toString(), equals("0.1")); + expect(expression.toString(), equals('0.1')); }); test('Test 1/0 = Infinity', () { @@ -55,7 +55,7 @@ void main() { expression = expression.appendDigit(0); expression = expression.computeResult(); expect(expression.state, equals(ExpressionState.Result)); - expect(expression.toString(), equals("Infinity")); + expect(expression.toString(), equals('Infinity')); }); test('Test use result in next calculation: 1 + 1 = 2 + 1 = 3 + 1 = 4', () { @@ -71,7 +71,7 @@ void main() { expression = expression.appendDigit(1); expression = expression.computeResult(); expect(expression.state, equals(ExpressionState.Result)); - expect(expression.toString(), equals("4")); + expect(expression.toString(), equals('4')); }); test('Test minus -3 - -2 = -1', () { @@ -83,6 +83,6 @@ void main() { expression = expression.appendDigit(2); expression = expression.computeResult(); expect(expression.state, equals(ExpressionState.Result)); - expect(expression.toString(), equals("-1")); + expect(expression.toString(), equals('-1')); }); } diff --git a/examples/flutter_gallery/test/drawer_test.dart b/examples/flutter_gallery/test/drawer_test.dart index 3eb42bd5d3..ce6b24b49e 100644 --- a/examples/flutter_gallery/test/drawer_test.dart +++ b/examples/flutter_gallery/test/drawer_test.dart @@ -51,21 +51,21 @@ void main() { expect(app.theme.platform, equals(TargetPlatform.iOS)); // Verify the font scale. - final Size origTextSize = tester.getSize(find.text("Small")); + final Size origTextSize = tester.getSize(find.text('Small')); expect(origTextSize, equals(const Size(176.0, 14.0))); // Switch font scale. await tester.tap(find.text('Small')); await tester.pump(); await tester.pump(const Duration(seconds: 1)); // Wait until it's changed. - final Size textSize = tester.getSize(find.text("Small")); + final Size textSize = tester.getSize(find.text('Small')); expect(textSize, equals(const Size(176.0, 11.0))); // Set font scale back to default. await tester.tap(find.text('System Default')); await tester.pump(); await tester.pump(const Duration(seconds: 1)); // Wait until it's changed. - final Size newTextSize = tester.getSize(find.text("Small")); + final Size newTextSize = tester.getSize(find.text('Small')); expect(newTextSize, equals(origTextSize)); // Scroll to the bottom of the menu. diff --git a/examples/flutter_gallery/test/example_code_parser_test.dart b/examples/flutter_gallery/test/example_code_parser_test.dart index dfa186419d..c023169e77 100644 --- a/examples/flutter_gallery/test/example_code_parser_test.dart +++ b/examples/flutter_gallery/test/example_code_parser_test.dart @@ -21,7 +21,7 @@ void main() { }); } -const String testCodeFile = """// A fake test file +const String testCodeFile = '''// A fake test file // START test_0 test 0 0 test 0 1 @@ -32,7 +32,7 @@ test 0 1 test 1 0 test 1 1 // END -"""; +'''; class TestAssetBundle extends AssetBundle { @override diff --git a/examples/flutter_view/lib/main.dart b/examples/flutter_view/lib/main.dart index 459fa92ab9..08ba605a72 100644 --- a/examples/flutter_view/lib/main.dart +++ b/examples/flutter_view/lib/main.dart @@ -26,9 +26,9 @@ class MyHomePage extends StatefulWidget { } class _MyHomePageState extends State { - static const String _channel = "increment"; - static const String _pong = "pong"; - static const String _emptyMessage = ""; + static const String _channel = 'increment'; + static const String _pong = 'pong'; + static const String _emptyMessage = ''; static const BasicMessageChannel platform = const BasicMessageChannel(_channel, const StringCodec()); diff --git a/examples/hello_world/test/hello_test.dart b/examples/hello_world/test/hello_test.dart index d5ad6b21eb..d6f2132352 100644 --- a/examples/hello_world/test/hello_test.dart +++ b/examples/hello_world/test/hello_test.dart @@ -7,7 +7,7 @@ import 'package:flutter_test/flutter_test.dart'; import '../lib/main.dart' as hello_world; void main() { - testWidgets("Hello world smoke test", (WidgetTester tester) async { + testWidgets('Hello world smoke test', (WidgetTester tester) async { hello_world.main(); // builds the app and schedules a frame but doesn't trigger one await tester.pump(); // triggers a frame diff --git a/examples/layers/rendering/touch_input.dart b/examples/layers/rendering/touch_input.dart index a1bed9e667..d3db35f950 100644 --- a/examples/layers/rendering/touch_input.dart +++ b/examples/layers/rendering/touch_input.dart @@ -104,7 +104,7 @@ void main() { final RenderParagraph paragraph = new RenderParagraph( const TextSpan( style: const TextStyle(color: Colors.black87), - text: "Touch me!", + text: 'Touch me!', ), textDirection: TextDirection.ltr, ); diff --git a/examples/layers/services/isolate.dart b/examples/layers/services/isolate.dart index e8ce214b03..e6d53b0fd4 100644 --- a/examples/layers/services/isolate.dart +++ b/examples/layers/services/isolate.dart @@ -46,21 +46,21 @@ class Calculator { try { final List result = decoder.convert(_data); final int n = result.length; - onResultListener("Decoded $n results"); + onResultListener('Decoded $n results'); } catch (e, stack) { - print("Invalid JSON file: $e"); + print('Invalid JSON file: $e'); print(stack); } } static String _replicateJson(String data, int count) { - final StringBuffer buffer = new StringBuffer()..write("["); + final StringBuffer buffer = new StringBuffer()..write('['); for (int i = 0; i < count; i++) { buffer.write(data); if (i < count - 1) buffer.write(','); } - buffer.write("]"); + buffer.write(']'); return buffer.toString(); } } diff --git a/examples/layers/widgets/styled_text.dart b/examples/layers/widgets/styled_text.dart index 917bc0e5bf..c550881fe5 100644 --- a/examples/layers/widgets/styled_text.dart +++ b/examples/layers/widgets/styled_text.dart @@ -24,7 +24,7 @@ final List> _kNameLines = _kDialogText .toList(); final TextStyle _kDaveStyle = new TextStyle(color: Colors.indigo.shade400, height: 1.8); -final TextStyle _kHalStyle = new TextStyle(color: Colors.red.shade400, fontFamily: "monospace"); +final TextStyle _kHalStyle = new TextStyle(color: Colors.red.shade400, fontFamily: 'monospace'); final TextStyle _kBold = const TextStyle(fontWeight: FontWeight.bold); final TextStyle _kUnderline = const TextStyle( decoration: TextDecoration.underline, @@ -33,7 +33,7 @@ final TextStyle _kUnderline = const TextStyle( ); Widget toStyledText(String name, String text) { - final TextStyle lineStyle = (name == "Dave") ? _kDaveStyle : _kHalStyle; + final TextStyle lineStyle = (name == 'Dave') ? _kDaveStyle : _kHalStyle; return new RichText( key: new Key(text), text: new TextSpan( @@ -55,7 +55,7 @@ Widget toStyledText(String name, String text) { ); } -Widget toPlainText(String name, String text) => new Text(name + ":" + text); +Widget toPlainText(String name, String text) => new Text(name + ':' + text); class SpeakerSeparator extends StatelessWidget { @override diff --git a/examples/platform_channel/lib/main.dart b/examples/platform_channel/lib/main.dart index 8432b8a640..f258120c97 100644 --- a/examples/platform_channel/lib/main.dart +++ b/examples/platform_channel/lib/main.dart @@ -27,7 +27,7 @@ class _PlatformChannelState extends State { final int result = await methodChannel.invokeMethod('getBatteryLevel'); batteryLevel = 'Battery level: $result%.'; } on PlatformException { - batteryLevel = "Failed to get battery level."; + batteryLevel = 'Failed to get battery level.'; } setState(() { _batteryLevel = batteryLevel; @@ -49,7 +49,7 @@ class _PlatformChannelState extends State { void _onError(PlatformException error) { setState(() { - _chargingStatus = "Battery status: unknown."; + _chargingStatus = 'Battery status: unknown.'; }); } diff --git a/examples/platform_channel_swift/lib/main.dart b/examples/platform_channel_swift/lib/main.dart index 8432b8a640..f258120c97 100644 --- a/examples/platform_channel_swift/lib/main.dart +++ b/examples/platform_channel_swift/lib/main.dart @@ -27,7 +27,7 @@ class _PlatformChannelState extends State { final int result = await methodChannel.invokeMethod('getBatteryLevel'); batteryLevel = 'Battery level: $result%.'; } on PlatformException { - batteryLevel = "Failed to get battery level."; + batteryLevel = 'Failed to get battery level.'; } setState(() { _batteryLevel = batteryLevel; @@ -49,7 +49,7 @@ class _PlatformChannelState extends State { void _onError(PlatformException error) { setState(() { - _chargingStatus = "Battery status: unknown."; + _chargingStatus = 'Battery status: unknown.'; }); } diff --git a/examples/platform_view/lib/main.dart b/examples/platform_view/lib/main.dart index a1ab83a171..5e758dfbe6 100644 --- a/examples/platform_view/lib/main.dart +++ b/examples/platform_view/lib/main.dart @@ -35,7 +35,7 @@ class MyHomePage extends StatefulWidget { class _MyHomePageState extends State { static const MethodChannel _methodChannel = - const MethodChannel("samples.flutter.io/platform_view"); + const MethodChannel('samples.flutter.io/platform_view'); int _counter = 0; @@ -47,7 +47,7 @@ class _MyHomePageState extends State { Future _launchPlatformCount() async { final int platformCounter = - await _methodChannel.invokeMethod("switchView", _counter); + await _methodChannel.invokeMethod('switchView', _counter); setState(() { _counter = platformCounter; }); diff --git a/examples/stocks/lib/stock_home.dart b/examples/stocks/lib/stock_home.dart index 3446bda140..d12730fd07 100644 --- a/examples/stocks/lib/stock_home.dart +++ b/examples/stocks/lib/stock_home.dart @@ -245,9 +245,9 @@ class StockHomeState extends State { stock.lastSale += 1.0; }); _scaffoldKey.currentState.showSnackBar(new SnackBar( - content: new Text("Purchased ${stock.symbol} for ${stock.lastSale}"), + content: new Text('Purchased ${stock.symbol} for ${stock.lastSale}'), action: new SnackBarAction( - label: "BUY MORE", + label: 'BUY MORE', onPressed: () { _buyStock(stock); }, @@ -278,7 +278,7 @@ class StockHomeState extends State { ); } - static const List portfolioSymbols = const ["AAPL","FIZZ", "FIVE", "FLAT", "ZINC", "ZNGA"]; + static const List portfolioSymbols = const ['AAPL','FIZZ', 'FIVE', 'FLAT', 'ZINC', 'ZNGA']; Widget buildSearchBar() { return new AppBar( diff --git a/examples/stocks/lib/stock_row.dart b/examples/stocks/lib/stock_row.dart index 40991448e3..f22c5be4ae 100644 --- a/examples/stocks/lib/stock_row.dart +++ b/examples/stocks/lib/stock_row.dart @@ -30,10 +30,10 @@ class StockRow extends StatelessWidget { @override Widget build(BuildContext context) { - final String lastSale = "\$${stock.lastSale.toStringAsFixed(2)}"; - String changeInPrice = "${stock.percentChange.toStringAsFixed(2)}%"; + final String lastSale = '\$${stock.lastSale.toStringAsFixed(2)}'; + String changeInPrice = '${stock.percentChange.toStringAsFixed(2)}%'; if (stock.percentChange > 0) - changeInPrice = "+" + changeInPrice; + changeInPrice = '+' + changeInPrice; return new InkWell( onTap: _getHandler(onPressed), onDoubleTap: _getHandler(onDoubleTap), diff --git a/examples/stocks/lib/stock_settings.dart b/examples/stocks/lib/stock_settings.dart index d318c7808e..a3ccbb82a6 100644 --- a/examples/stocks/lib/stock_settings.dart +++ b/examples/stocks/lib/stock_settings.dart @@ -68,8 +68,8 @@ class StockSettingsState extends State { showDialog( context: context, child: new AlertDialog( - title: const Text("Change mode?"), - content: const Text("Optimistic mode means everything is awesome. Are you sure you can handle that?"), + title: const Text('Change mode?'), + content: const Text('Optimistic mode means everything is awesome. Are you sure you can handle that?'), actions: [ new FlatButton( child: const Text('NO THANKS'), diff --git a/examples/stocks/lib/stock_symbol_viewer.dart b/examples/stocks/lib/stock_symbol_viewer.dart index 27095ce751..6fc0778934 100644 --- a/examples/stocks/lib/stock_symbol_viewer.dart +++ b/examples/stocks/lib/stock_symbol_viewer.dart @@ -16,10 +16,10 @@ class _StockSymbolView extends StatelessWidget { @override Widget build(BuildContext context) { assert(stock != null); - final String lastSale = "\$${stock.lastSale.toStringAsFixed(2)}"; - String changeInPrice = "${stock.percentChange.toStringAsFixed(2)}%"; + final String lastSale = '\$${stock.lastSale.toStringAsFixed(2)}'; + String changeInPrice = '${stock.percentChange.toStringAsFixed(2)}%'; if (stock.percentChange > 0) - changeInPrice = "+" + changeInPrice; + changeInPrice = '+' + changeInPrice; final TextStyle headings = Theme.of(context).textTheme.body2; return new Container( diff --git a/packages/flutter/lib/src/foundation/profile.dart b/packages/flutter/lib/src/foundation/profile.dart index 82718a9765..7c085b4313 100644 --- a/packages/flutter/lib/src/foundation/profile.dart +++ b/packages/flutter/lib/src/foundation/profile.dart @@ -5,7 +5,7 @@ import 'dart:ui'; /// Whether we've been built in release mode. -const bool _kReleaseMode = const bool.fromEnvironment("dart.vm.product"); +const bool _kReleaseMode = const bool.fromEnvironment('dart.vm.product'); /// When running in profile mode (or debug mode), invoke the given function. /// diff --git a/packages/flutter/lib/src/painting/colors.dart b/packages/flutter/lib/src/painting/colors.dart index 484ba90bb6..f1e0d1f202 100644 --- a/packages/flutter/lib/src/painting/colors.dart +++ b/packages/flutter/lib/src/painting/colors.dart @@ -170,7 +170,7 @@ class HSVColor { int get hashCode => hashValues(alpha, hue, saturation, value); @override - String toString() => "HSVColor($alpha, $hue, $saturation, $value)"; + String toString() => 'HSVColor($alpha, $hue, $saturation, $value)'; } /// A color that has a small table of related colors called a "swatch". diff --git a/packages/flutter/lib/src/rendering/sliver_multi_box_adaptor.dart b/packages/flutter/lib/src/rendering/sliver_multi_box_adaptor.dart index 4a0575ff10..292f373d40 100644 --- a/packages/flutter/lib/src/rendering/sliver_multi_box_adaptor.dart +++ b/packages/flutter/lib/src/rendering/sliver_multi_box_adaptor.dart @@ -578,7 +578,7 @@ abstract class RenderSliverMultiBoxAdaptor extends RenderSliver RenderBox child = firstChild; while (true) { final SliverMultiBoxAdaptorParentData childParentData = child.parentData; - children.add(child.toDiagnosticsNode(name: "child with index ${childParentData.index}")); + children.add(child.toDiagnosticsNode(name: 'child with index ${childParentData.index}')); if (child == lastChild) break; child = childParentData.nextSibling; @@ -588,7 +588,7 @@ abstract class RenderSliverMultiBoxAdaptor extends RenderSliver final List indices = _keepAliveBucket.keys.toList()..sort(); for (int index in indices) { children.add(_keepAliveBucket[index].toDiagnosticsNode( - name: "child with index $index (kept alive offstage)", + name: 'child with index $index (kept alive offstage)', style: DiagnosticsTreeStyle.offstage, )); } diff --git a/packages/flutter/lib/src/rendering/stack.dart b/packages/flutter/lib/src/rendering/stack.dart index 62abe6dcb4..36b7029800 100644 --- a/packages/flutter/lib/src/rendering/stack.dart +++ b/packages/flutter/lib/src/rendering/stack.dart @@ -134,7 +134,7 @@ class RelativeRect { int get hashCode => hashValues(left, top, right, bottom); @override - String toString() => "RelativeRect.fromLTRB(${left?.toStringAsFixed(1)}, ${top?.toStringAsFixed(1)}, ${right?.toStringAsFixed(1)}, ${bottom?.toStringAsFixed(1)})"; + String toString() => 'RelativeRect.fromLTRB(${left?.toStringAsFixed(1)}, ${top?.toStringAsFixed(1)}, ${right?.toStringAsFixed(1)}, ${bottom?.toStringAsFixed(1)})'; } /// Parent data for use with [RenderStack]. diff --git a/packages/flutter/lib/src/rendering/table.dart b/packages/flutter/lib/src/rendering/table.dart index be5a2e18cd..2b3b506417 100644 --- a/packages/flutter/lib/src/rendering/table.dart +++ b/packages/flutter/lib/src/rendering/table.dart @@ -1167,7 +1167,7 @@ class RenderTable extends RenderBox { description.add(new DiagnosticsProperty('default column width', defaultColumnWidth)); description.add(new MessageProperty('table size', '$columns\u00D7$rows')); description.add(new IterableProperty('column offsets', _columnLefts, ifNull: 'unknown')); - description.add(new IterableProperty('row offsets', _rowTops, ifNull: "unknown")); + description.add(new IterableProperty('row offsets', _rowTops, ifNull: 'unknown')); } @override diff --git a/packages/flutter/lib/src/services/image_resolution.dart b/packages/flutter/lib/src/services/image_resolution.dart index a6f741a7b4..d5c4495c7e 100644 --- a/packages/flutter/lib/src/services/image_resolution.dart +++ b/packages/flutter/lib/src/services/image_resolution.dart @@ -246,7 +246,7 @@ class AssetImage extends AssetBundleImageProvider { return candidates[lower]; } - static final RegExp _extractRatioRegExp = new RegExp(r"/?(\d+(\.\d*)?)x/"); + static final RegExp _extractRatioRegExp = new RegExp(r'/?(\d+(\.\d*)?)x/'); double _parseScale(String key) { final Match match = _extractRatioRegExp.firstMatch(key); diff --git a/packages/flutter/lib/src/services/platform_channel.dart b/packages/flutter/lib/src/services/platform_channel.dart index 828e2d6e42..941641bf5f 100644 --- a/packages/flutter/lib/src/services/platform_channel.dart +++ b/packages/flutter/lib/src/services/platform_channel.dart @@ -150,7 +150,7 @@ class MethodChannel { codec.encodeMethodCall(new MethodCall(method, arguments)), ); if (result == null) - throw new MissingPluginException("No implementation found for method $method on channel $name"); + throw new MissingPluginException('No implementation found for method $method on channel $name'); return codec.decodeEnvelope(result); } diff --git a/packages/flutter/lib/src/widgets/focus_manager.dart b/packages/flutter/lib/src/widgets/focus_manager.dart index 0ff166abdf..b1bd87f265 100644 --- a/packages/flutter/lib/src/widgets/focus_manager.dart +++ b/packages/flutter/lib/src/widgets/focus_manager.dart @@ -367,7 +367,7 @@ class FocusScopeNode extends Object with DiagnosticableTreeMixin { FocusScopeNode child = _firstChild; int count = 1; while (true) { - children.add(child.toDiagnosticsNode(name: "child $count")); + children.add(child.toDiagnosticsNode(name: 'child $count')); if (child == _lastChild) break; child = child._nextSibling; diff --git a/packages/flutter/lib/src/widgets/framework.dart b/packages/flutter/lib/src/widgets/framework.dart index bc01d99c54..1d2e11349d 100644 --- a/packages/flutter/lib/src/widgets/framework.dart +++ b/packages/flutter/lib/src/widgets/framework.dart @@ -3833,7 +3833,7 @@ class ParentDataElement extends ProxyElement { throw new FlutterError( 'Incorrect use of ParentDataWidget.\n' + widget.debugDescribeInvalidAncestorChain( - description: "$this", + description: '$this', ownershipChain: parent.debugGetCreatorChain(10), foundValidAncestor: ancestor != null, badAncestors: badAncestors diff --git a/packages/flutter/test/material/expansion_panel_test.dart b/packages/flutter/test/material/expansion_panel_test.dart index 1f04ea4c4a..b9664419e8 100644 --- a/packages/flutter/test/material/expansion_panel_test.dart +++ b/packages/flutter/test/material/expansion_panel_test.dart @@ -71,7 +71,7 @@ void main() { box = tester.renderObject(find.byType(ExpansionPanelList)); expect(box.size.height - oldHeight, greaterThanOrEqualTo(100.0)); // 100 + some margin }); - testWidgets("Multiple Panel List test", (WidgetTester tester) async { + testWidgets('Multiple Panel List test', (WidgetTester tester) async { await tester.pumpWidget( new MaterialApp( home: new ListView( diff --git a/packages/flutter/test/rendering/positioned_box_test.dart b/packages/flutter/test/rendering/positioned_box_test.dart index 27e6933bd4..f726862ac6 100644 --- a/packages/flutter/test/rendering/positioned_box_test.dart +++ b/packages/flutter/test/rendering/positioned_box_test.dart @@ -16,8 +16,8 @@ void main() { final RenderPositionedBox positioner = new RenderPositionedBox(child: sizer); layout(positioner, constraints: new BoxConstraints.loose(const Size(200.0, 200.0))); - expect(positioner.size.width, equals(200.0), reason: "positioner width"); - expect(positioner.size.height, equals(200.0), reason: "positioner height"); + expect(positioner.size.width, equals(200.0), reason: 'positioner width'); + expect(positioner.size.height, equals(200.0), reason: 'positioner height'); }); test('RenderPositionedBox shrink wraps', () { @@ -28,21 +28,21 @@ void main() { final RenderPositionedBox positioner = new RenderPositionedBox(child: sizer, widthFactor: 1.0); layout(positioner, constraints: new BoxConstraints.loose(const Size(200.0, 200.0))); - expect(positioner.size.width, equals(100.0), reason: "positioner width"); - expect(positioner.size.height, equals(200.0), reason: "positioner height"); + expect(positioner.size.width, equals(100.0), reason: 'positioner width'); + expect(positioner.size.height, equals(200.0), reason: 'positioner height'); positioner.widthFactor = null; positioner.heightFactor = 1.0; pumpFrame(); - expect(positioner.size.width, equals(200.0), reason: "positioner width"); - expect(positioner.size.height, equals(100.0), reason: "positioner height"); + expect(positioner.size.width, equals(200.0), reason: 'positioner width'); + expect(positioner.size.height, equals(100.0), reason: 'positioner height'); positioner.widthFactor = 1.0; pumpFrame(); - expect(positioner.size.width, equals(100.0), reason: "positioner width"); - expect(positioner.size.height, equals(100.0), reason: "positioner height"); + expect(positioner.size.width, equals(100.0), reason: 'positioner width'); + expect(positioner.size.height, equals(100.0), reason: 'positioner height'); }); test('RenderPositionedBox width and height factors', () { diff --git a/packages/flutter/test/rendering/semantics_test.dart b/packages/flutter/test/rendering/semantics_test.dart index 86559d866d..30aa85df44 100644 --- a/packages/flutter/test/rendering/semantics_test.dart +++ b/packages/flutter/test/rendering/semantics_test.dart @@ -208,7 +208,7 @@ void main() { ..addAction(SemanticsAction.showOnScreen, () { }) ..isChecked = false ..isSelected = true - ..label = "Use all the properties" + ..label = 'Use all the properties' ..textDirection = TextDirection.rtl; final SemanticsNode allProperties = new SemanticsNode() ..rect = new Rect.fromLTWH(50.0, 10.0, 20.0, 30.0) diff --git a/packages/flutter/test/scheduler/animation_test.dart b/packages/flutter/test/scheduler/animation_test.dart index ea5c86e937..e1af4a21bd 100644 --- a/packages/flutter/test/scheduler/animation_test.dart +++ b/packages/flutter/test/scheduler/animation_test.dart @@ -13,11 +13,11 @@ class TestSchedulerBinding extends BindingBase with SchedulerBinding { } void main() { final SchedulerBinding scheduler = new TestSchedulerBinding(); - test("Check for a time dilation being in effect", () { + test('Check for a time dilation being in effect', () { expect(timeDilation, equals(1.0)); }); - test("Can cancel queued callback", () { + test('Can cancel queued callback', () { int secondId; bool firstCallbackRan = false; diff --git a/packages/flutter_driver/lib/src/error.dart b/packages/flutter_driver/lib/src/error.dart index 98ae71c6bf..86d8eb2db3 100644 --- a/packages/flutter_driver/lib/src/error.dart +++ b/packages/flutter_driver/lib/src/error.dart @@ -96,7 +96,7 @@ class LogRecord { /// /// It is meant to be read by humans. There's no guarantee that this value is /// stable enough to be parsed by machines. - String get levelDescription => level.toString().split(".").last; + String get levelDescription => level.toString().split('.').last; @override String toString() => '[${levelDescription.padRight(5)}] $loggerName: $message'; diff --git a/packages/flutter_localizations/lib/src/l10n/localizations.dart b/packages/flutter_localizations/lib/src/l10n/localizations.dart index ca8668dacd..29ec474bf9 100644 --- a/packages/flutter_localizations/lib/src/l10n/localizations.dart +++ b/packages/flutter_localizations/lib/src/l10n/localizations.dart @@ -11,445 +11,445 @@ /// /// This variable is used by [MaterialLocalizations]. const Map> localizations = const > { - "ar": const { - "scriptCategory": r"tall", - "timeOfDayFormat": r"h:mm a", - "openAppDrawerTooltip": r"افتح قائمة التنقل", - "backButtonTooltip": r"الى الخلف", - "closeButtonTooltip": r"إغلا", - "nextMonthTooltip": r"الشهر القادم", - "previousMonthTooltip": r"الشهر الماضى", - "nextPageTooltip": r"الصفحة التالية", - "previousPageTooltip": r"الصفحة السابقة", - "showMenuTooltip": r"قائمة العرض", - "aboutListTileTitle": r"حول $applicationName", - "licensesPageTitle": r"التّراخيص", - "pageRowsInfoTitle": r"$firstRow–$lastRow أو $rowCount", - "pageRowsInfoTitleApproximate": r"$firstRow–$lastRow من حوالي $rowCount", - "rowsPerPageTitle": r"الصفوف في الصفحة:", - "selectedRowCountTitleOther": r"$selectedRowCount العناصر المحددة", - "cancelButtonLabel": r"إلغاء", - "closeButtonLabel": r"أغلاق", - "continueButtonLabel": r"استمر", - "copyButtonLabel": r"نسخ", - "cutButtonLabel": r"كِم جارح", - "okButtonLabel": r"حسنا", - "pasteButtonLabel": r"عجين", - "selectAllButtonLabel": r"اختر الكل", - "viewLicensesButtonLabel": r"عرض التراخيص", - "anteMeridiemAbbreviation": r"ص", - "postMeridiemAbbreviation": r"م", + 'ar': const { + 'scriptCategory': r'tall', + 'timeOfDayFormat': r'h:mm a', + 'openAppDrawerTooltip': r'افتح قائمة التنقل', + 'backButtonTooltip': r'الى الخلف', + 'closeButtonTooltip': r'إغلا', + 'nextMonthTooltip': r'الشهر القادم', + 'previousMonthTooltip': r'الشهر الماضى', + 'nextPageTooltip': r'الصفحة التالية', + 'previousPageTooltip': r'الصفحة السابقة', + 'showMenuTooltip': r'قائمة العرض', + 'aboutListTileTitle': r'حول $applicationName', + 'licensesPageTitle': r'التّراخيص', + 'pageRowsInfoTitle': r'$firstRow–$lastRow أو $rowCount', + 'pageRowsInfoTitleApproximate': r'$firstRow–$lastRow من حوالي $rowCount', + 'rowsPerPageTitle': r'الصفوف في الصفحة:', + 'selectedRowCountTitleOther': r'$selectedRowCount العناصر المحددة', + 'cancelButtonLabel': r'إلغاء', + 'closeButtonLabel': r'أغلاق', + 'continueButtonLabel': r'استمر', + 'copyButtonLabel': r'نسخ', + 'cutButtonLabel': r'كِم جارح', + 'okButtonLabel': r'حسنا', + 'pasteButtonLabel': r'عجين', + 'selectAllButtonLabel': r'اختر الكل', + 'viewLicensesButtonLabel': r'عرض التراخيص', + 'anteMeridiemAbbreviation': r'ص', + 'postMeridiemAbbreviation': r'م', }, - "de": const { - "scriptCategory": r"English-like", - "timeOfDayFormat": r"HH:mm", - "openAppDrawerTooltip": r"Navigationsmenü öffnen", - "backButtonTooltip": r"Zurück", - "closeButtonTooltip": r"Schließen", - "nextMonthTooltip": r"Nächster Monat", - "previousMonthTooltip": r"Vorheriger Monat", - "nextPageTooltip": r"Nächste Seite", - "previousPageTooltip": r"Vorherige Seite", - "showMenuTooltip": r"Menü anzeigen", - "aboutListTileTitle": r"Über $applicationName", - "licensesPageTitle": r"Lizenzen", - "pageRowsInfoTitle": r"$firstRow–$lastRow von $rowCount", - "pageRowsInfoTitleApproximate": r"$firstRow–$lastRow von etwa $rowCount", - "rowsPerPageTitle": r"Zeilen pro Seite:", - "selectedRowCountTitleZero": r"Keine Objekte ausgewählt", - "selectedRowCountTitleOne": r"1 Objekt ausgewählt", - "selectedRowCountTitleOther": r"$selectedRowCount Objekte ausgewählt", - "cancelButtonLabel": r"ABBRECHEN", - "closeButtonLabel": r"SCHLIESSEN", - "continueButtonLabel": r"FORTSETZEN", - "copyButtonLabel": r"KOPIEREN", - "cutButtonLabel": r"AUSSCHNEIDEN", - "okButtonLabel": r"OK", - "pasteButtonLabel": r"EINFÜGEN", - "selectAllButtonLabel": r"ALLES AUSWÄHLEN", - "viewLicensesButtonLabel": r"LIZENZEN ANZEIGEN", + 'de': const { + 'scriptCategory': r'English-like', + 'timeOfDayFormat': r'HH:mm', + 'openAppDrawerTooltip': r'Navigationsmenü öffnen', + 'backButtonTooltip': r'Zurück', + 'closeButtonTooltip': r'Schließen', + 'nextMonthTooltip': r'Nächster Monat', + 'previousMonthTooltip': r'Vorheriger Monat', + 'nextPageTooltip': r'Nächste Seite', + 'previousPageTooltip': r'Vorherige Seite', + 'showMenuTooltip': r'Menü anzeigen', + 'aboutListTileTitle': r'Über $applicationName', + 'licensesPageTitle': r'Lizenzen', + 'pageRowsInfoTitle': r'$firstRow–$lastRow von $rowCount', + 'pageRowsInfoTitleApproximate': r'$firstRow–$lastRow von etwa $rowCount', + 'rowsPerPageTitle': r'Zeilen pro Seite:', + 'selectedRowCountTitleZero': r'Keine Objekte ausgewählt', + 'selectedRowCountTitleOne': r'1 Objekt ausgewählt', + 'selectedRowCountTitleOther': r'$selectedRowCount Objekte ausgewählt', + 'cancelButtonLabel': r'ABBRECHEN', + 'closeButtonLabel': r'SCHLIESSEN', + 'continueButtonLabel': r'FORTSETZEN', + 'copyButtonLabel': r'KOPIEREN', + 'cutButtonLabel': r'AUSSCHNEIDEN', + 'okButtonLabel': r'OK', + 'pasteButtonLabel': r'EINFÜGEN', + 'selectAllButtonLabel': r'ALLES AUSWÄHLEN', + 'viewLicensesButtonLabel': r'LIZENZEN ANZEIGEN', }, - "en": const { - "scriptCategory": r"English-like", - "timeOfDayFormat": r"h:mm a", - "openAppDrawerTooltip": r"Open navigation menu", - "backButtonTooltip": r"Back", - "closeButtonTooltip": r"Close", - "nextMonthTooltip": r"Next month", - "previousMonthTooltip": r"Previous month", - "nextPageTooltip": r"Next page", - "previousPageTooltip": r"Previous page", - "showMenuTooltip": r"Show menu", - "aboutListTileTitle": r"About $applicationName", - "licensesPageTitle": r"Licenses", - "pageRowsInfoTitle": r"$firstRow–$lastRow of $rowCount", - "pageRowsInfoTitleApproximate": r"$firstRow–$lastRow of about $rowCount", - "rowsPerPageTitle": r"Rows per page:", - "selectedRowCountTitleZero": r"No items selected", - "selectedRowCountTitleOne": r"1 item selected", - "selectedRowCountTitleOther": r"$selectedRowCount items selected", - "cancelButtonLabel": r"CANCEL", - "closeButtonLabel": r"CLOSE", - "continueButtonLabel": r"CONTINUE", - "copyButtonLabel": r"COPY", - "cutButtonLabel": r"CUT", - "okButtonLabel": r"OK", - "pasteButtonLabel": r"PASTE", - "selectAllButtonLabel": r"SELECT ALL", - "viewLicensesButtonLabel": r"VIEW LICENSES", - "anteMeridiemAbbreviation": r"AM", - "postMeridiemAbbreviation": r"PM", + 'en': const { + 'scriptCategory': r'English-like', + 'timeOfDayFormat': r'h:mm a', + 'openAppDrawerTooltip': r'Open navigation menu', + 'backButtonTooltip': r'Back', + 'closeButtonTooltip': r'Close', + 'nextMonthTooltip': r'Next month', + 'previousMonthTooltip': r'Previous month', + 'nextPageTooltip': r'Next page', + 'previousPageTooltip': r'Previous page', + 'showMenuTooltip': r'Show menu', + 'aboutListTileTitle': r'About $applicationName', + 'licensesPageTitle': r'Licenses', + 'pageRowsInfoTitle': r'$firstRow–$lastRow of $rowCount', + 'pageRowsInfoTitleApproximate': r'$firstRow–$lastRow of about $rowCount', + 'rowsPerPageTitle': r'Rows per page:', + 'selectedRowCountTitleZero': r'No items selected', + 'selectedRowCountTitleOne': r'1 item selected', + 'selectedRowCountTitleOther': r'$selectedRowCount items selected', + 'cancelButtonLabel': r'CANCEL', + 'closeButtonLabel': r'CLOSE', + 'continueButtonLabel': r'CONTINUE', + 'copyButtonLabel': r'COPY', + 'cutButtonLabel': r'CUT', + 'okButtonLabel': r'OK', + 'pasteButtonLabel': r'PASTE', + 'selectAllButtonLabel': r'SELECT ALL', + 'viewLicensesButtonLabel': r'VIEW LICENSES', + 'anteMeridiemAbbreviation': r'AM', + 'postMeridiemAbbreviation': r'PM', }, - "en_GB": const { - "timeOfDayFormat": r"HH:mm", + 'en_GB': const { + 'timeOfDayFormat': r'HH:mm', }, - "en_IE": const { - "timeOfDayFormat": r"HH:mm", + 'en_IE': const { + 'timeOfDayFormat': r'HH:mm', }, - "en_ZA": const { - "timeOfDayFormat": r"HH:mm", + 'en_ZA': const { + 'timeOfDayFormat': r'HH:mm', }, - "es": const { - "scriptCategory": r"English-like", - "timeOfDayFormat": r"H:mm", - "openAppDrawerTooltip": r"Abrir el menú de navegación", - "backButtonTooltip": r"Espalda", - "closeButtonTooltip": r"Cerrar", - "nextMonthTooltip": r"Próximo mes", - "previousMonthTooltip": r"Mes anterior", - "nextPageTooltip": r"Siguiente página", - "previousPageTooltip": r"Pagina anterior", - "showMenuTooltip": r"Muestrame el menu", - "aboutListTileTitle": r"Desarrollado por $applicationName", - "licensesPageTitle": r"Licencias", - "pageRowsInfoTitle": r"$firstRow–$lastRow de $rowCount", - "pageRowsInfoTitleApproximate": r"$firstRow–$lastRow de aproximadamente $rowCount", - "rowsPerPageTitle": r"Filas por página:", - "selectedRowCountTitleZero": r"No se han seleccionado elementos", - "selectedRowCountTitleOne": r"1 artículo seleccionado", - "selectedRowCountTitleOther": r"$selectedRowCount artículos seleccionados", - "cancelButtonLabel": r"CANCELAR", - "closeButtonLabel": r"CERRAR", - "continueButtonLabel": r"CONTINUAR", - "copyButtonLabel": r"COPIAR", - "cutButtonLabel": r"CORTAR", - "okButtonLabel": r"OK", - "pasteButtonLabel": r"PEGAR", - "selectAllButtonLabel": r"SELECCIONAR TODO", - "viewLicensesButtonLabel": r"VER LICENCIAS", + 'es': const { + 'scriptCategory': r'English-like', + 'timeOfDayFormat': r'H:mm', + 'openAppDrawerTooltip': r'Abrir el menú de navegación', + 'backButtonTooltip': r'Espalda', + 'closeButtonTooltip': r'Cerrar', + 'nextMonthTooltip': r'Próximo mes', + 'previousMonthTooltip': r'Mes anterior', + 'nextPageTooltip': r'Siguiente página', + 'previousPageTooltip': r'Pagina anterior', + 'showMenuTooltip': r'Muestrame el menu', + 'aboutListTileTitle': r'Desarrollado por $applicationName', + 'licensesPageTitle': r'Licencias', + 'pageRowsInfoTitle': r'$firstRow–$lastRow de $rowCount', + 'pageRowsInfoTitleApproximate': r'$firstRow–$lastRow de aproximadamente $rowCount', + 'rowsPerPageTitle': r'Filas por página:', + 'selectedRowCountTitleZero': r'No se han seleccionado elementos', + 'selectedRowCountTitleOne': r'1 artículo seleccionado', + 'selectedRowCountTitleOther': r'$selectedRowCount artículos seleccionados', + 'cancelButtonLabel': r'CANCELAR', + 'closeButtonLabel': r'CERRAR', + 'continueButtonLabel': r'CONTINUAR', + 'copyButtonLabel': r'COPIAR', + 'cutButtonLabel': r'CORTAR', + 'okButtonLabel': r'OK', + 'pasteButtonLabel': r'PEGAR', + 'selectAllButtonLabel': r'SELECCIONAR TODO', + 'viewLicensesButtonLabel': r'VER LICENCIAS', }, - "es_US": const { - "timeOfDayFormat": r"h:mm a", - "anteMeridiemAbbreviation": r"AM", - "postMeridiemAbbreviation": r"PM", + 'es_US': const { + 'timeOfDayFormat': r'h:mm a', + 'anteMeridiemAbbreviation': r'AM', + 'postMeridiemAbbreviation': r'PM', }, - "fa": const { - "scriptCategory": r"tall", - "timeOfDayFormat": r"H:mm", - "openAppDrawerTooltip": r"منوی ناوبری را باز کنید", - "backButtonTooltip": r"بازگشت", - "closeButtonTooltip": r"بستن", - "nextMonthTooltip": r"ماه بعد", - "previousMonthTooltip": r"ماه گذشته", - "nextPageTooltip": r"صفحه بعد", - "previousPageTooltip": r"صفحه قبلی", - "showMenuTooltip": r"نمایش منو", - "aboutListTileTitle": r"درباره $applicationName", - "licensesPageTitle": r"مجوز", - "pageRowsInfoTitle": r"$firstRow–$lastRow از $rowCount", - "pageRowsInfoTitleApproximate": r"$firstRow–$lastRow از حدود $rowCount", - "rowsPerPageTitle": r"ردیف در صفحه:", - "selectedRowCountTitleOther": r"$selectedRowCount آیتم های انتخاب شده", - "cancelButtonLabel": r"لغو", - "closeButtonLabel": r"بستن", - "continueButtonLabel": r"ادامه دهید", - "copyButtonLabel": r"کپی", - "cutButtonLabel": r"برش", - "okButtonLabel": r"تایید", - "pasteButtonLabel": r"چسباندن", - "selectAllButtonLabel": r"انتخاب همه", - "viewLicensesButtonLabel": r"مشاهده مجوز", + 'fa': const { + 'scriptCategory': r'tall', + 'timeOfDayFormat': r'H:mm', + 'openAppDrawerTooltip': r'منوی ناوبری را باز کنید', + 'backButtonTooltip': r'بازگشت', + 'closeButtonTooltip': r'بستن', + 'nextMonthTooltip': r'ماه بعد', + 'previousMonthTooltip': r'ماه گذشته', + 'nextPageTooltip': r'صفحه بعد', + 'previousPageTooltip': r'صفحه قبلی', + 'showMenuTooltip': r'نمایش منو', + 'aboutListTileTitle': r'درباره $applicationName', + 'licensesPageTitle': r'مجوز', + 'pageRowsInfoTitle': r'$firstRow–$lastRow از $rowCount', + 'pageRowsInfoTitleApproximate': r'$firstRow–$lastRow از حدود $rowCount', + 'rowsPerPageTitle': r'ردیف در صفحه:', + 'selectedRowCountTitleOther': r'$selectedRowCount آیتم های انتخاب شده', + 'cancelButtonLabel': r'لغو', + 'closeButtonLabel': r'بستن', + 'continueButtonLabel': r'ادامه دهید', + 'copyButtonLabel': r'کپی', + 'cutButtonLabel': r'برش', + 'okButtonLabel': r'تایید', + 'pasteButtonLabel': r'چسباندن', + 'selectAllButtonLabel': r'انتخاب همه', + 'viewLicensesButtonLabel': r'مشاهده مجوز', }, - "fr": const { - "scriptCategory": r"English-like", - "timeOfDayFormat": r"HH:mm", - "openAppDrawerTooltip": r"Ouvrir le menu de navigation", - "backButtonTooltip": r"Retour", - "closeButtonTooltip": r"Fermer", - "nextMonthTooltip": r"Mois Suivant", - "previousMonthTooltip": r"Mois précédent", - "nextPageTooltip": r"Page suivante", - "previousPageTooltip": r"Page précédente", - "showMenuTooltip": r"Afficher le menu", - "aboutListTileTitle": r"À propos de $applicationName", - "licensesPageTitle": r"Licences", - "pageRowsInfoTitle": r"$firstRow–$lastRow de $rowCount", - "pageRowsInfoTitleApproximate": r"$firstRow–$lastRow d'environ $rowCount", - "rowsPerPageTitle": r"Lignes par page:", - "selectedRowCountTitleZero": r"Aucun élément sélectionné", - "selectedRowCountTitleOne": r"1 élément sélectionné", - "selectedRowCountTitleOther": r"$selectedRowCount éléments sélectionnés", - "cancelButtonLabel": r"ANNULER", - "closeButtonLabel": r"FERMER", - "continueButtonLabel": r"CONTINUER", - "copyButtonLabel": r"COPIER", - "cutButtonLabel": r"COUPER", - "okButtonLabel": r"OK", - "pasteButtonLabel": r"COLLER", - "selectAllButtonLabel": r"TOUT SÉLECTIONNER", - "viewLicensesButtonLabel": r"AFFICHER LES LICENCES", + 'fr': const { + 'scriptCategory': r'English-like', + 'timeOfDayFormat': r'HH:mm', + 'openAppDrawerTooltip': r'Ouvrir le menu de navigation', + 'backButtonTooltip': r'Retour', + 'closeButtonTooltip': r'Fermer', + 'nextMonthTooltip': r'Mois Suivant', + 'previousMonthTooltip': r'Mois précédent', + 'nextPageTooltip': r'Page suivante', + 'previousPageTooltip': r'Page précédente', + 'showMenuTooltip': r'Afficher le menu', + 'aboutListTileTitle': r'À propos de $applicationName', + 'licensesPageTitle': r'Licences', + 'pageRowsInfoTitle': r'$firstRow–$lastRow de $rowCount', + 'pageRowsInfoTitleApproximate': r'$firstRow–$lastRow d' "'" r'environ $rowCount', + 'rowsPerPageTitle': r'Lignes par page:', + 'selectedRowCountTitleZero': r'Aucun élément sélectionné', + 'selectedRowCountTitleOne': r'1 élément sélectionné', + 'selectedRowCountTitleOther': r'$selectedRowCount éléments sélectionnés', + 'cancelButtonLabel': r'ANNULER', + 'closeButtonLabel': r'FERMER', + 'continueButtonLabel': r'CONTINUER', + 'copyButtonLabel': r'COPIER', + 'cutButtonLabel': r'COUPER', + 'okButtonLabel': r'OK', + 'pasteButtonLabel': r'COLLER', + 'selectAllButtonLabel': r'TOUT SÉLECTIONNER', + 'viewLicensesButtonLabel': r'AFFICHER LES LICENCES', }, - "fr_CA": const { - "timeOfDayFormat": r"HH 'h' mm", + 'fr_CA': const { + 'timeOfDayFormat': r'HH ' "'" r'h' "'" r' mm', }, - "he": const { - "scriptCategory": r"English-like", - "timeOfDayFormat": r"H:mm", - "openAppDrawerTooltip": r"פתח תפריט ניווט", - "backButtonTooltip": r"אחורה", - "closeButtonTooltip": r"סגור", - "nextMonthTooltip": r"חודש הבא", - "previousMonthTooltip": r"חודש קודם", - "nextPageTooltip": r"עמוד הבא", - "previousPageTooltip": r"עמוד קודם", - "showMenuTooltip": r"הצג תפריט", - "aboutListTileTitle": r"על $applicationName", - "licensesPageTitle": r"רישיונות", - "pageRowsInfoTitle": r"$firstRow–$lastRow מתוך $rowCount", - "pageRowsInfoTitleApproximate": r"$firstRow–$lastRow מתוך כ $rowCount", - "rowsPerPageTitle": r"שורות לעמוד:", - "selectedRowCountTitleOther": r"$selectedRowCount פריטים שנבחרו", - "cancelButtonLabel": r"ביטול", - "closeButtonLabel": r"סגור", - "continueButtonLabel": r"המשך", - "copyButtonLabel": r"העתק", - "cutButtonLabel": r"גזור", - "okButtonLabel": r"אישור", - "pasteButtonLabel": r"הדבק", - "selectAllButtonLabel": r"בחר הכל", - "viewLicensesButtonLabel": r"הצג רישיונות", + 'he': const { + 'scriptCategory': r'English-like', + 'timeOfDayFormat': r'H:mm', + 'openAppDrawerTooltip': r'פתח תפריט ניווט', + 'backButtonTooltip': r'אחורה', + 'closeButtonTooltip': r'סגור', + 'nextMonthTooltip': r'חודש הבא', + 'previousMonthTooltip': r'חודש קודם', + 'nextPageTooltip': r'עמוד הבא', + 'previousPageTooltip': r'עמוד קודם', + 'showMenuTooltip': r'הצג תפריט', + 'aboutListTileTitle': r'על $applicationName', + 'licensesPageTitle': r'רישיונות', + 'pageRowsInfoTitle': r'$firstRow–$lastRow מתוך $rowCount', + 'pageRowsInfoTitleApproximate': r'$firstRow–$lastRow מתוך כ $rowCount', + 'rowsPerPageTitle': r'שורות לעמוד:', + 'selectedRowCountTitleOther': r'$selectedRowCount פריטים שנבחרו', + 'cancelButtonLabel': r'ביטול', + 'closeButtonLabel': r'סגור', + 'continueButtonLabel': r'המשך', + 'copyButtonLabel': r'העתק', + 'cutButtonLabel': r'גזור', + 'okButtonLabel': r'אישור', + 'pasteButtonLabel': r'הדבק', + 'selectAllButtonLabel': r'בחר הכל', + 'viewLicensesButtonLabel': r'הצג רישיונות', }, - "it": const { - "scriptCategory": r"English-like", - "timeOfDayFormat": r"HH:mm", - "openAppDrawerTooltip": r"Apri il menu di navigazione", - "backButtonTooltip": r"Indietro", - "closeButtonTooltip": r"Chiudi", - "nextMonthTooltip": r"Il prossimo mese", - "previousMonthTooltip": r"Il mese scorso", - "nextPageTooltip": r"Pagina successiva", - "previousPageTooltip": r"Pagina precedente", - "showMenuTooltip": r"Mostra il menu", - "aboutListTileTitle": r"A proposito di $applicationName", - "licensesPageTitle": r"Licenze", - "pageRowsInfoTitle": r"$firstRow–$lastRow di $rowCount", - "pageRowsInfoTitleApproximate": r"$firstRow–$lastRow di circa $rowCount", - "rowsPerPageTitle": r"Righe per pagina:", - "selectedRowCountTitleOther": r"$selectedRowCount selezionati", - "cancelButtonLabel": r"ANNULLA", - "closeButtonLabel": r"CHIUDI", - "continueButtonLabel": r"CONTINUA", - "copyButtonLabel": r"COPIA", - "cutButtonLabel": r"TAGLIA", - "okButtonLabel": r"OK", - "pasteButtonLabel": r"INCOLLA", - "selectAllButtonLabel": r"SELEZIONA TUTTO", - "viewLicensesButtonLabel": r"VEDI LE LICENZE", + 'it': const { + 'scriptCategory': r'English-like', + 'timeOfDayFormat': r'HH:mm', + 'openAppDrawerTooltip': r'Apri il menu di navigazione', + 'backButtonTooltip': r'Indietro', + 'closeButtonTooltip': r'Chiudi', + 'nextMonthTooltip': r'Il prossimo mese', + 'previousMonthTooltip': r'Il mese scorso', + 'nextPageTooltip': r'Pagina successiva', + 'previousPageTooltip': r'Pagina precedente', + 'showMenuTooltip': r'Mostra il menu', + 'aboutListTileTitle': r'A proposito di $applicationName', + 'licensesPageTitle': r'Licenze', + 'pageRowsInfoTitle': r'$firstRow–$lastRow di $rowCount', + 'pageRowsInfoTitleApproximate': r'$firstRow–$lastRow di circa $rowCount', + 'rowsPerPageTitle': r'Righe per pagina:', + 'selectedRowCountTitleOther': r'$selectedRowCount selezionati', + 'cancelButtonLabel': r'ANNULLA', + 'closeButtonLabel': r'CHIUDI', + 'continueButtonLabel': r'CONTINUA', + 'copyButtonLabel': r'COPIA', + 'cutButtonLabel': r'TAGLIA', + 'okButtonLabel': r'OK', + 'pasteButtonLabel': r'INCOLLA', + 'selectAllButtonLabel': r'SELEZIONA TUTTO', + 'viewLicensesButtonLabel': r'VEDI LE LICENZE', }, - "ja": const { - "scriptCategory": r"dense", - "timeOfDayFormat": r"H:mm", - "openAppDrawerTooltip": r"ナビゲーションメニューを開く", - "backButtonTooltip": r"戻る", - "closeButtonTooltip": r"閉じる", - "nextMonthTooltip": r"次の月へ", - "previousMonthTooltip": r"前の月へ", - "nextPageTooltip": r"次のページ", - "previousPageTooltip": r"前のページ", - "showMenuTooltip": r"メニューを表示", - "aboutListTileTitle": r"$applicationNameについて", - "licensesPageTitle": r"ライセンス", - "pageRowsInfoTitle": r"$rowCount行中の$firstRow–$lastRow", - "pageRowsInfoTitleApproximate": r"約$rowCount行中の$firstRow–$lastRow", - "rowsPerPageTitle": r"1ページあたりの行数:", - "selectedRowCountTitleOther": r"$selectedRowCount個のアイテムが選択されています", - "cancelButtonLabel": r"キャンセル", - "closeButtonLabel": r"閉じる", - "continueButtonLabel": r"次へ", - "copyButtonLabel": r"コピー", - "cutButtonLabel": r"カット", - "okButtonLabel": r"OK", - "pasteButtonLabel": r"貼付け", - "selectAllButtonLabel": r"全選択", - "viewLicensesButtonLabel": r"ライセンス表記", + 'ja': const { + 'scriptCategory': r'dense', + 'timeOfDayFormat': r'H:mm', + 'openAppDrawerTooltip': r'ナビゲーションメニューを開く', + 'backButtonTooltip': r'戻る', + 'closeButtonTooltip': r'閉じる', + 'nextMonthTooltip': r'次の月へ', + 'previousMonthTooltip': r'前の月へ', + 'nextPageTooltip': r'次のページ', + 'previousPageTooltip': r'前のページ', + 'showMenuTooltip': r'メニューを表示', + 'aboutListTileTitle': r'$applicationNameについて', + 'licensesPageTitle': r'ライセンス', + 'pageRowsInfoTitle': r'$rowCount行中の$firstRow–$lastRow', + 'pageRowsInfoTitleApproximate': r'約$rowCount行中の$firstRow–$lastRow', + 'rowsPerPageTitle': r'1ページあたりの行数:', + 'selectedRowCountTitleOther': r'$selectedRowCount個のアイテムが選択されています', + 'cancelButtonLabel': r'キャンセル', + 'closeButtonLabel': r'閉じる', + 'continueButtonLabel': r'次へ', + 'copyButtonLabel': r'コピー', + 'cutButtonLabel': r'カット', + 'okButtonLabel': r'OK', + 'pasteButtonLabel': r'貼付け', + 'selectAllButtonLabel': r'全選択', + 'viewLicensesButtonLabel': r'ライセンス表記', }, - "ps": const { - "scriptCategory": r"tall", - "timeOfDayFormat": r"HH:mm", - "openAppDrawerTooltip": r"د پرانیستی نیینګ مینو", - "backButtonTooltip": r"شاته", - "closeButtonTooltip": r"بنده", - "nextMonthTooltip": r"بله میاشت", - "previousMonthTooltip": r"تیره میاشت", - "nextPageTooltip": r"بله پاڼه", - "previousPageTooltip": r"مخکینی مخ", - "showMenuTooltip": r"غورنۍ ښودل", - "aboutListTileTitle": r"د $applicationName په اړه", - "licensesPageTitle": r"جوازونه", - "pageRowsInfoTitle": r"$firstRow–$lastRow د $rowCount", - "pageRowsInfoTitleApproximate": r"$firstRow–$lastRow څخه $rowCount د", - "rowsPerPageTitle": r"د هرې پاڼې پاڼې:", - "selectedRowCountTitleOther": r"$selectedRowCount توکي غوره شوي", - "cancelButtonLabel": r"لغوه کول", - "closeButtonLabel": r"تړل", - "continueButtonLabel": r"منځپانګې", - "copyButtonLabel": r"کاپی", - "cutButtonLabel": r"کم کړئ", - "okButtonLabel": r"سمه ده", - "pasteButtonLabel": r"پیټ کړئ", - "selectAllButtonLabel": r"غوره کړئ", - "viewLicensesButtonLabel": r"لیدلس وګورئ", + 'ps': const { + 'scriptCategory': r'tall', + 'timeOfDayFormat': r'HH:mm', + 'openAppDrawerTooltip': r'د پرانیستی نیینګ مینو', + 'backButtonTooltip': r'شاته', + 'closeButtonTooltip': r'بنده', + 'nextMonthTooltip': r'بله میاشت', + 'previousMonthTooltip': r'تیره میاشت', + 'nextPageTooltip': r'بله پاڼه', + 'previousPageTooltip': r'مخکینی مخ', + 'showMenuTooltip': r'غورنۍ ښودل', + 'aboutListTileTitle': r'د $applicationName په اړه', + 'licensesPageTitle': r'جوازونه', + 'pageRowsInfoTitle': r'$firstRow–$lastRow د $rowCount', + 'pageRowsInfoTitleApproximate': r'$firstRow–$lastRow څخه $rowCount د', + 'rowsPerPageTitle': r'د هرې پاڼې پاڼې:', + 'selectedRowCountTitleOther': r'$selectedRowCount توکي غوره شوي', + 'cancelButtonLabel': r'لغوه کول', + 'closeButtonLabel': r'تړل', + 'continueButtonLabel': r'منځپانګې', + 'copyButtonLabel': r'کاپی', + 'cutButtonLabel': r'کم کړئ', + 'okButtonLabel': r'سمه ده', + 'pasteButtonLabel': r'پیټ کړئ', + 'selectAllButtonLabel': r'غوره کړئ', + 'viewLicensesButtonLabel': r'لیدلس وګورئ', }, - "pt": const { - "scriptCategory": r"English-like", - "timeOfDayFormat": r"HH:mm", - "openAppDrawerTooltip": r"Abrir menu de navegação", - "backButtonTooltip": r"Costas", - "closeButtonTooltip": r"Fechar", - "nextMonthTooltip": r"Próximo mês", - "previousMonthTooltip": r"Mês anterior", - "nextPageTooltip": r"Próxima página", - "previousPageTooltip": r"Página anterior", - "showMenuTooltip": r"Mostrar menu", - "aboutListTileTitle": r"Sobre $applicationName", - "licensesPageTitle": r"Licenças", - "pageRowsInfoTitle": r"$firstRow–$lastRow de $rowCount", - "pageRowsInfoTitleApproximate": r"$firstRow–$lastRow de cerca de $rowCount", - "rowsPerPageTitle": r"Linhas por página:", - "selectedRowCountTitleOther": r"$selectedRowCount selecionados", - "cancelButtonLabel": r"CANCELAR", - "closeButtonLabel": r"FECHAR", - "continueButtonLabel": r"CONTINUAR", - "copyButtonLabel": r"CÓPIA DE", - "cutButtonLabel": r"CORTA", - "okButtonLabel": r"OK", - "pasteButtonLabel": r"COLAR", - "selectAllButtonLabel": r"SELECIONAR TUDO", - "viewLicensesButtonLabel": r"VER LICENÇAS", + 'pt': const { + 'scriptCategory': r'English-like', + 'timeOfDayFormat': r'HH:mm', + 'openAppDrawerTooltip': r'Abrir menu de navegação', + 'backButtonTooltip': r'Costas', + 'closeButtonTooltip': r'Fechar', + 'nextMonthTooltip': r'Próximo mês', + 'previousMonthTooltip': r'Mês anterior', + 'nextPageTooltip': r'Próxima página', + 'previousPageTooltip': r'Página anterior', + 'showMenuTooltip': r'Mostrar menu', + 'aboutListTileTitle': r'Sobre $applicationName', + 'licensesPageTitle': r'Licenças', + 'pageRowsInfoTitle': r'$firstRow–$lastRow de $rowCount', + 'pageRowsInfoTitleApproximate': r'$firstRow–$lastRow de cerca de $rowCount', + 'rowsPerPageTitle': r'Linhas por página:', + 'selectedRowCountTitleOther': r'$selectedRowCount selecionados', + 'cancelButtonLabel': r'CANCELAR', + 'closeButtonLabel': r'FECHAR', + 'continueButtonLabel': r'CONTINUAR', + 'copyButtonLabel': r'CÓPIA DE', + 'cutButtonLabel': r'CORTA', + 'okButtonLabel': r'OK', + 'pasteButtonLabel': r'COLAR', + 'selectAllButtonLabel': r'SELECIONAR TUDO', + 'viewLicensesButtonLabel': r'VER LICENÇAS', }, - "ru": const { - "scriptCategory": r"English-like", - "timeOfDayFormat": r"H:mm", - "openAppDrawerTooltip": r"Открыть меню навигации", - "backButtonTooltip": r"Назад", - "closeButtonTooltip": r"Закрыть", - "nextMonthTooltip": r"Следующий месяц", - "previousMonthTooltip": r"Предыдущий месяц", - "nextPageTooltip": r"Следущая страница", - "previousPageTooltip": r"Предыдущая страница", - "showMenuTooltip": r"Показать меню", - "pageRowsInfoTitle": r"$firstRow–$lastRow из $rowCount", - "pageRowsInfoTitleApproximate": r"$firstRow–$lastRow из примерно $rowCount", - "rowsPerPageTitle": r"Строки на страницу:", - "aboutListTileTitle": r"O $applicationName", - "licensesPageTitle": r"Лицензии", - "selectedRowCountTitleZero": r"Строки не выбраны", - "selectedRowCountTitleOne": r"Выбрана 1 строка", - "selectedRowCountTitleOther": r"Выбрано $selectedRowCount строк", - "cancelButtonLabel": r"ОТМЕНИТЬ", - "closeButtonLabel": r"ЗАКРЫТЬ", - "continueButtonLabel": r"ПРОДОЛЖИТЬ", - "copyButtonLabel": r"СКОПИРОВАТЬ", - "cutButtonLabel": r"ВЫРЕЗАТЬ", - "okButtonLabel": r"ОК", - "pasteButtonLabel": r"ВСТАВИТЬ", - "selectAllButtonLabel": r"ВЫБРАТЬ ВСЁ", - "viewLicensesButtonLabel": r"ПРОСМОТРЕТЬ ЛИЦЕНЗИИ", + 'ru': const { + 'scriptCategory': r'English-like', + 'timeOfDayFormat': r'H:mm', + 'openAppDrawerTooltip': r'Открыть меню навигации', + 'backButtonTooltip': r'Назад', + 'closeButtonTooltip': r'Закрыть', + 'nextMonthTooltip': r'Следующий месяц', + 'previousMonthTooltip': r'Предыдущий месяц', + 'nextPageTooltip': r'Следущая страница', + 'previousPageTooltip': r'Предыдущая страница', + 'showMenuTooltip': r'Показать меню', + 'pageRowsInfoTitle': r'$firstRow–$lastRow из $rowCount', + 'pageRowsInfoTitleApproximate': r'$firstRow–$lastRow из примерно $rowCount', + 'rowsPerPageTitle': r'Строки на страницу:', + 'aboutListTileTitle': r'O $applicationName', + 'licensesPageTitle': r'Лицензии', + 'selectedRowCountTitleZero': r'Строки не выбраны', + 'selectedRowCountTitleOne': r'Выбрана 1 строка', + 'selectedRowCountTitleOther': r'Выбрано $selectedRowCount строк', + 'cancelButtonLabel': r'ОТМЕНИТЬ', + 'closeButtonLabel': r'ЗАКРЫТЬ', + 'continueButtonLabel': r'ПРОДОЛЖИТЬ', + 'copyButtonLabel': r'СКОПИРОВАТЬ', + 'cutButtonLabel': r'ВЫРЕЗАТЬ', + 'okButtonLabel': r'ОК', + 'pasteButtonLabel': r'ВСТАВИТЬ', + 'selectAllButtonLabel': r'ВЫБРАТЬ ВСЁ', + 'viewLicensesButtonLabel': r'ПРОСМОТРЕТЬ ЛИЦЕНЗИИ', }, - "sd": const { - "scriptCategory": r"tall", - "timeOfDayFormat": r"HH:mm", - "openAppDrawerTooltip": r"اوپن جي مينڊيٽ مينيو", - "backButtonTooltip": r"پوئتي", - "closeButtonTooltip": r"بند ڪريو", - "nextMonthTooltip": r"ايندڙ مهيني", - "previousMonthTooltip": r"پويون مهينو", - "nextPageTooltip": r"اڳيون پيج", - "previousPageTooltip": r"پويون صفحو", - "showMenuTooltip": r"ڏيکاريو", - "aboutListTileTitle": r"$applicationName بابت", - "licensesPageTitle": r"لائسنس", - "pageRowsInfoTitle": r"$firstRow–$lastRow جي $rowCount", - "pageRowsInfoTitleApproximate": r"$firstRow–$lastRow کان $rowCount تقريبن", - "rowsPerPageTitle": r"رني پاسي وارو صفحو", - "selectedRowCountTitleOther": r"$selectedRowCount شيون چونڊيل", - "cancelButtonLabel": r"منسوخ ڪيو", - "closeButtonLabel": r"بند ڪريو", - "continueButtonLabel": r"جاري رکو", - "copyButtonLabel": r"ڪاپي", - "cutButtonLabel": r"پٽي", - "okButtonLabel": r"ٺيڪ آهي", - "pasteButtonLabel": r"پيسٽ ڪريو", - "selectAllButtonLabel": r"سڀ چونڊيو", - "viewLicensesButtonLabel": r"لائسنس ڏسو", + 'sd': const { + 'scriptCategory': r'tall', + 'timeOfDayFormat': r'HH:mm', + 'openAppDrawerTooltip': r'اوپن جي مينڊيٽ مينيو', + 'backButtonTooltip': r'پوئتي', + 'closeButtonTooltip': r'بند ڪريو', + 'nextMonthTooltip': r'ايندڙ مهيني', + 'previousMonthTooltip': r'پويون مهينو', + 'nextPageTooltip': r'اڳيون پيج', + 'previousPageTooltip': r'پويون صفحو', + 'showMenuTooltip': r'ڏيکاريو', + 'aboutListTileTitle': r'$applicationName بابت', + 'licensesPageTitle': r'لائسنس', + 'pageRowsInfoTitle': r'$firstRow–$lastRow جي $rowCount', + 'pageRowsInfoTitleApproximate': r'$firstRow–$lastRow کان $rowCount تقريبن', + 'rowsPerPageTitle': r'رني پاسي وارو صفحو', + 'selectedRowCountTitleOther': r'$selectedRowCount شيون چونڊيل', + 'cancelButtonLabel': r'منسوخ ڪيو', + 'closeButtonLabel': r'بند ڪريو', + 'continueButtonLabel': r'جاري رکو', + 'copyButtonLabel': r'ڪاپي', + 'cutButtonLabel': r'پٽي', + 'okButtonLabel': r'ٺيڪ آهي', + 'pasteButtonLabel': r'پيسٽ ڪريو', + 'selectAllButtonLabel': r'سڀ چونڊيو', + 'viewLicensesButtonLabel': r'لائسنس ڏسو', }, - "ur": const { - "scriptCategory": r"tall", - "timeOfDayFormat": r"h:mm a", - "openAppDrawerTooltip": r"کھولیں نیویگیشن مینو", - "backButtonTooltip": r"واپس", - "closeButtonTooltip": r"بند کریں", - "nextMonthTooltip": r"اگلا مھینہ", - "previousMonthTooltip": r"پچھلا مھینہ", - "nextPageTooltip": r"اگلا صفحہ", - "previousPageTooltip": r"سابقہ ​​صفحہ", - "showMenuTooltip": r"مینو دکھائیں", - "aboutListTileTitle": r"کے بارے میں $applicationName", - "licensesPageTitle": r"لائسنس", - "pageRowsInfoTitle": r"$firstRow–$lastRow کے $rowCount", - "pageRowsInfoTitleApproximate": r"$firstRow–$lastRow میں سے $rowCount تقریبا", - "rowsPerPageTitle": r"رویوں فی صفحہ:", - "selectedRowCountTitleOther": r"$selectedRowCount منتخب کردہ اشیاء", - "cancelButtonLabel": r"منسوخ کریں", - "closeButtonLabel": r"بند کریں", - "continueButtonLabel": r"جاری رکھیں", - "copyButtonLabel": r"کاپی", - "cutButtonLabel": r"کاٹیں", - "okButtonLabel": r"ٹھیک ہے", - "pasteButtonLabel": r"چسپاں", - "selectAllButtonLabel": r"تکاپیمام منتخب کریں", - "viewLicensesButtonLabel": r"لائسنس دیکھیں", - "anteMeridiemAbbreviation": r"AM", - "postMeridiemAbbreviation": r"PM", + 'ur': const { + 'scriptCategory': r'tall', + 'timeOfDayFormat': r'h:mm a', + 'openAppDrawerTooltip': r'کھولیں نیویگیشن مینو', + 'backButtonTooltip': r'واپس', + 'closeButtonTooltip': r'بند کریں', + 'nextMonthTooltip': r'اگلا مھینہ', + 'previousMonthTooltip': r'پچھلا مھینہ', + 'nextPageTooltip': r'اگلا صفحہ', + 'previousPageTooltip': r'سابقہ ​​صفحہ', + 'showMenuTooltip': r'مینو دکھائیں', + 'aboutListTileTitle': r'کے بارے میں $applicationName', + 'licensesPageTitle': r'لائسنس', + 'pageRowsInfoTitle': r'$firstRow–$lastRow کے $rowCount', + 'pageRowsInfoTitleApproximate': r'$firstRow–$lastRow میں سے $rowCount تقریبا', + 'rowsPerPageTitle': r'رویوں فی صفحہ:', + 'selectedRowCountTitleOther': r'$selectedRowCount منتخب کردہ اشیاء', + 'cancelButtonLabel': r'منسوخ کریں', + 'closeButtonLabel': r'بند کریں', + 'continueButtonLabel': r'جاری رکھیں', + 'copyButtonLabel': r'کاپی', + 'cutButtonLabel': r'کاٹیں', + 'okButtonLabel': r'ٹھیک ہے', + 'pasteButtonLabel': r'چسپاں', + 'selectAllButtonLabel': r'تکاپیمام منتخب کریں', + 'viewLicensesButtonLabel': r'لائسنس دیکھیں', + 'anteMeridiemAbbreviation': r'AM', + 'postMeridiemAbbreviation': r'PM', }, - "zh": const { - "scriptCategory": r"dense", - "timeOfDayFormat": r"ah:mm", - "openAppDrawerTooltip": r"打开导航菜单", - "backButtonTooltip": r"返回", - "closeButtonTooltip": r"关", - "nextMonthTooltip": r"-下月就29了。", - "previousMonthTooltip": r"前一个月", - "nextPageTooltip": r"下一页", - "previousPageTooltip": r"上一页", - "showMenuTooltip": r"显示菜单", - "aboutListTileTitle": r"关于$applicationName", - "licensesPageTitle": r"许可证", - "pageRowsInfoTitle": r"$rowCount中的$firstRow-$lastRow", - "pageRowsInfoTitleApproximate": r"约$rowCount中的$firstRow-$lastRow", - "rowsPerPageTitle": r"每页行数:", - "selectedRowCountTitleOther": r"$selectedRowCount行所选", - "cancelButtonLabel": r"取消", - "continueButtonLabel": r"继续", - "closeButtonLabel": r"关闭", - "copyButtonLabel": r"复制", - "cutButtonLabel": r"剪切", - "okButtonLabel": r"确定", - "pasteButtonLabel": r"粘贴", - "selectAllButtonLabel": r"全选", - "viewLicensesButtonLabel": r"查看许可证", - "anteMeridiemAbbreviation": r"上午", - "postMeridiemAbbreviation": r"下午", + 'zh': const { + 'scriptCategory': r'dense', + 'timeOfDayFormat': r'ah:mm', + 'openAppDrawerTooltip': r'打开导航菜单', + 'backButtonTooltip': r'返回', + 'closeButtonTooltip': r'关', + 'nextMonthTooltip': r'-下月就29了。', + 'previousMonthTooltip': r'前一个月', + 'nextPageTooltip': r'下一页', + 'previousPageTooltip': r'上一页', + 'showMenuTooltip': r'显示菜单', + 'aboutListTileTitle': r'关于$applicationName', + 'licensesPageTitle': r'许可证', + 'pageRowsInfoTitle': r'$rowCount中的$firstRow-$lastRow', + 'pageRowsInfoTitleApproximate': r'约$rowCount中的$firstRow-$lastRow', + 'rowsPerPageTitle': r'每页行数:', + 'selectedRowCountTitleOther': r'$selectedRowCount行所选', + 'cancelButtonLabel': r'取消', + 'continueButtonLabel': r'继续', + 'closeButtonLabel': r'关闭', + 'copyButtonLabel': r'复制', + 'cutButtonLabel': r'剪切', + 'okButtonLabel': r'确定', + 'pasteButtonLabel': r'粘贴', + 'selectAllButtonLabel': r'全选', + 'viewLicensesButtonLabel': r'查看许可证', + 'anteMeridiemAbbreviation': r'上午', + 'postMeridiemAbbreviation': r'下午', }, }; diff --git a/packages/flutter_localizations/lib/src/material_localizations.dart b/packages/flutter_localizations/lib/src/material_localizations.dart index 891bae277c..bc7e4544b6 100644 --- a/packages/flutter_localizations/lib/src/material_localizations.dart +++ b/packages/flutter_localizations/lib/src/material_localizations.dart @@ -348,7 +348,7 @@ class GlobalMaterialLocalizations implements MaterialLocalizations { /// Looks up text geometry defined in [MaterialTextGeometry]. @override - TextTheme get localTextGeometry => MaterialTextGeometry.forScriptCategory(_nameToValue["scriptCategory"]); + TextTheme get localTextGeometry => MaterialTextGeometry.forScriptCategory(_nameToValue['scriptCategory']); /// Creates an object that provides localized resource values for the /// for the widgets of the material library. diff --git a/packages/flutter_test/lib/src/binding.dart b/packages/flutter_test/lib/src/binding.dart index e638bd1e30..1715f0738b 100644 --- a/packages/flutter_test/lib/src/binding.dart +++ b/packages/flutter_test/lib/src/binding.dart @@ -142,7 +142,7 @@ abstract class TestWidgetsFlutterBinding extends BindingBase createHttpClient = () { return new http.MockClient((http.BaseRequest request) { return new Future.value( - new http.Response("Mocked: Unavailable.", 404, request: request) + new http.Response('Mocked: Unavailable.', 404, request: request) ); }); }; diff --git a/packages/flutter_test/test/matchers_test.dart b/packages/flutter_test/test/matchers_test.dart index f742674507..391b7713a3 100644 --- a/packages/flutter_test/test/matchers_test.dart +++ b/packages/flutter_test/test/matchers_test.dart @@ -26,7 +26,7 @@ class _MockToStringDeep { /// line break. List _lines; - String toStringDeep({ String prefixLineOne: "", String prefixOtherLines: "" }) { + String toStringDeep({ String prefixLineOne: '', String prefixOtherLines: '' }) { final StringBuffer sb = new StringBuffer(); if (_lines.isNotEmpty) sb.write('$prefixLineOne${_lines.first}'); diff --git a/packages/flutter_tools/bin/fuchsia_tester.dart b/packages/flutter_tools/bin/fuchsia_tester.dart index 8c6892e0fb..382c11242d 100644 --- a/packages/flutter_tools/bin/fuchsia_tester.dart +++ b/packages/flutter_tools/bin/fuchsia_tester.dart @@ -26,9 +26,9 @@ import '../lib/src/usage.dart'; // Note: this was largely inspired by lib/src/commands/test.dart. -const String _kOptionPackages = "packages"; -const String _kOptionShell = "shell"; -const String _kOptionTestDirectory = "test-directory"; +const String _kOptionPackages = 'packages'; +const String _kOptionShell = 'shell'; +const String _kOptionTestDirectory = 'test-directory'; const List _kRequiredOptions = const [ _kOptionPackages, _kOptionShell, diff --git a/packages/flutter_tools/lib/executable.dart b/packages/flutter_tools/lib/executable.dart index b7c4050660..5dca4202c0 100644 --- a/packages/flutter_tools/lib/executable.dart +++ b/packages/flutter_tools/lib/executable.dart @@ -175,7 +175,7 @@ Future _handleToolError( writelnStderr(); writelnStderr( "Run 'flutter -h' (or 'flutter -h') for available " - "flutter commands and options." + 'flutter commands and options.' ); // Argument error exit code. return _exit(64); diff --git a/packages/flutter_tools/lib/src/android/android_device.dart b/packages/flutter_tools/lib/src/android/android_device.dart index 7b97bf60de..05b0db1bb5 100644 --- a/packages/flutter_tools/lib/src/android/android_device.dart +++ b/packages/flutter_tools/lib/src/android/android_device.dart @@ -772,7 +772,7 @@ class _AndroidDevicePortForwarder extends DevicePortForwarder { final List lines = LineSplitter.split(stdout).toList(); for (String line in lines) { if (line.startsWith(device.id)) { - final List splitLine = line.split("tcp:"); + final List splitLine = line.split('tcp:'); // Sanity check splitLine. if (splitLine.length != 3) diff --git a/packages/flutter_tools/lib/src/android/gradle.dart b/packages/flutter_tools/lib/src/android/gradle.dart index 9efadfe293..bb930afa2a 100644 --- a/packages/flutter_tools/lib/src/android/gradle.dart +++ b/packages/flutter_tools/lib/src/android/gradle.dart @@ -43,7 +43,7 @@ FlutterPluginVersion get flutterPluginVersion { final File plugin = fs.file('android/buildSrc/src/main/groovy/FlutterPlugin.groovy'); if (plugin.existsSync()) { final String packageLine = plugin.readAsLinesSync().skip(4).first; - if (packageLine == "package io.flutter.gradle") { + if (packageLine == 'package io.flutter.gradle') { return FlutterPluginVersion.v2; } return FlutterPluginVersion.v1; @@ -51,7 +51,7 @@ FlutterPluginVersion get flutterPluginVersion { final File appGradle = fs.file('android/app/build.gradle'); if (appGradle.existsSync()) { for (String line in appGradle.readAsLinesSync()) { - if (line.contains(new RegExp(r"apply from: .*/flutter.gradle"))) { + if (line.contains(new RegExp(r'apply from: .*/flutter.gradle'))) { return FlutterPluginVersion.managed; } } diff --git a/packages/flutter_tools/lib/src/application_package.dart b/packages/flutter_tools/lib/src/application_package.dart index f348a40d63..7f0e6875a5 100644 --- a/packages/flutter_tools/lib/src/application_package.dart +++ b/packages/flutter_tools/lib/src/application_package.dart @@ -116,7 +116,7 @@ class AndroidApk extends ApplicationPackage { if (category.getAttribute('android:name') == 'android.intent.category.LAUNCHER') { final xml.XmlElement activity = category.parent.parent; final String activityName = activity.getAttribute('android:name'); - launchActivity = "$packageId/$activityName"; + launchActivity = '$packageId/$activityName'; break; } } diff --git a/packages/flutter_tools/lib/src/base/common.dart b/packages/flutter_tools/lib/src/base/common.dart index 6101a5d6cc..db8c5d5fb3 100644 --- a/packages/flutter_tools/lib/src/base/common.dart +++ b/packages/flutter_tools/lib/src/base/common.dart @@ -40,5 +40,5 @@ class ToolExit implements Exception { final int exitCode; @override - String toString() => "Exception: $message"; + String toString() => 'Exception: $message'; } diff --git a/packages/flutter_tools/lib/src/base/os.dart b/packages/flutter_tools/lib/src/base/os.dart index 8dfcbb452f..476cae1242 100644 --- a/packages/flutter_tools/lib/src/base/os.dart +++ b/packages/flutter_tools/lib/src/base/os.dart @@ -118,13 +118,13 @@ class _PosixUtils extends OperatingSystemUtils { if (_name == null) { if (platform.isMacOS) { final List results = [ - processManager.runSync(["sw_vers", "-productName"]), - processManager.runSync(["sw_vers", "-productVersion"]), - processManager.runSync(["sw_vers", "-buildVersion"]), + processManager.runSync(['sw_vers', '-productName']), + processManager.runSync(['sw_vers', '-productVersion']), + processManager.runSync(['sw_vers', '-buildVersion']), ]; if (results.every((ProcessResult result) => result.exitCode == 0)) { - _name = "${results[0].stdout.trim()} ${results[1].stdout - .trim()} ${results[2].stdout.trim()}"; + _name = '${results[0].stdout.trim()} ${results[1].stdout + .trim()} ${results[2].stdout.trim()}'; } } _name ??= super.name; diff --git a/packages/flutter_tools/lib/src/base/process.dart b/packages/flutter_tools/lib/src/base/process.dart index b3b41691c0..cbc1aae648 100644 --- a/packages/flutter_tools/lib/src/base/process.dart +++ b/packages/flutter_tools/lib/src/base/process.dart @@ -298,7 +298,7 @@ void _traceCommand(List args, { String workingDirectory }) { if (workingDirectory == null) printTrace(argsText); else - printTrace("[$workingDirectory${fs.path.separator}] $argsText"); + printTrace('[$workingDirectory${fs.path.separator}] $argsText'); } String _runWithLoggingSync(List cmd, { diff --git a/packages/flutter_tools/lib/src/commands/build_aot.dart b/packages/flutter_tools/lib/src/commands/build_aot.dart index 056e580eea..d2b1510991 100644 --- a/packages/flutter_tools/lib/src/commands/build_aot.dart +++ b/packages/flutter_tools/lib/src/commands/build_aot.dart @@ -239,10 +239,10 @@ Future _buildAotSnapshot( ]; if ((extraFrontEndOptions != null) && extraFrontEndOptions.isNotEmpty) - printTrace("Extra front-end options: $extraFrontEndOptions"); + printTrace('Extra front-end options: $extraFrontEndOptions'); if ((extraGenSnapshotOptions != null) && extraGenSnapshotOptions.isNotEmpty) { - printTrace("Extra gen-snapshot options: $extraGenSnapshotOptions"); + printTrace('Extra gen-snapshot options: $extraGenSnapshotOptions'); genSnapshotCmd.addAll(extraGenSnapshotOptions); } diff --git a/packages/flutter_tools/lib/src/commands/create.dart b/packages/flutter_tools/lib/src/commands/create.dart index fe5721cffd..6e2dcb0131 100644 --- a/packages/flutter_tools/lib/src/commands/create.dart +++ b/packages/flutter_tools/lib/src/commands/create.dart @@ -83,7 +83,7 @@ class CreateCommand extends FlutterCommand { 'If run on a project that already exists, this will repair the project, recreating any files that are missing.'; @override - String get invocation => "${runner.executableName} $name "; + String get invocation => '${runner.executableName} $name '; @override Future runCommand() async { @@ -249,17 +249,17 @@ To edit platform code in an IDE see https://flutter.io/platform-plugins/#edit-co } } else { printStatus("You'll need to install additional components before you can run " - "your Flutter app:"); + 'your Flutter app:'); printStatus(''); // Give the user more detailed analysis. await doctor.diagnose(); printStatus(''); printStatus("After installing components, run 'flutter doctor' in order to " - "re-validate your setup."); + 're-validate your setup.'); printStatus("When complete, type 'flutter run' from the '$relativeAppPath' " - "directory in order to launch your app."); - printStatus("Your main program file is: $relativeAppPath/lib/main.dart"); + 'directory in order to launch your app.'); + printStatus('Your main program file is: $relativeAppPath/lib/main.dart'); } } @@ -290,7 +290,7 @@ To edit platform code in an IDE see https://flutter.io/platform-plugins/#edit-co 'dartSdk': '$flutterRoot/bin/cache/dart-sdk', 'androidMinApiLevel': android.minApiLevel, 'androidSdkVersion': android_sdk.minimumAndroidSdkVersion, - 'androidFlutterJar': "$flutterRoot/bin/cache/artifacts/engine/android-arm/flutter.jar", + 'androidFlutterJar': '$flutterRoot/bin/cache/artifacts/engine/android-arm/flutter.jar', 'withDriverTest': renderDriverTest, 'pluginClass': pluginClass, 'pluginDartClass': pluginDartClass, @@ -333,7 +333,7 @@ String _createPluginClassName(String name) { String _createUTIIdentifier(String organization, String name) { // Create a UTI (https://en.wikipedia.org/wiki/Uniform_Type_Identifier) from a base name - final RegExp disallowed = new RegExp(r"[^a-zA-Z0-9\-\.\u0080-\uffff]+"); + final RegExp disallowed = new RegExp(r'[^a-zA-Z0-9\-\.\u0080-\uffff]+'); name = camelCase(name).replaceAll(disallowed, ''); name = name.isEmpty ? 'untitled' : name; return '$organization.$name'; @@ -367,7 +367,7 @@ String _validateProjectName(String projectName) { if (_packageDependencies.contains(projectName)) { return "Invalid project name: '$projectName' - this will conflict with Flutter " - "package dependencies."; + 'package dependencies.'; } return null; } @@ -376,7 +376,7 @@ String _validateProjectName(String projectName) { /// if we should disallow the directory name. String _validateProjectDir(String dirPath, { String flutterRoot }) { if (fs.path.isWithin(flutterRoot, dirPath)) { - return "Cannot create a project within the Flutter SDK.\n" + return 'Cannot create a project within the Flutter SDK.\n' "Target directory '$dirPath' is within the Flutter SDK at '$flutterRoot'."; } diff --git a/packages/flutter_tools/lib/src/commands/daemon.dart b/packages/flutter_tools/lib/src/commands/daemon.dart index 0af8a08863..aabb8bdca1 100644 --- a/packages/flutter_tools/lib/src/commands/daemon.dart +++ b/packages/flutter_tools/lib/src/commands/daemon.dart @@ -197,28 +197,28 @@ abstract class Domain { String _getStringArg(Map args, String name, { bool required: false }) { if (required && !args.containsKey(name)) - throw "$name is required"; + throw '$name is required'; final dynamic val = args[name]; if (val != null && val is! String) - throw "$name is not a String"; + throw '$name is not a String'; return val; } bool _getBoolArg(Map args, String name, { bool required: false }) { if (required && !args.containsKey(name)) - throw "$name is required"; + throw '$name is required'; final dynamic val = args[name]; if (val != null && val is! bool) - throw "$name is not a bool"; + throw '$name is not a bool'; return val; } int _getIntArg(Map args, String name, { bool required: false }) { if (required && !args.containsKey(name)) - throw "$name is required"; + throw '$name is required'; final dynamic val = args[name]; if (val != null && val is! int) - throw "$name is not an int"; + throw '$name is not an int'; return val; } diff --git a/packages/flutter_tools/lib/src/commands/devices.dart b/packages/flutter_tools/lib/src/commands/devices.dart index 51d7aeda94..78f0564923 100644 --- a/packages/flutter_tools/lib/src/commands/devices.dart +++ b/packages/flutter_tools/lib/src/commands/devices.dart @@ -23,7 +23,7 @@ class DevicesCommand extends FlutterCommand { if (!doctor.canListAnything) { throwToolExit( "Unable to locate a development device; please run 'flutter doctor' for " - "information about installing additional components.", + 'information about installing additional components.', exitCode: 1); } diff --git a/packages/flutter_tools/lib/src/commands/format.dart b/packages/flutter_tools/lib/src/commands/format.dart index 65bd40826b..80cbd82301 100644 --- a/packages/flutter_tools/lib/src/commands/format.dart +++ b/packages/flutter_tools/lib/src/commands/format.dart @@ -21,7 +21,7 @@ class FormatCommand extends FlutterCommand { final String description = 'Format one or more dart files.'; @override - String get invocation => "${runner.executableName} $name "; + String get invocation => '${runner.executableName} $name '; @override Future runCommand() async { diff --git a/packages/flutter_tools/lib/src/commands/fuchsia_reload.dart b/packages/flutter_tools/lib/src/commands/fuchsia_reload.dart index f01c3e67ab..491e2e5930 100644 --- a/packages/flutter_tools/lib/src/commands/fuchsia_reload.dart +++ b/packages/flutter_tools/lib/src/commands/fuchsia_reload.dart @@ -256,9 +256,9 @@ class FuchsiaReloadCommand extends FlutterCommand { // The Observatory requires somewhat non-standard URIs that the Uri class // can't build for us, so instead we build them by hand. - final String isolateIdQuery = "?isolateId=isolates%2F$number"; - final String isolateAddr = "$vmServiceAddr/#/inspect$isolateIdQuery"; - final String debuggerAddr = "$vmServiceAddr/#/debugger$isolateIdQuery"; + final String isolateIdQuery = '?isolateId=isolates%2F$number'; + final String isolateAddr = '$vmServiceAddr/#/inspect$isolateIdQuery'; + final String debuggerAddr = '$vmServiceAddr/#/debugger$isolateIdQuery'; final String newUsed = getSizeAsMB(isolate.newSpace.used); final String newCap = getSizeAsMB(isolate.newSpace.capacity); @@ -452,7 +452,7 @@ class _PortForwarder { final ProcessResult result = await processManager.run(command); printTrace(command.join(' ')); if (result.exitCode != 0) { - printTrace("Command failed:\nstdout: ${result.stdout}\nstderr: ${result.stderr}"); + printTrace('Command failed:\nstdout: ${result.stdout}\nstderr: ${result.stderr}'); } } @@ -487,7 +487,7 @@ class FuchsiaDeviceCommandRunner { printTrace(args.join(' ')); final ProcessResult result = await processManager.run(args); if (result.exitCode != 0) { - printStatus("Command failed: $command\nstdout: ${result.stdout}\nstderr: ${result.stderr}"); + printStatus('Command failed: $command\nstdout: ${result.stdout}\nstderr: ${result.stderr}'); return null; } printTrace(result.stdout); diff --git a/packages/flutter_tools/lib/src/devfs.dart b/packages/flutter_tools/lib/src/devfs.dart index 49dfe45aa4..e1b1e6e109 100644 --- a/packages/flutter_tools/lib/src/devfs.dart +++ b/packages/flutter_tools/lib/src/devfs.dart @@ -498,10 +498,10 @@ class DevFS { try { await _httpWriter.write(dirtyEntries); } on SocketException catch (socketException, stackTrace) { - printTrace("DevFS sync failed. Lost connection to device: $socketException"); + printTrace('DevFS sync failed. Lost connection to device: $socketException'); throw new DevFSException('Lost connection to device.', socketException, stackTrace); } catch (exception, stackTrace) { - printError("Could not update files on device: $exception"); + printError('Could not update files on device: $exception'); throw new DevFSException('Sync failed', exception, stackTrace); } } else { diff --git a/packages/flutter_tools/lib/src/device.dart b/packages/flutter_tools/lib/src/device.dart index 57b4704444..ec7cbff45e 100644 --- a/packages/flutter_tools/lib/src/device.dart +++ b/packages/flutter_tools/lib/src/device.dart @@ -191,7 +191,7 @@ abstract class Device { // String meant to be displayed to the user indicating if the device is // supported by Flutter, and, if not, why. - String supportMessage() => isSupported() ? "Supported" : "Unsupported"; + String supportMessage() => isSupported() ? 'Supported' : 'Unsupported'; /// The device's platform. Future get targetPlatform; diff --git a/packages/flutter_tools/lib/src/ios/mac.dart b/packages/flutter_tools/lib/src/ios/mac.dart index e5f75f8428..644f66a12e 100644 --- a/packages/flutter_tools/lib/src/ios/mac.dart +++ b/packages/flutter_tools/lib/src/ios/mac.dart @@ -286,7 +286,7 @@ Future buildXcodeProject({ commands.addAll([ '-workspace', fs.path.basename(entity.path), '-scheme', scheme, - "BUILD_DIR=${fs.path.absolute(getIosBuildDirectory())}", + 'BUILD_DIR=${fs.path.absolute(getIosBuildDirectory())}', ]); break; } @@ -447,20 +447,20 @@ bool _checkXcodeVersion() { Future _addServicesToBundle(Directory bundle) async { final List> services = >[]; - printTrace("Trying to resolve native pub services."); + printTrace('Trying to resolve native pub services.'); // Step 1: Parse the service configuration yaml files present in the service // pub packages. await parseServiceConfigs(services); - printTrace("Found ${services.length} service definition(s)."); + printTrace('Found ${services.length} service definition(s).'); // Step 2: Copy framework dylibs to the correct spot for xcodebuild to pick up. - final Directory frameworksDirectory = fs.directory(fs.path.join(bundle.path, "Frameworks")); + final Directory frameworksDirectory = fs.directory(fs.path.join(bundle.path, 'Frameworks')); await _copyServiceFrameworks(services, frameworksDirectory); // Step 3: Copy the service definitions manifest at the correct spot for // xcodebuild to pick up. - final File manifestFile = fs.file(fs.path.join(bundle.path, "ServiceDefinitions.json")); + final File manifestFile = fs.file(fs.path.join(bundle.path, 'ServiceDefinitions.json')); _copyServiceDefinitionsManifest(services, manifestFile); } @@ -470,7 +470,7 @@ Future _copyServiceFrameworks(List> services, Director for (Map service in services) { final String dylibPath = await getServiceFromUrl(service['ios-framework'], service['root'], service['name']); final File dylib = fs.file(dylibPath); - printTrace("Copying ${dylib.path} into bundle."); + printTrace('Copying ${dylib.path} into bundle.'); if (!dylib.existsSync()) { printError("The service dylib '${dylib.path}' does not exist."); continue; diff --git a/packages/flutter_tools/lib/src/ios/plist_utils.dart b/packages/flutter_tools/lib/src/ios/plist_utils.dart index 6d727d459c..c0faca62ef 100644 --- a/packages/flutter_tools/lib/src/ios/plist_utils.dart +++ b/packages/flutter_tools/lib/src/ios/plist_utils.dart @@ -5,8 +5,8 @@ import '../base/file_system.dart'; import '../base/process.dart'; -const String kCFBundleIdentifierKey = "CFBundleIdentifier"; -const String kCFBundleShortVersionStringKey = "CFBundleShortVersionString"; +const String kCFBundleIdentifierKey = 'CFBundleIdentifier'; +const String kCFBundleShortVersionStringKey = 'CFBundleShortVersionString'; String getValueFromFile(String plistFilePath, String key) { // TODO(chinmaygarde): For now, we only need to read from plist files on a mac diff --git a/packages/flutter_tools/lib/src/run_hot.dart b/packages/flutter_tools/lib/src/run_hot.dart index 3d202ee8a5..8cdf85018d 100644 --- a/packages/flutter_tools/lib/src/run_hot.dart +++ b/packages/flutter_tools/lib/src/run_hot.dart @@ -433,7 +433,7 @@ class HotRunner extends ResidentRunner { timer.stop(); status.cancel(); if (result.isOk) - printStatus("${result.message} in ${getElapsedAsMilliseconds(timer.elapsed)}."); + printStatus('${result.message} in ${getElapsedAsMilliseconds(timer.elapsed)}.'); if (result.hint != null) printStatus(result.hint); return result; @@ -530,7 +530,7 @@ class HotRunner extends ResidentRunner { reloadMessage = 'Reloaded $loadedLibraryCount of $finalLibraryCount libraries'; } } catch (error, st) { - printError("Hot reload failed: $error\n$st"); + printError('Hot reload failed: $error\n$st'); final int errorCode = error['code']; final String errorMessage = error['message']; if (errorCode == Isolate.kIsolateReloadBarred) { @@ -587,8 +587,8 @@ class HotRunner extends ResidentRunner { await view.uiIsolate.flutterReassemble(); } on TimeoutException { reassembleTimedOut = true; - printTrace("Reassembling ${view.uiIsolate.name} took too long."); - printStatus("Hot reloading ${view.uiIsolate.name} took too long; the reload may have failed."); + printTrace('Reassembling ${view.uiIsolate.name} took too long.'); + printStatus('Hot reloading ${view.uiIsolate.name} took too long; the reload may have failed.'); continue; } catch (error) { reassembleAndScheduleErrors = true; diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart index 5a42245154..025a8be4c7 100644 --- a/packages/flutter_tools/lib/src/runner/flutter_command.dart +++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart @@ -265,18 +265,18 @@ abstract class FlutterCommand extends Command { Future> findAllTargetDevices() async { if (!doctor.canLaunchAnything) { printError("Unable to locate a development device; please run 'flutter doctor' " - "for information about installing additional components."); + 'for information about installing additional components.'); return null; } List devices = await deviceManager.getDevices().toList(); if (devices.isEmpty && deviceManager.hasSpecifiedDeviceId) { - printStatus("No devices found with name or id " + printStatus('No devices found with name or id ' "matching '${deviceManager.specifiedDeviceId}'"); return null; } else if (devices.isEmpty && deviceManager.hasSpecifiedAllDevices) { - printStatus("No devices found"); + printStatus('No devices found'); return null; } else if (devices.isEmpty) { printNoConnectedDevices(); @@ -290,10 +290,10 @@ abstract class FlutterCommand extends Command { return null; } else if (devices.length > 1 && !deviceManager.hasSpecifiedAllDevices) { if (deviceManager.hasSpecifiedDeviceId) { - printStatus("Found ${devices.length} devices with name or id matching " + printStatus('Found ${devices.length} devices with name or id matching ' "'${deviceManager.specifiedDeviceId}':"); } else { - printStatus("More than one device connected; please specify a device with " + printStatus('More than one device connected; please specify a device with ' "the '-d ' flag, or use '-d all' to act on all devices."); devices = await deviceManager.getAllConnectedDevices().toList(); } @@ -313,7 +313,7 @@ abstract class FlutterCommand extends Command { if (deviceList == null) return null; if (deviceList.length > 1) { - printStatus("More than one device connected; please specify a device with " + printStatus('More than one device connected; please specify a device with ' "the '-d ' flag."); deviceList = await deviceManager.getAllConnectedDevices().toList(); printStatus(''); diff --git a/packages/flutter_tools/lib/src/services.dart b/packages/flutter_tools/lib/src/services.dart index 184966e833..e4e0ff2668 100644 --- a/packages/flutter_tools/lib/src/services.dart +++ b/packages/flutter_tools/lib/src/services.dart @@ -75,10 +75,10 @@ Future parseServiceConfigs( } Future getServiceFromUrl(String url, String rootDir, String serviceName) async { - if (url.startsWith("android-sdk:") && androidSdk != null) { + if (url.startsWith('android-sdk:') && androidSdk != null) { // It's something shipped in the standard android SDK. return url.replaceAll('android-sdk:', '${androidSdk.directory}/'); - } else if (url.startsWith("http")) { + } else if (url.startsWith('http')) { // It's a regular file to download. return await cache.getThirdPartyFile(url, serviceName); } else { diff --git a/packages/flutter_tools/lib/src/template.dart b/packages/flutter_tools/lib/src/template.dart index 215e1f35ca..5d96db7656 100644 --- a/packages/flutter_tools/lib/src/template.dart +++ b/packages/flutter_tools/lib/src/template.dart @@ -10,7 +10,7 @@ import 'globals.dart'; const String _kTemplateExtension = '.tmpl'; const String _kCopyTemplateExtension = '.copy.tmpl'; -final Pattern _kTemplateLanguageVariant = new RegExp(r"(\w+)-(\w+)\.tmpl.*"); +final Pattern _kTemplateLanguageVariant = new RegExp(r'(\w+)-(\w+)\.tmpl.*'); /// Expands templates in a directory to a destination. All files that must /// undergo template expansion should end with the '.tmpl' extension. All other diff --git a/packages/flutter_tools/lib/src/test/event_printer.dart b/packages/flutter_tools/lib/src/test/event_printer.dart index 4be6b77fe1..a9e2c89529 100644 --- a/packages/flutter_tools/lib/src/test/event_printer.dart +++ b/packages/flutter_tools/lib/src/test/event_printer.dart @@ -15,8 +15,8 @@ class EventPrinter extends TestWatcher { @override void onStartedProcess(ProcessEvent event) { - _sendEvent("test.startedProcess", - {"observatoryUri": event.observatoryUri.toString()}); + _sendEvent('test.startedProcess', + {'observatoryUri': event.observatoryUri.toString()}); } void _sendEvent(String name, [dynamic params]) { diff --git a/packages/flutter_tools/lib/src/test/flutter_platform.dart b/packages/flutter_tools/lib/src/test/flutter_platform.dart index 2f26b6f5da..2504d938c7 100644 --- a/packages/flutter_tools/lib/src/test/flutter_platform.dart +++ b/packages/flutter_tools/lib/src/test/flutter_platform.dart @@ -408,8 +408,8 @@ class _FlutterPlatform extends PlatformPlugin { String _getWebSocketUrl(HttpServer server) { return host.type == InternetAddressType.IP_V4 - ? "ws://${host.address}:${server.port}" - : "ws://[${host.address}]:${server.port}"; + ? 'ws://${host.address}:${server.port}' + : 'ws://[${host.address}]:${server.port}'; } String _generateTestMain({ diff --git a/packages/flutter_tools/lib/src/test/runner.dart b/packages/flutter_tools/lib/src/test/runner.dart index d595e43f01..c7acd3cad6 100644 --- a/packages/flutter_tools/lib/src/test/runner.dart +++ b/packages/flutter_tools/lib/src/test/runner.dart @@ -44,11 +44,11 @@ Future runTests( } for (String name in names) { - testArgs..add("--name")..add(name); + testArgs..add('--name')..add(name); } for (String plainName in plainNames) { - testArgs..add("--plain-name")..add(plainName); + testArgs..add('--plain-name')..add(plainName); } testArgs.add('--'); diff --git a/packages/flutter_tools/lib/src/vmservice.dart b/packages/flutter_tools/lib/src/vmservice.dart index 1ac521d3d5..ebd7fa438e 100644 --- a/packages/flutter_tools/lib/src/vmservice.dart +++ b/packages/flutter_tools/lib/src/vmservice.dart @@ -321,7 +321,7 @@ abstract class ServiceObject { return null; if (!_isServiceMap(map)) - throw new VMServiceObjectLoadError("Expected a service map", map); + throw new VMServiceObjectLoadError('Expected a service map', map); final String type = _stripRef(map['type']); @@ -435,7 +435,7 @@ abstract class ServiceObject { final String mapType = _stripRef(map['type']); if ((_type != null) && (_type != mapType)) { - throw new VMServiceObjectLoadError("ServiceObject types must not change", + throw new VMServiceObjectLoadError('ServiceObject types must not change', map); } _type = mapType; @@ -443,7 +443,7 @@ abstract class ServiceObject { _canCache = map['fixedId'] == true; if ((_id != null) && (_id != map['id']) && _canCache) { - throw new VMServiceObjectLoadError("ServiceObject id changed", map); + throw new VMServiceObjectLoadError('ServiceObject id changed', map); } _id = map['id']; @@ -1061,7 +1061,7 @@ class Isolate extends ServiceObjectOwner { if (ownerType == 'Library' || ownerType == '@Library') break; final String ownerName = owner['name']; - name = "$ownerName.$name"; + name = '$ownerName.$name'; owner = owner['owner']; } diff --git a/packages/flutter_tools/test/asset_bundle_package_fonts_test.dart b/packages/flutter_tools/test/asset_bundle_package_fonts_test.dart index 83ef14bb4c..06d30590de 100644 --- a/packages/flutter_tools/test/asset_bundle_package_fonts_test.dart +++ b/packages/flutter_tools/test/asset_bundle_package_fonts_test.dart @@ -47,7 +47,7 @@ $fontsSection } void writePackagesFile(String packages) { - fs.file(".packages") + fs.file('.packages') ..createSync() ..writeAsStringSync(packages); } diff --git a/packages/flutter_tools/test/asset_bundle_package_test.dart b/packages/flutter_tools/test/asset_bundle_package_test.dart index 4ba3cafaa6..179e27c7f4 100644 --- a/packages/flutter_tools/test/asset_bundle_package_test.dart +++ b/packages/flutter_tools/test/asset_bundle_package_test.dart @@ -55,7 +55,7 @@ $assetsSection } void writePackagesFile(String packages) { - fs.file(".packages") + fs.file('.packages') ..createSync() ..writeAsStringSync(packages); } @@ -155,7 +155,7 @@ $assetsSection expectedAssetManifest, ); }, overrides: contextOverrides); - + testUsingContext("One asset is bundled when the package has one asset, listed in the app's pubspec", () async { establishFlutterRoot(); @@ -180,7 +180,7 @@ $assetsSection ); }, overrides: contextOverrides); - testUsingContext("One asset and its variant are bundled when the package has an asset and a variant, and lists the asset in its pubspec", () async { + testUsingContext('One asset and its variant are bundled when the package has an asset and a variant, and lists the asset in its pubspec', () async { establishFlutterRoot(); writePubspecFile('pubspec.yaml', 'test'); @@ -204,7 +204,7 @@ $assetsSection ); }, overrides: contextOverrides); - testUsingContext("One asset and its variant are bundled when the package has an asset and a variant, and the app lists the asset in its pubspec", () async { + testUsingContext('One asset and its variant are bundled when the package has an asset and a variant, and the app lists the asset in its pubspec', () async { establishFlutterRoot(); writePubspecFile( @@ -231,7 +231,7 @@ $assetsSection ); }, overrides: contextOverrides); - testUsingContext("Two assets are bundled when the package has and lists two assets in its pubspec", () async { + testUsingContext('Two assets are bundled when the package has and lists two assets in its pubspec', () async { establishFlutterRoot(); writePubspecFile('pubspec.yaml', 'test'); @@ -288,7 +288,7 @@ $assetsSection ); }, overrides: contextOverrides); - testUsingContext("Two assets are bundled when two packages each have and list an asset their pubspec", () async { + testUsingContext('Two assets are bundled when two packages each have and list an asset their pubspec', () async { establishFlutterRoot(); writePubspecFile( @@ -323,7 +323,7 @@ $assetsSection expectedAssetManifest, ); }, overrides: contextOverrides); - + testUsingContext("Two assets are bundled when two packages each have an asset, listed in the app's pubspec", () async { establishFlutterRoot(); @@ -363,7 +363,7 @@ $assetsSection ); }, overrides: contextOverrides); - testUsingContext("One asset is bundled when the app depends on a package, listing in its pubspec an asset from another package", () async { + testUsingContext('One asset is bundled when the app depends on a package, listing in its pubspec an asset from another package', () async { establishFlutterRoot(); writePubspecFile( 'pubspec.yaml', diff --git a/packages/flutter_tools/test/asset_bundle_variant_test.dart b/packages/flutter_tools/test/asset_bundle_variant_test.dart index 17c60a5b18..fea16ce524 100644 --- a/packages/flutter_tools/test/asset_bundle_variant_test.dart +++ b/packages/flutter_tools/test/asset_bundle_variant_test.dart @@ -23,7 +23,7 @@ void main() { // path separator. Cache.flutterRoot = getFlutterRoot(); - fs.file("pubspec.yaml") + fs.file('pubspec.yaml') ..createSync() ..writeAsStringSync( ''' @@ -36,7 +36,7 @@ flutter: - a/b/c/foo ''' ); - fs.file(".packages")..createSync(); + fs.file('.packages')..createSync(); final List assets = [ 'a/b/c/foo', diff --git a/packages/flutter_tools/test/commands/create_test.dart b/packages/flutter_tools/test/commands/create_test.dart index 931a5bfc8a..8c3bb98d77 100644 --- a/packages/flutter_tools/test/commands/create_test.dart +++ b/packages/flutter_tools/test/commands/create_test.dart @@ -261,7 +261,7 @@ void main() { Cache.flutterRoot = '../..'; final CreateCommand command = new CreateCommand(); final CommandRunner runner = createTestCommandRunner(command); - final File existingFile = fs.file("${projectDir.path.toString()}/bad"); + final File existingFile = fs.file('${projectDir.path.toString()}/bad'); if (!existingFile.existsSync()) existingFile.createSync(recursive: true); expect( diff --git a/packages/flutter_tools/test/commands/packages_test.dart b/packages/flutter_tools/test/commands/packages_test.dart index f4bbabfcb8..d49f4ceda7 100644 --- a/packages/flutter_tools/test/commands/packages_test.dart +++ b/packages/flutter_tools/test/commands/packages_test.dart @@ -277,12 +277,12 @@ class MemoryIOSink implements IOSink { } @override - void writeln([Object obj = ""]) { + void writeln([Object obj = '']) { add(encoding.encode('$obj\n')); } @override - void writeAll(Iterable objects, [String separator = ""]) { + void writeAll(Iterable objects, [String separator = '']) { bool addSeparator = false; for (dynamic object in objects) { if (addSeparator) {