enable lint prefer_single_quotes (#12665)

This commit is contained in:
Alexandre Ardhuin 2017-10-22 18:11:36 +02:00 committed by GitHub
parent b07ea41954
commit 1fce14a31c
90 changed files with 664 additions and 663 deletions

View File

@ -125,7 +125,7 @@ linter:
# - prefer_interpolation_to_compose_strings # not yet tested # - prefer_interpolation_to_compose_strings # not yet tested
- prefer_is_empty - prefer_is_empty
- prefer_is_not_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 # - public_member_api_docs # this is the only difference from analysis_options_repo.yaml
- recursive_getters - recursive_getters
- slash_for_doc_comments - slash_for_doc_comments

View File

@ -119,7 +119,7 @@ linter:
# - prefer_interpolation_to_compose_strings # not yet tested # - prefer_interpolation_to_compose_strings # not yet tested
- prefer_is_empty - prefer_is_empty
- prefer_is_not_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 - public_member_api_docs # this is the only difference from analysis_options_repo.yaml
- recursive_getters - recursive_getters
- slash_for_doc_comments - slash_for_doc_comments

View File

@ -9,6 +9,6 @@ void main() {
expect(2 + 2, 4); expect(2 + 2, 4);
}); });
test('excluded', () { test('excluded', () {
throw "this test should have been filtered out"; throw 'this test should have been filtered out';
}); });
} }

View File

@ -31,7 +31,7 @@ void main() {
expect(await driver.setSemantics(true), isTrue); expect(await driver.setSemantics(true), isTrue);
}); });
final Iterable<TimelineEvent> semanticsEvents = timeline.events.where((TimelineEvent event) => event.name == "Semantics"); final Iterable<TimelineEvent> semanticsEvents = timeline.events.where((TimelineEvent event) => event.name == 'Semantics');
if (semanticsEvents.length != 1) if (semanticsEvents.length != 1)
fail('Expected exactly one semantics event, got ${semanticsEvents.length}'); fail('Expected exactly one semantics event, got ${semanticsEvents.length}');
final Duration semanticsTreeCreation = semanticsEvents.first.duration; final Duration semanticsTreeCreation = semanticsEvents.first.duration;

View File

@ -29,7 +29,7 @@ class CardCollectionState extends State<CardCollection> {
const TextStyle(color: Colors.white, fontSize: 18.0, fontWeight: FontWeight.bold); const TextStyle(color: Colors.white, fontSize: 18.0, fontWeight: FontWeight.bold);
// TODO(hansmuller): need a local image asset // 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 kCardMargins = 8.0;
static const double kFixedCardHeight = 100.0; static const double kFixedCardHeight = 100.0;
@ -103,23 +103,23 @@ class CardCollectionState extends State<CardCollection> {
child: new ListView( child: new ListView(
children: <Widget>[ children: <Widget>[
const DrawerHeader(child: const Center(child: const Text('Options'))), const DrawerHeader(child: const Center(child: const Text('Options'))),
buildDrawerCheckbox("Make card labels editable", _editable, _toggleEditable), buildDrawerCheckbox('Make card labels editable', _editable, _toggleEditable),
buildDrawerCheckbox("Fixed size cards", _fixedSizeCards, _toggleFixedSizeCards), buildDrawerCheckbox('Fixed size cards', _fixedSizeCards, _toggleFixedSizeCards),
buildDrawerCheckbox("Let the sun shine", _sunshine, _toggleSunshine), buildDrawerCheckbox('Let the sun shine', _sunshine, _toggleSunshine),
buildDrawerCheckbox("Vary font sizes", _varyFontSizes, _toggleVaryFontSizes, enabled: !_editable), buildDrawerCheckbox('Vary font sizes', _varyFontSizes, _toggleVaryFontSizes, enabled: !_editable),
const Divider(), const Divider(),
buildDrawerColorRadioItem("Deep Purple", Colors.deepPurple, _primaryColor, _selectColor), buildDrawerColorRadioItem('Deep Purple', Colors.deepPurple, _primaryColor, _selectColor),
buildDrawerColorRadioItem("Green", Colors.green, _primaryColor, _selectColor), buildDrawerColorRadioItem('Green', Colors.green, _primaryColor, _selectColor),
buildDrawerColorRadioItem("Amber", Colors.amber, _primaryColor, _selectColor), buildDrawerColorRadioItem('Amber', Colors.amber, _primaryColor, _selectColor),
buildDrawerColorRadioItem("Teal", Colors.teal, _primaryColor, _selectColor), buildDrawerColorRadioItem('Teal', Colors.teal, _primaryColor, _selectColor),
const Divider(), const Divider(),
buildDrawerDirectionRadioItem("Dismiss horizontally", DismissDirection.horizontal, _dismissDirection, _changeDismissDirection, icon: Icons.code), buildDrawerDirectionRadioItem('Dismiss horizontally', DismissDirection.horizontal, _dismissDirection, _changeDismissDirection, icon: Icons.code),
buildDrawerDirectionRadioItem("Dismiss left", DismissDirection.endToStart, _dismissDirection, _changeDismissDirection, icon: Icons.arrow_back), buildDrawerDirectionRadioItem('Dismiss left', DismissDirection.endToStart, _dismissDirection, _changeDismissDirection, icon: Icons.arrow_back),
buildDrawerDirectionRadioItem("Dismiss right", DismissDirection.startToEnd, _dismissDirection, _changeDismissDirection, icon: Icons.arrow_forward), buildDrawerDirectionRadioItem('Dismiss right', DismissDirection.startToEnd, _dismissDirection, _changeDismissDirection, icon: Icons.arrow_forward),
const Divider(), const Divider(),
buildFontRadioItem("Left-align text", TextAlign.left, _textAlign, _changeTextAlign, icon: Icons.format_align_left, 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('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('Right-align text', TextAlign.right, _textAlign, _changeTextAlign, icon: Icons.format_align_right, enabled: !_editable),
const Divider(), const Divider(),
new ListTile( new ListTile(
leading: const Icon(Icons.dvr), leading: const Icon(Icons.dvr),
@ -282,16 +282,16 @@ class CardCollectionState extends State<CardCollection> {
String backgroundMessage; String backgroundMessage;
switch (_dismissDirection) { switch (_dismissDirection) {
case DismissDirection.horizontal: case DismissDirection.horizontal:
backgroundMessage = "Swipe in either direction"; backgroundMessage = 'Swipe in either direction';
break; break;
case DismissDirection.endToStart: case DismissDirection.endToStart:
backgroundMessage = "Swipe left to dismiss"; backgroundMessage = 'Swipe left to dismiss';
break; break;
case DismissDirection.startToEnd: case DismissDirection.startToEnd:
backgroundMessage = "Swipe right to dismiss"; backgroundMessage = 'Swipe right to dismiss';
break; break;
default: default:
backgroundMessage = "Unsupported dismissDirection"; backgroundMessage = 'Unsupported dismissDirection';
} }
// TODO(abarth): This icon is wrong in RTL. // TODO(abarth): This icon is wrong in RTL.

View File

@ -211,7 +211,7 @@ class _PointDemoState extends State<_PointDemo> {
child: new Padding( child: new Padding(
padding: const EdgeInsets.all(16.0), padding: const EdgeInsets.all(16.0),
child: new Text( 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.", "and red points to change the animation's path.",
style: Theme.of(context).textTheme.caption.copyWith(fontSize: 16.0) style: Theme.of(context).textTheme.caption.copyWith(fontSize: 16.0)
) )
@ -384,7 +384,7 @@ class _RectangleDemoState extends State<_RectangleDemo> {
child: new Padding( child: new Padding(
padding: const EdgeInsets.all(16.0), padding: const EdgeInsets.all(16.0),
child: new Text( 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.", "to change the animation's path.",
style: Theme.of(context).textTheme.caption.copyWith(fontSize: 16.0) style: Theme.of(context).textTheme.caption.copyWith(fontSize: 16.0)
) )

View File

@ -112,7 +112,7 @@ class PageViewAppState extends State<PageViewApp> {
return new AppBar( return new AppBar(
title: const Text('PageView'), title: const Text('PageView'),
actions: <Widget>[ actions: <Widget>[
new Text(scrollDirection == Axis.horizontal ? "horizontal" : "vertical"), new Text(scrollDirection == Axis.horizontal ? 'horizontal' : 'vertical'),
], ],
); );
} }

View File

@ -8,7 +8,7 @@ import 'package:flutter_test/flutter_test.dart';
import '../lib/card_collection.dart' as card_collection; import '../lib/card_collection.dart' as card_collection;
void main() { 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 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(); // see https://github.com/flutter/flutter/issues/1865
await tester.pump(); // triggers a frame await tester.pump(); // triggers a frame

View File

@ -8,7 +8,7 @@ import 'package:flutter_test/flutter_test.dart';
import '../lib/color_testing_demo.dart' as color_testing_demo; import '../lib/color_testing_demo.dart' as color_testing_demo;
void main() { 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 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(); // see https://github.com/flutter/flutter/issues/1865
await tester.pump(); // triggers a frame await tester.pump(); // triggers a frame

View File

@ -42,34 +42,35 @@ const String outputHeader = '''
final Map<String, Map<String, String>> localeToResources = <String, Map<String, String>>{}; final Map<String, Map<String, String>> localeToResources = <String, Map<String, String>>{};
/// Maps locales to resource attributes. /// Maps locales to resource attributes.
/// ///
/// See also https://github.com/googlei18n/app-resource-bundle/wiki/ApplicationResourceBundleSpecification#resource-attributes /// See also https://github.com/googlei18n/app-resource-bundle/wiki/ApplicationResourceBundleSpecification#resource-attributes
final Map<String, Map<String, dynamic>> localeToResourceAttributes = <String, Map<String, dynamic>>{}; final Map<String, Map<String, dynamic>> localeToResourceAttributes = <String, Map<String, dynamic>>{};
// Return s as a Dart-parseable raw string in double quotes. Expand double quotes: // Return s as a Dart-parseable raw string in single or double quotes. Expand double quotes:
// foo => r"foo" // foo => r'foo'
// foo "bar" => r"foo " '"' r"bar" '"' // foo "bar" => r'foo "bar"'
// foo 'bar' => r'foo ' "'" r'bar' "'"
String generateString(String s) { String generateString(String s) {
if (!s.contains('"')) if (!s.contains("'"))
return 'r"$s"'; return "r'$s'";
final StringBuffer output = new StringBuffer(); final StringBuffer output = new StringBuffer();
bool started = false; // Have we started writing a raw string. bool started = false; // Have we started writing a raw string.
for (int i = 0; i < s.length; i++) { for (int i = 0; i < s.length; i++) {
if (s[i] == '"') { if (s[i] == "'") {
if (started) if (started)
output.write('"'); output.write("'");
output.write(' \'"\' '); output.write(' "\'" ');
started = false; started = false;
} else if (!started) { } else if (!started) {
output.write('r"${s[i]}'); output.write("r'${s[i]}");
started = true; started = true;
} else { } else {
output.write(s[i]); output.write(s[i]);
} }
} }
if (started) if (started)
output.write('"'); output.write("'");
return output.toString(); return output.toString();
} }
@ -84,12 +85,12 @@ String generateLocalizationsMap() {
const Map<String, Map<String, String>> localizations = const <String, Map<String, String>> {'''); const Map<String, Map<String, String>> localizations = const <String, Map<String, String>> {''');
for (String locale in localeToResources.keys.toList()..sort()) { for (String locale in localeToResources.keys.toList()..sort()) {
output.writeln(' "$locale": const <String, String>{'); output.writeln(" '$locale': const <String, String>{");
final Map<String, String> resources = localeToResources[locale]; final Map<String, String> resources = localeToResources[locale];
for (String name in resources.keys) { for (String name in resources.keys) {
final String value = generateString(resources[name]); final String value = generateString(resources[name]);
output.writeln(' "$name": $value,'); output.writeln(" '$name': $value,");
} }
output.writeln(' },'); output.writeln(' },');
} }

View File

@ -91,7 +91,7 @@ void _createEntry(File mainFile, int copies) {
for (int i = 1; i < copies; i++) { for (int i = 1; i < copies; i++) {
imports.writeln("import 'gallery_$i/main.dart' as main_$i;"); imports.writeln("import 'gallery_$i/main.dart' as main_$i;");
importRefs.writeln(" main_$i.main;"); importRefs.writeln(' main_$i.main;');
} }
final String contents = ''' final String contents = '''

View File

@ -57,7 +57,7 @@ String expandTemplate(String template, Map<String, String> values) {
if (match.groupCount != 1) if (match.groupCount != 1)
throw new SampleError('bad template keyword $match[0]'); throw new SampleError('bad template keyword $match[0]');
final String keyword = match[1]; final String keyword = match[1];
return (values[keyword] ?? ""); return (values[keyword] ?? '');
}); });
} }

View File

@ -8,7 +8,7 @@ import 'package:flutter_test/flutter_test.dart';
import '../lib/animated_list.dart' as animated_list_sample; import '../lib/animated_list.dart' as animated_list_sample;
void main() { 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(); animated_list_sample.main();
await tester.pump(); await tester.pump();

View File

@ -20,7 +20,7 @@ Finder findChoiceCard(IconData icon) {
} }
void main() { 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(); basic_app_bar_sample.main();
await tester.pump(); await tester.pump();

View File

@ -9,7 +9,7 @@ import '../lib/expansion_tile_sample.dart' as expansion_tile_sample;
import '../lib/expansion_tile_sample.dart' show Entry; import '../lib/expansion_tile_sample.dart' show Entry;
void main() { void main() {
testWidgets("expansion_tile sample smoke test", (WidgetTester tester) async { testWidgets('expansion_tile sample smoke test', (WidgetTester tester) async {
expansion_tile_sample.main(); expansion_tile_sample.main();
await tester.pump(); await tester.pump();

View File

@ -19,7 +19,7 @@ Finder findTab(IconData icon) {
} }
void main() { 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(); tabbed_app_bar_sample.main();
await tester.pump(); await tester.pump();

View File

@ -13,11 +13,11 @@ enum DialogDemoAction {
agree, agree,
} }
const String _alertWithoutTitleText = "Discard draft?"; const String _alertWithoutTitleText = 'Discard draft?';
const String _alertWithTitleText = const String _alertWithTitleText =
"Let Google help apps determine location. This means sending anyonmous location " 'Let Google help apps determine location. This means sending anyonmous location '
"data to Google, even when no apps are running."; 'data to Google, even when no apps are running.';
class DialogDemoItem extends StatelessWidget { class DialogDemoItem extends StatelessWidget {
const DialogDemoItem({ Key key, this.icon, this.color, this.text, this.onPressed }) : super(key: key); const DialogDemoItem({ Key key, this.icon, this.color, this.text, this.onPressed }) : super(key: key);

View File

@ -225,7 +225,7 @@ class _ExpansionPanelsDemoState extends State<ExpasionPanelsDemo> {
name: 'Location', name: 'Location',
value: _Location.Bahamas, value: _Location.Bahamas,
hint: 'Select location', hint: 'Select location',
valueToString: (_Location location) => location.toString().split(".")[1], valueToString: (_Location location) => location.toString().split('.')[1],
builder: (DemoItem<_Location> item) { builder: (DemoItem<_Location> item) {
void close() { void close() {
setState(() { setState(() {

View File

@ -172,10 +172,10 @@ class _ListDemoState extends State<ListDemo> {
Widget buildListTile(BuildContext context, String item) { Widget buildListTile(BuildContext context, String item) {
Widget secondary; Widget secondary;
if (_itemType == _MaterialListType.twoLine) { if (_itemType == _MaterialListType.twoLine) {
secondary = const Text("Additional item information."); secondary = const Text('Additional item information.');
} else if (_itemType == _MaterialListType.threeLine) { } else if (_itemType == _MaterialListType.threeLine) {
secondary = const Text( 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( return new MergeSemantics(
@ -192,7 +192,7 @@ class _ListDemoState extends State<ListDemo> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final String layoutText = _dense ? " \u2013 Dense" : ""; final String layoutText = _dense ? ' \u2013 Dense' : '';
String itemTypeText; String itemTypeText;
switch (_itemType) { switch (_itemType) {
case _MaterialListType.oneLine: case _MaterialListType.oneLine:

View File

@ -29,7 +29,7 @@ class OverscrollDemoState extends State<OverscrollDemo> {
new Timer(const Duration(seconds: 3), () { completer.complete(null); }); new Timer(const Duration(seconds: 3), () { completer.complete(null); });
return completer.future.then((_) { return completer.future.then((_) {
_scaffoldKey.currentState?.showSnackBar(new SnackBar( _scaffoldKey.currentState?.showSnackBar(new SnackBar(
content: const Text("Refresh complete"), content: const Text('Refresh complete'),
action: new SnackBarAction( action: new SnackBarAction(
label: 'RETRY', label: 'RETRY',
onPressed: () { onPressed: () {

View File

@ -7,21 +7,21 @@ import 'package:flutter/material.dart';
import '../../gallery/demo.dart'; import '../../gallery/demo.dart';
const String _checkboxText = const String _checkboxText =
"Checkboxes allow the user to select multiple options from a set."; 'Checkboxes allow the user to select multiple options from a set.';
const String _checkboxCode = 'selectioncontrols_checkbox'; const String _checkboxCode = 'selectioncontrols_checkbox';
const String _radioText = const String _radioText =
"Radio buttons allow the user to select one option from a set. Use radio " '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 " 'buttons for exclusive selection if you think that the user needs to see '
"all available options side-by-side."; 'all available options side-by-side.';
const String _radioCode = 'selectioncontrols_radio'; const String _radioCode = 'selectioncontrols_radio';
const String _switchText = const String _switchText =
"On/off switches toggle the state of a single settings option. The option " 'On/off switches toggle the state of a single settings option. The option '
"that the switch controls, as well as the state its in, should be made " 'that the switch controls, as well as the state its in, should be made '
"clear from the corresponding inline label."; 'clear from the corresponding inline label.';
const String _switchCode = 'selectioncontrols_switch'; const String _switchCode = 'selectioncontrols_switch';
@ -37,19 +37,19 @@ class _SelectionControlsDemoState extends State<SelectionControlsDemo> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final List<ComponentDemoTabData> demos = <ComponentDemoTabData>[ final List<ComponentDemoTabData> demos = <ComponentDemoTabData>[
new ComponentDemoTabData( new ComponentDemoTabData(
tabName: "CHECKBOX", tabName: 'CHECKBOX',
description: _checkboxText, description: _checkboxText,
demoWidget: buildCheckbox(), demoWidget: buildCheckbox(),
exampleCodeTag: _checkboxCode exampleCodeTag: _checkboxCode
), ),
new ComponentDemoTabData( new ComponentDemoTabData(
tabName: "RADIO", tabName: 'RADIO',
description: _radioText, description: _radioText,
demoWidget: buildRadio(), demoWidget: buildRadio(),
exampleCodeTag: _radioCode exampleCodeTag: _radioCode
), ),
new ComponentDemoTabData( new ComponentDemoTabData(
tabName: "SWITCH", tabName: 'SWITCH',
description: _switchText, description: _switchText,
demoWidget: buildSwitch(), demoWidget: buildSwitch(),
exampleCodeTag: _switchCode exampleCodeTag: _switchCode

View File

@ -5,16 +5,16 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
const String _text1 = const String _text1 =
"Snackbars provide lightweight feedback about an operation by " 'Snackbars provide lightweight feedback about an operation by '
"showing a brief message at the bottom of the screen. Snackbars " 'showing a brief message at the bottom of the screen. Snackbars '
"can contain an action."; 'can contain an action.';
const String _text2 = const String _text2 =
"Snackbars should contain a single line of text directly related " 'Snackbars should contain a single line of text directly related '
"to the operation performed. They cannot contain icons."; 'to the operation performed. They cannot contain icons.';
const String _text3 = 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 { class SnackBarDemo extends StatefulWidget {
const SnackBarDemo({ Key key }) : super(key: key); const SnackBarDemo({ Key key }) : super(key: key);

View File

@ -6,9 +6,9 @@ import 'package:flutter/material.dart';
const String _explanatoryText = const String _explanatoryText =
"When the Scaffold's floating action button changes, the new button fades and " "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 " '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 " 'with a FloatingActionButton that the Scaffold distinguishes from the others '
"by its key."; 'by its key.';
class _Page { class _Page {
_Page({ this.label, this.colors, this.icon }); _Page({ this.label, this.colors, this.icon });

View File

@ -5,9 +5,9 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
const String _introText = const String _introText =
"Tooltips are short identifying messages that briefly appear in response to " 'Tooltips are short identifying messages that briefly appear in response to '
"a long press. Tooltip messages are also used by services that make Flutter " 'a long press. Tooltip messages are also used by services that make Flutter '
"apps accessible, like screen readers."; 'apps accessible, like screen readers.';
class TooltipDemo extends StatelessWidget { class TooltipDemo extends StatelessWidget {

View File

@ -162,14 +162,14 @@ class _RecipeGridPageState extends State<RecipeGridPage> {
void showFavoritesPage(BuildContext context) { void showFavoritesPage(BuildContext context) {
Navigator.push(context, new MaterialPageRoute<Null>( Navigator.push(context, new MaterialPageRoute<Null>(
settings: const RouteSettings(name: "/pesto/favorites"), settings: const RouteSettings(name: '/pesto/favorites'),
builder: (BuildContext context) => new PestoFavorites(), builder: (BuildContext context) => new PestoFavorites(),
)); ));
} }
void showRecipePage(BuildContext context, Recipe recipe) { void showRecipePage(BuildContext context, Recipe recipe) {
Navigator.push(context, new MaterialPageRoute<Null>( Navigator.push(context, new MaterialPageRoute<Null>(
settings: const RouteSettings(name: "/pesto/recipe"), settings: const RouteSettings(name: '/pesto/recipe'),
builder: (BuildContext context) { builder: (BuildContext context) {
return new Theme( return new Theme(
data: _kTheme.copyWith(platform: Theme.of(context).platform), data: _kTheme.copyWith(platform: Theme.of(context).platform),

View File

@ -118,10 +118,10 @@ class DartSyntaxHighlighter extends SyntaxHighlighter {
while (!_scanner.isDone) { while (!_scanner.isDone) {
// Skip White space // Skip White space
_scanner.scan(new RegExp(r"\s+")); _scanner.scan(new RegExp(r'\s+'));
// Block comments // Block comments
if (_scanner.scan(new RegExp(r"/\*(.|\n)*\*/"))) { if (_scanner.scan(new RegExp(r'/\*(.|\n)*\*/'))) {
_spans.add(new _HighlightSpan( _spans.add(new _HighlightSpan(
_HighlightType.comment, _HighlightType.comment,
_scanner.lastMatch.start, _scanner.lastMatch.start,
@ -131,12 +131,12 @@ class DartSyntaxHighlighter extends SyntaxHighlighter {
} }
// Line comments // Line comments
if (_scanner.scan("//")) { if (_scanner.scan('//')) {
final int startComment = _scanner.lastMatch.start; final int startComment = _scanner.lastMatch.start;
bool eof = false; bool eof = false;
int endComment; int endComment;
if (_scanner.scan(new RegExp(r".*\n"))) { if (_scanner.scan(new RegExp(r'.*\n'))) {
endComment = _scanner.lastMatch.end - 1; endComment = _scanner.lastMatch.end - 1;
} else { } else {
eof = true; eof = true;
@ -216,7 +216,7 @@ class DartSyntaxHighlighter extends SyntaxHighlighter {
} }
// Double // Double
if (_scanner.scan(new RegExp(r"\d+\.\d+"))) { if (_scanner.scan(new RegExp(r'\d+\.\d+'))) {
_spans.add(new _HighlightSpan( _spans.add(new _HighlightSpan(
_HighlightType.number, _HighlightType.number,
_scanner.lastMatch.start, _scanner.lastMatch.start,
@ -226,7 +226,7 @@ class DartSyntaxHighlighter extends SyntaxHighlighter {
} }
// Integer // Integer
if (_scanner.scan(new RegExp(r"\d+"))) { if (_scanner.scan(new RegExp(r'\d+'))) {
_spans.add(new _HighlightSpan( _spans.add(new _HighlightSpan(
_HighlightType.number, _HighlightType.number,
_scanner.lastMatch.start, _scanner.lastMatch.start,
@ -236,7 +236,7 @@ class DartSyntaxHighlighter extends SyntaxHighlighter {
} }
// Punctuation // Punctuation
if (_scanner.scan(new RegExp(r"[\[\]{}().!=<>&\|\?\+\-\*/%\^~;:,]"))) { if (_scanner.scan(new RegExp(r'[\[\]{}().!=<>&\|\?\+\-\*/%\^~;:,]'))) {
_spans.add(new _HighlightSpan( _spans.add(new _HighlightSpan(
_HighlightType.punctuation, _HighlightType.punctuation,
_scanner.lastMatch.start, _scanner.lastMatch.start,
@ -246,7 +246,7 @@ class DartSyntaxHighlighter extends SyntaxHighlighter {
} }
// Meta data // Meta data
if (_scanner.scan(new RegExp(r"@\w+"))) { if (_scanner.scan(new RegExp(r'@\w+'))) {
_spans.add(new _HighlightSpan( _spans.add(new _HighlightSpan(
_HighlightType.keyword, _HighlightType.keyword,
_scanner.lastMatch.start, _scanner.lastMatch.start,
@ -256,11 +256,11 @@ class DartSyntaxHighlighter extends SyntaxHighlighter {
} }
// Words // Words
if (_scanner.scan(new RegExp(r"\w+"))) { if (_scanner.scan(new RegExp(r'\w+'))) {
_HighlightType type; _HighlightType type;
String word = _scanner.lastMatch[0]; String word = _scanner.lastMatch[0];
if (word.startsWith("_")) if (word.startsWith('_'))
word = word.substring(1); word = word.substring(1);
if (_kKeywords.contains(word)) if (_kKeywords.contains(word))
@ -269,7 +269,7 @@ class DartSyntaxHighlighter extends SyntaxHighlighter {
type = _HighlightType.keyword; type = _HighlightType.keyword;
else if (_firstLetterIsUpperCase(word)) else if (_firstLetterIsUpperCase(word))
type = _HighlightType.klass; 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; type = _HighlightType.constant;
if (type != null) { if (type != null) {

View File

@ -16,7 +16,7 @@ void main() {
expression = expression.appendDigit(4); expression = expression.appendDigit(4);
expression = expression.computeResult(); expression = expression.computeResult();
expect(expression.state, equals(ExpressionState.Result)); 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', () { test('Test floating point 0.1 + 0.2 = 0.3', () {
@ -30,7 +30,7 @@ void main() {
expression = expression.appendDigit(2); expression = expression.appendDigit(2);
expression = expression.computeResult(); expression = expression.computeResult();
expect(expression.state, equals(ExpressionState.Result)); 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', () { test('Test floating point 1.0/10.0 = 0.1', () {
@ -45,7 +45,7 @@ void main() {
expression = expression.appendDigit(0); expression = expression.appendDigit(0);
expression = expression.computeResult(); expression = expression.computeResult();
expect(expression.state, equals(ExpressionState.Result)); expect(expression.state, equals(ExpressionState.Result));
expect(expression.toString(), equals("0.1")); expect(expression.toString(), equals('0.1'));
}); });
test('Test 1/0 = Infinity', () { test('Test 1/0 = Infinity', () {
@ -55,7 +55,7 @@ void main() {
expression = expression.appendDigit(0); expression = expression.appendDigit(0);
expression = expression.computeResult(); expression = expression.computeResult();
expect(expression.state, equals(ExpressionState.Result)); 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', () { 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.appendDigit(1);
expression = expression.computeResult(); expression = expression.computeResult();
expect(expression.state, equals(ExpressionState.Result)); expect(expression.state, equals(ExpressionState.Result));
expect(expression.toString(), equals("4")); expect(expression.toString(), equals('4'));
}); });
test('Test minus -3 - -2 = -1', () { test('Test minus -3 - -2 = -1', () {
@ -83,6 +83,6 @@ void main() {
expression = expression.appendDigit(2); expression = expression.appendDigit(2);
expression = expression.computeResult(); expression = expression.computeResult();
expect(expression.state, equals(ExpressionState.Result)); expect(expression.state, equals(ExpressionState.Result));
expect(expression.toString(), equals("-1")); expect(expression.toString(), equals('-1'));
}); });
} }

View File

@ -51,21 +51,21 @@ void main() {
expect(app.theme.platform, equals(TargetPlatform.iOS)); expect(app.theme.platform, equals(TargetPlatform.iOS));
// Verify the font scale. // 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))); expect(origTextSize, equals(const Size(176.0, 14.0)));
// Switch font scale. // Switch font scale.
await tester.tap(find.text('Small')); await tester.tap(find.text('Small'));
await tester.pump(); await tester.pump();
await tester.pump(const Duration(seconds: 1)); // Wait until it's changed. 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))); expect(textSize, equals(const Size(176.0, 11.0)));
// Set font scale back to default. // Set font scale back to default.
await tester.tap(find.text('System Default')); await tester.tap(find.text('System Default'));
await tester.pump(); await tester.pump();
await tester.pump(const Duration(seconds: 1)); // Wait until it's changed. 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)); expect(newTextSize, equals(origTextSize));
// Scroll to the bottom of the menu. // Scroll to the bottom of the menu.

View File

@ -21,7 +21,7 @@ void main() {
}); });
} }
const String testCodeFile = """// A fake test file const String testCodeFile = '''// A fake test file
// START test_0 // START test_0
test 0 0 test 0 0
test 0 1 test 0 1
@ -32,7 +32,7 @@ test 0 1
test 1 0 test 1 0
test 1 1 test 1 1
// END // END
"""; ''';
class TestAssetBundle extends AssetBundle { class TestAssetBundle extends AssetBundle {
@override @override

View File

@ -26,9 +26,9 @@ class MyHomePage extends StatefulWidget {
} }
class _MyHomePageState extends State<MyHomePage> { class _MyHomePageState extends State<MyHomePage> {
static const String _channel = "increment"; static const String _channel = 'increment';
static const String _pong = "pong"; static const String _pong = 'pong';
static const String _emptyMessage = ""; static const String _emptyMessage = '';
static const BasicMessageChannel<String> platform = static const BasicMessageChannel<String> platform =
const BasicMessageChannel<String>(_channel, const StringCodec()); const BasicMessageChannel<String>(_channel, const StringCodec());

View File

@ -7,7 +7,7 @@ import 'package:flutter_test/flutter_test.dart';
import '../lib/main.dart' as hello_world; import '../lib/main.dart' as hello_world;
void main() { 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 hello_world.main(); // builds the app and schedules a frame but doesn't trigger one
await tester.pump(); // triggers a frame await tester.pump(); // triggers a frame

View File

@ -104,7 +104,7 @@ void main() {
final RenderParagraph paragraph = new RenderParagraph( final RenderParagraph paragraph = new RenderParagraph(
const TextSpan( const TextSpan(
style: const TextStyle(color: Colors.black87), style: const TextStyle(color: Colors.black87),
text: "Touch me!", text: 'Touch me!',
), ),
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
); );

View File

@ -46,21 +46,21 @@ class Calculator {
try { try {
final List<dynamic> result = decoder.convert(_data); final List<dynamic> result = decoder.convert(_data);
final int n = result.length; final int n = result.length;
onResultListener("Decoded $n results"); onResultListener('Decoded $n results');
} catch (e, stack) { } catch (e, stack) {
print("Invalid JSON file: $e"); print('Invalid JSON file: $e');
print(stack); print(stack);
} }
} }
static String _replicateJson(String data, int count) { 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++) { for (int i = 0; i < count; i++) {
buffer.write(data); buffer.write(data);
if (i < count - 1) if (i < count - 1)
buffer.write(','); buffer.write(',');
} }
buffer.write("]"); buffer.write(']');
return buffer.toString(); return buffer.toString();
} }
} }

View File

@ -24,7 +24,7 @@ final List<List<String>> _kNameLines = _kDialogText
.toList(); .toList();
final TextStyle _kDaveStyle = new TextStyle(color: Colors.indigo.shade400, height: 1.8); 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 _kBold = const TextStyle(fontWeight: FontWeight.bold);
final TextStyle _kUnderline = const TextStyle( final TextStyle _kUnderline = const TextStyle(
decoration: TextDecoration.underline, decoration: TextDecoration.underline,
@ -33,7 +33,7 @@ final TextStyle _kUnderline = const TextStyle(
); );
Widget toStyledText(String name, String text) { Widget toStyledText(String name, String text) {
final TextStyle lineStyle = (name == "Dave") ? _kDaveStyle : _kHalStyle; final TextStyle lineStyle = (name == 'Dave') ? _kDaveStyle : _kHalStyle;
return new RichText( return new RichText(
key: new Key(text), key: new Key(text),
text: new TextSpan( 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 { class SpeakerSeparator extends StatelessWidget {
@override @override

View File

@ -27,7 +27,7 @@ class _PlatformChannelState extends State<PlatformChannel> {
final int result = await methodChannel.invokeMethod('getBatteryLevel'); final int result = await methodChannel.invokeMethod('getBatteryLevel');
batteryLevel = 'Battery level: $result%.'; batteryLevel = 'Battery level: $result%.';
} on PlatformException { } on PlatformException {
batteryLevel = "Failed to get battery level."; batteryLevel = 'Failed to get battery level.';
} }
setState(() { setState(() {
_batteryLevel = batteryLevel; _batteryLevel = batteryLevel;
@ -49,7 +49,7 @@ class _PlatformChannelState extends State<PlatformChannel> {
void _onError(PlatformException error) { void _onError(PlatformException error) {
setState(() { setState(() {
_chargingStatus = "Battery status: unknown."; _chargingStatus = 'Battery status: unknown.';
}); });
} }

View File

@ -27,7 +27,7 @@ class _PlatformChannelState extends State<PlatformChannel> {
final int result = await methodChannel.invokeMethod('getBatteryLevel'); final int result = await methodChannel.invokeMethod('getBatteryLevel');
batteryLevel = 'Battery level: $result%.'; batteryLevel = 'Battery level: $result%.';
} on PlatformException { } on PlatformException {
batteryLevel = "Failed to get battery level."; batteryLevel = 'Failed to get battery level.';
} }
setState(() { setState(() {
_batteryLevel = batteryLevel; _batteryLevel = batteryLevel;
@ -49,7 +49,7 @@ class _PlatformChannelState extends State<PlatformChannel> {
void _onError(PlatformException error) { void _onError(PlatformException error) {
setState(() { setState(() {
_chargingStatus = "Battery status: unknown."; _chargingStatus = 'Battery status: unknown.';
}); });
} }

View File

@ -35,7 +35,7 @@ class MyHomePage extends StatefulWidget {
class _MyHomePageState extends State<MyHomePage> { class _MyHomePageState extends State<MyHomePage> {
static const MethodChannel _methodChannel = static const MethodChannel _methodChannel =
const MethodChannel("samples.flutter.io/platform_view"); const MethodChannel('samples.flutter.io/platform_view');
int _counter = 0; int _counter = 0;
@ -47,7 +47,7 @@ class _MyHomePageState extends State<MyHomePage> {
Future<Null> _launchPlatformCount() async { Future<Null> _launchPlatformCount() async {
final int platformCounter = final int platformCounter =
await _methodChannel.invokeMethod("switchView", _counter); await _methodChannel.invokeMethod('switchView', _counter);
setState(() { setState(() {
_counter = platformCounter; _counter = platformCounter;
}); });

View File

@ -245,9 +245,9 @@ class StockHomeState extends State<StockHome> {
stock.lastSale += 1.0; stock.lastSale += 1.0;
}); });
_scaffoldKey.currentState.showSnackBar(new SnackBar( _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( action: new SnackBarAction(
label: "BUY MORE", label: 'BUY MORE',
onPressed: () { onPressed: () {
_buyStock(stock); _buyStock(stock);
}, },
@ -278,7 +278,7 @@ class StockHomeState extends State<StockHome> {
); );
} }
static const List<String> portfolioSymbols = const <String>["AAPL","FIZZ", "FIVE", "FLAT", "ZINC", "ZNGA"]; static const List<String> portfolioSymbols = const <String>['AAPL','FIZZ', 'FIVE', 'FLAT', 'ZINC', 'ZNGA'];
Widget buildSearchBar() { Widget buildSearchBar() {
return new AppBar( return new AppBar(

View File

@ -30,10 +30,10 @@ class StockRow extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final String lastSale = "\$${stock.lastSale.toStringAsFixed(2)}"; final String lastSale = '\$${stock.lastSale.toStringAsFixed(2)}';
String changeInPrice = "${stock.percentChange.toStringAsFixed(2)}%"; String changeInPrice = '${stock.percentChange.toStringAsFixed(2)}%';
if (stock.percentChange > 0) if (stock.percentChange > 0)
changeInPrice = "+" + changeInPrice; changeInPrice = '+' + changeInPrice;
return new InkWell( return new InkWell(
onTap: _getHandler(onPressed), onTap: _getHandler(onPressed),
onDoubleTap: _getHandler(onDoubleTap), onDoubleTap: _getHandler(onDoubleTap),

View File

@ -68,8 +68,8 @@ class StockSettingsState extends State<StockSettings> {
showDialog<bool>( showDialog<bool>(
context: context, context: context,
child: new AlertDialog( child: new AlertDialog(
title: const Text("Change mode?"), title: const Text('Change mode?'),
content: const Text("Optimistic mode means everything is awesome. Are you sure you can handle that?"), content: const Text('Optimistic mode means everything is awesome. Are you sure you can handle that?'),
actions: <Widget>[ actions: <Widget>[
new FlatButton( new FlatButton(
child: const Text('NO THANKS'), child: const Text('NO THANKS'),

View File

@ -16,10 +16,10 @@ class _StockSymbolView extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
assert(stock != null); assert(stock != null);
final String lastSale = "\$${stock.lastSale.toStringAsFixed(2)}"; final String lastSale = '\$${stock.lastSale.toStringAsFixed(2)}';
String changeInPrice = "${stock.percentChange.toStringAsFixed(2)}%"; String changeInPrice = '${stock.percentChange.toStringAsFixed(2)}%';
if (stock.percentChange > 0) if (stock.percentChange > 0)
changeInPrice = "+" + changeInPrice; changeInPrice = '+' + changeInPrice;
final TextStyle headings = Theme.of(context).textTheme.body2; final TextStyle headings = Theme.of(context).textTheme.body2;
return new Container( return new Container(

View File

@ -5,7 +5,7 @@
import 'dart:ui'; import 'dart:ui';
/// Whether we've been built in release mode. /// 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. /// When running in profile mode (or debug mode), invoke the given function.
/// ///

View File

@ -170,7 +170,7 @@ class HSVColor {
int get hashCode => hashValues(alpha, hue, saturation, value); int get hashCode => hashValues(alpha, hue, saturation, value);
@override @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". /// A color that has a small table of related colors called a "swatch".

View File

@ -578,7 +578,7 @@ abstract class RenderSliverMultiBoxAdaptor extends RenderSliver
RenderBox child = firstChild; RenderBox child = firstChild;
while (true) { while (true) {
final SliverMultiBoxAdaptorParentData childParentData = child.parentData; 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) if (child == lastChild)
break; break;
child = childParentData.nextSibling; child = childParentData.nextSibling;
@ -588,7 +588,7 @@ abstract class RenderSliverMultiBoxAdaptor extends RenderSliver
final List<int> indices = _keepAliveBucket.keys.toList()..sort(); final List<int> indices = _keepAliveBucket.keys.toList()..sort();
for (int index in indices) { for (int index in indices) {
children.add(_keepAliveBucket[index].toDiagnosticsNode( children.add(_keepAliveBucket[index].toDiagnosticsNode(
name: "child with index $index (kept alive offstage)", name: 'child with index $index (kept alive offstage)',
style: DiagnosticsTreeStyle.offstage, style: DiagnosticsTreeStyle.offstage,
)); ));
} }

View File

@ -134,7 +134,7 @@ class RelativeRect {
int get hashCode => hashValues(left, top, right, bottom); int get hashCode => hashValues(left, top, right, bottom);
@override @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]. /// Parent data for use with [RenderStack].

View File

@ -1167,7 +1167,7 @@ class RenderTable extends RenderBox {
description.add(new DiagnosticsProperty<TableColumnWidth>('default column width', defaultColumnWidth)); description.add(new DiagnosticsProperty<TableColumnWidth>('default column width', defaultColumnWidth));
description.add(new MessageProperty('table size', '$columns\u00D7$rows')); description.add(new MessageProperty('table size', '$columns\u00D7$rows'));
description.add(new IterableProperty<double>('column offsets', _columnLefts, ifNull: 'unknown')); description.add(new IterableProperty<double>('column offsets', _columnLefts, ifNull: 'unknown'));
description.add(new IterableProperty<double>('row offsets', _rowTops, ifNull: "unknown")); description.add(new IterableProperty<double>('row offsets', _rowTops, ifNull: 'unknown'));
} }
@override @override

View File

@ -246,7 +246,7 @@ class AssetImage extends AssetBundleImageProvider {
return candidates[lower]; 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) { double _parseScale(String key) {
final Match match = _extractRatioRegExp.firstMatch(key); final Match match = _extractRatioRegExp.firstMatch(key);

View File

@ -150,7 +150,7 @@ class MethodChannel {
codec.encodeMethodCall(new MethodCall(method, arguments)), codec.encodeMethodCall(new MethodCall(method, arguments)),
); );
if (result == null) 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); return codec.decodeEnvelope(result);
} }

View File

@ -367,7 +367,7 @@ class FocusScopeNode extends Object with DiagnosticableTreeMixin {
FocusScopeNode child = _firstChild; FocusScopeNode child = _firstChild;
int count = 1; int count = 1;
while (true) { while (true) {
children.add(child.toDiagnosticsNode(name: "child $count")); children.add(child.toDiagnosticsNode(name: 'child $count'));
if (child == _lastChild) if (child == _lastChild)
break; break;
child = child._nextSibling; child = child._nextSibling;

View File

@ -3833,7 +3833,7 @@ class ParentDataElement<T extends RenderObjectWidget> extends ProxyElement {
throw new FlutterError( throw new FlutterError(
'Incorrect use of ParentDataWidget.\n' + 'Incorrect use of ParentDataWidget.\n' +
widget.debugDescribeInvalidAncestorChain( widget.debugDescribeInvalidAncestorChain(
description: "$this", description: '$this',
ownershipChain: parent.debugGetCreatorChain(10), ownershipChain: parent.debugGetCreatorChain(10),
foundValidAncestor: ancestor != null, foundValidAncestor: ancestor != null,
badAncestors: badAncestors badAncestors: badAncestors

View File

@ -71,7 +71,7 @@ void main() {
box = tester.renderObject(find.byType(ExpansionPanelList)); box = tester.renderObject(find.byType(ExpansionPanelList));
expect(box.size.height - oldHeight, greaterThanOrEqualTo(100.0)); // 100 + some margin 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( await tester.pumpWidget(
new MaterialApp( new MaterialApp(
home: new ListView( home: new ListView(

View File

@ -16,8 +16,8 @@ void main() {
final RenderPositionedBox positioner = new RenderPositionedBox(child: sizer); final RenderPositionedBox positioner = new RenderPositionedBox(child: sizer);
layout(positioner, constraints: new BoxConstraints.loose(const Size(200.0, 200.0))); 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.width, equals(200.0), reason: 'positioner width');
expect(positioner.size.height, equals(200.0), reason: "positioner height"); expect(positioner.size.height, equals(200.0), reason: 'positioner height');
}); });
test('RenderPositionedBox shrink wraps', () { test('RenderPositionedBox shrink wraps', () {
@ -28,21 +28,21 @@ void main() {
final RenderPositionedBox positioner = new RenderPositionedBox(child: sizer, widthFactor: 1.0); final RenderPositionedBox positioner = new RenderPositionedBox(child: sizer, widthFactor: 1.0);
layout(positioner, constraints: new BoxConstraints.loose(const Size(200.0, 200.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.width, equals(100.0), reason: 'positioner width');
expect(positioner.size.height, equals(200.0), reason: "positioner height"); expect(positioner.size.height, equals(200.0), reason: 'positioner height');
positioner.widthFactor = null; positioner.widthFactor = null;
positioner.heightFactor = 1.0; positioner.heightFactor = 1.0;
pumpFrame(); pumpFrame();
expect(positioner.size.width, equals(200.0), reason: "positioner width"); expect(positioner.size.width, equals(200.0), reason: 'positioner width');
expect(positioner.size.height, equals(100.0), reason: "positioner height"); expect(positioner.size.height, equals(100.0), reason: 'positioner height');
positioner.widthFactor = 1.0; positioner.widthFactor = 1.0;
pumpFrame(); pumpFrame();
expect(positioner.size.width, equals(100.0), reason: "positioner width"); expect(positioner.size.width, equals(100.0), reason: 'positioner width');
expect(positioner.size.height, equals(100.0), reason: "positioner height"); expect(positioner.size.height, equals(100.0), reason: 'positioner height');
}); });
test('RenderPositionedBox width and height factors', () { test('RenderPositionedBox width and height factors', () {

View File

@ -208,7 +208,7 @@ void main() {
..addAction(SemanticsAction.showOnScreen, () { }) ..addAction(SemanticsAction.showOnScreen, () { })
..isChecked = false ..isChecked = false
..isSelected = true ..isSelected = true
..label = "Use all the properties" ..label = 'Use all the properties'
..textDirection = TextDirection.rtl; ..textDirection = TextDirection.rtl;
final SemanticsNode allProperties = new SemanticsNode() final SemanticsNode allProperties = new SemanticsNode()
..rect = new Rect.fromLTWH(50.0, 10.0, 20.0, 30.0) ..rect = new Rect.fromLTWH(50.0, 10.0, 20.0, 30.0)

View File

@ -13,11 +13,11 @@ class TestSchedulerBinding extends BindingBase with SchedulerBinding { }
void main() { void main() {
final SchedulerBinding scheduler = new TestSchedulerBinding(); 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)); expect(timeDilation, equals(1.0));
}); });
test("Can cancel queued callback", () { test('Can cancel queued callback', () {
int secondId; int secondId;
bool firstCallbackRan = false; bool firstCallbackRan = false;

View File

@ -96,7 +96,7 @@ class LogRecord {
/// ///
/// It is meant to be read by humans. There's no guarantee that this value is /// It is meant to be read by humans. There's no guarantee that this value is
/// stable enough to be parsed by machines. /// stable enough to be parsed by machines.
String get levelDescription => level.toString().split(".").last; String get levelDescription => level.toString().split('.').last;
@override @override
String toString() => '[${levelDescription.padRight(5)}] $loggerName: $message'; String toString() => '[${levelDescription.padRight(5)}] $loggerName: $message';

View File

@ -11,445 +11,445 @@
/// ///
/// This variable is used by [MaterialLocalizations]. /// This variable is used by [MaterialLocalizations].
const Map<String, Map<String, String>> localizations = const <String, Map<String, String>> { const Map<String, Map<String, String>> localizations = const <String, Map<String, String>> {
"ar": const <String, String>{ 'ar': const <String, String>{
"scriptCategory": r"tall", 'scriptCategory': r'tall',
"timeOfDayFormat": r"h:mm a", 'timeOfDayFormat': r'h:mm a',
"openAppDrawerTooltip": r"افتح قائمة التنقل", 'openAppDrawerTooltip': r'افتح قائمة التنقل',
"backButtonTooltip": r"الى الخلف", 'backButtonTooltip': r'الى الخلف',
"closeButtonTooltip": r"إغلا", 'closeButtonTooltip': r'إغلا',
"nextMonthTooltip": r"الشهر القادم", 'nextMonthTooltip': r'الشهر القادم',
"previousMonthTooltip": r"الشهر الماضى", 'previousMonthTooltip': r'الشهر الماضى',
"nextPageTooltip": r"الصفحة التالية", 'nextPageTooltip': r'الصفحة التالية',
"previousPageTooltip": r"الصفحة السابقة", 'previousPageTooltip': r'الصفحة السابقة',
"showMenuTooltip": r"قائمة العرض", 'showMenuTooltip': r'قائمة العرض',
"aboutListTileTitle": r"حول $applicationName", 'aboutListTileTitle': r'حول $applicationName',
"licensesPageTitle": r"التّراخيص", 'licensesPageTitle': r'التّراخيص',
"pageRowsInfoTitle": r"$firstRow$lastRow أو $rowCount", 'pageRowsInfoTitle': r'$firstRow$lastRow أو $rowCount',
"pageRowsInfoTitleApproximate": r"$firstRow$lastRow من حوالي $rowCount", 'pageRowsInfoTitleApproximate': r'$firstRow$lastRow من حوالي $rowCount',
"rowsPerPageTitle": r"الصفوف في الصفحة:", 'rowsPerPageTitle': r'الصفوف في الصفحة:',
"selectedRowCountTitleOther": r"$selectedRowCount العناصر المحددة", 'selectedRowCountTitleOther': r'$selectedRowCount العناصر المحددة',
"cancelButtonLabel": r"إلغاء", 'cancelButtonLabel': r'إلغاء',
"closeButtonLabel": r"أغلاق", 'closeButtonLabel': r'أغلاق',
"continueButtonLabel": r"استمر", 'continueButtonLabel': r'استمر',
"copyButtonLabel": r"نسخ", 'copyButtonLabel': r'نسخ',
"cutButtonLabel": r"كِم جارح", 'cutButtonLabel': r'كِم جارح',
"okButtonLabel": r"حسنا", 'okButtonLabel': r'حسنا',
"pasteButtonLabel": r"عجين", 'pasteButtonLabel': r'عجين',
"selectAllButtonLabel": r"اختر الكل", 'selectAllButtonLabel': r'اختر الكل',
"viewLicensesButtonLabel": r"عرض التراخيص", 'viewLicensesButtonLabel': r'عرض التراخيص',
"anteMeridiemAbbreviation": r"ص", 'anteMeridiemAbbreviation': r'ص',
"postMeridiemAbbreviation": r"م", 'postMeridiemAbbreviation': r'م',
}, },
"de": const <String, String>{ 'de': const <String, String>{
"scriptCategory": r"English-like", 'scriptCategory': r'English-like',
"timeOfDayFormat": r"HH:mm", 'timeOfDayFormat': r'HH:mm',
"openAppDrawerTooltip": r"Navigationsmenü öffnen", 'openAppDrawerTooltip': r'Navigationsmenü öffnen',
"backButtonTooltip": r"Zurück", 'backButtonTooltip': r'Zurück',
"closeButtonTooltip": r"Schließen", 'closeButtonTooltip': r'Schließen',
"nextMonthTooltip": r"Nächster Monat", 'nextMonthTooltip': r'Nächster Monat',
"previousMonthTooltip": r"Vorheriger Monat", 'previousMonthTooltip': r'Vorheriger Monat',
"nextPageTooltip": r"Nächste Seite", 'nextPageTooltip': r'Nächste Seite',
"previousPageTooltip": r"Vorherige Seite", 'previousPageTooltip': r'Vorherige Seite',
"showMenuTooltip": r"Menü anzeigen", 'showMenuTooltip': r'Menü anzeigen',
"aboutListTileTitle": r"Über $applicationName", 'aboutListTileTitle': r'Über $applicationName',
"licensesPageTitle": r"Lizenzen", 'licensesPageTitle': r'Lizenzen',
"pageRowsInfoTitle": r"$firstRow$lastRow von $rowCount", 'pageRowsInfoTitle': r'$firstRow$lastRow von $rowCount',
"pageRowsInfoTitleApproximate": r"$firstRow$lastRow von etwa $rowCount", 'pageRowsInfoTitleApproximate': r'$firstRow$lastRow von etwa $rowCount',
"rowsPerPageTitle": r"Zeilen pro Seite:", 'rowsPerPageTitle': r'Zeilen pro Seite:',
"selectedRowCountTitleZero": r"Keine Objekte ausgewählt", 'selectedRowCountTitleZero': r'Keine Objekte ausgewählt',
"selectedRowCountTitleOne": r"1 Objekt ausgewählt", 'selectedRowCountTitleOne': r'1 Objekt ausgewählt',
"selectedRowCountTitleOther": r"$selectedRowCount Objekte ausgewählt", 'selectedRowCountTitleOther': r'$selectedRowCount Objekte ausgewählt',
"cancelButtonLabel": r"ABBRECHEN", 'cancelButtonLabel': r'ABBRECHEN',
"closeButtonLabel": r"SCHLIESSEN", 'closeButtonLabel': r'SCHLIESSEN',
"continueButtonLabel": r"FORTSETZEN", 'continueButtonLabel': r'FORTSETZEN',
"copyButtonLabel": r"KOPIEREN", 'copyButtonLabel': r'KOPIEREN',
"cutButtonLabel": r"AUSSCHNEIDEN", 'cutButtonLabel': r'AUSSCHNEIDEN',
"okButtonLabel": r"OK", 'okButtonLabel': r'OK',
"pasteButtonLabel": r"EINFÜGEN", 'pasteButtonLabel': r'EINFÜGEN',
"selectAllButtonLabel": r"ALLES AUSWÄHLEN", 'selectAllButtonLabel': r'ALLES AUSWÄHLEN',
"viewLicensesButtonLabel": r"LIZENZEN ANZEIGEN", 'viewLicensesButtonLabel': r'LIZENZEN ANZEIGEN',
}, },
"en": const <String, String>{ 'en': const <String, String>{
"scriptCategory": r"English-like", 'scriptCategory': r'English-like',
"timeOfDayFormat": r"h:mm a", 'timeOfDayFormat': r'h:mm a',
"openAppDrawerTooltip": r"Open navigation menu", 'openAppDrawerTooltip': r'Open navigation menu',
"backButtonTooltip": r"Back", 'backButtonTooltip': r'Back',
"closeButtonTooltip": r"Close", 'closeButtonTooltip': r'Close',
"nextMonthTooltip": r"Next month", 'nextMonthTooltip': r'Next month',
"previousMonthTooltip": r"Previous month", 'previousMonthTooltip': r'Previous month',
"nextPageTooltip": r"Next page", 'nextPageTooltip': r'Next page',
"previousPageTooltip": r"Previous page", 'previousPageTooltip': r'Previous page',
"showMenuTooltip": r"Show menu", 'showMenuTooltip': r'Show menu',
"aboutListTileTitle": r"About $applicationName", 'aboutListTileTitle': r'About $applicationName',
"licensesPageTitle": r"Licenses", 'licensesPageTitle': r'Licenses',
"pageRowsInfoTitle": r"$firstRow$lastRow of $rowCount", 'pageRowsInfoTitle': r'$firstRow$lastRow of $rowCount',
"pageRowsInfoTitleApproximate": r"$firstRow$lastRow of about $rowCount", 'pageRowsInfoTitleApproximate': r'$firstRow$lastRow of about $rowCount',
"rowsPerPageTitle": r"Rows per page:", 'rowsPerPageTitle': r'Rows per page:',
"selectedRowCountTitleZero": r"No items selected", 'selectedRowCountTitleZero': r'No items selected',
"selectedRowCountTitleOne": r"1 item selected", 'selectedRowCountTitleOne': r'1 item selected',
"selectedRowCountTitleOther": r"$selectedRowCount items selected", 'selectedRowCountTitleOther': r'$selectedRowCount items selected',
"cancelButtonLabel": r"CANCEL", 'cancelButtonLabel': r'CANCEL',
"closeButtonLabel": r"CLOSE", 'closeButtonLabel': r'CLOSE',
"continueButtonLabel": r"CONTINUE", 'continueButtonLabel': r'CONTINUE',
"copyButtonLabel": r"COPY", 'copyButtonLabel': r'COPY',
"cutButtonLabel": r"CUT", 'cutButtonLabel': r'CUT',
"okButtonLabel": r"OK", 'okButtonLabel': r'OK',
"pasteButtonLabel": r"PASTE", 'pasteButtonLabel': r'PASTE',
"selectAllButtonLabel": r"SELECT ALL", 'selectAllButtonLabel': r'SELECT ALL',
"viewLicensesButtonLabel": r"VIEW LICENSES", 'viewLicensesButtonLabel': r'VIEW LICENSES',
"anteMeridiemAbbreviation": r"AM", 'anteMeridiemAbbreviation': r'AM',
"postMeridiemAbbreviation": r"PM", 'postMeridiemAbbreviation': r'PM',
}, },
"en_GB": const <String, String>{ 'en_GB': const <String, String>{
"timeOfDayFormat": r"HH:mm", 'timeOfDayFormat': r'HH:mm',
}, },
"en_IE": const <String, String>{ 'en_IE': const <String, String>{
"timeOfDayFormat": r"HH:mm", 'timeOfDayFormat': r'HH:mm',
}, },
"en_ZA": const <String, String>{ 'en_ZA': const <String, String>{
"timeOfDayFormat": r"HH:mm", 'timeOfDayFormat': r'HH:mm',
}, },
"es": const <String, String>{ 'es': const <String, String>{
"scriptCategory": r"English-like", 'scriptCategory': r'English-like',
"timeOfDayFormat": r"H:mm", 'timeOfDayFormat': r'H:mm',
"openAppDrawerTooltip": r"Abrir el menú de navegación", 'openAppDrawerTooltip': r'Abrir el menú de navegación',
"backButtonTooltip": r"Espalda", 'backButtonTooltip': r'Espalda',
"closeButtonTooltip": r"Cerrar", 'closeButtonTooltip': r'Cerrar',
"nextMonthTooltip": r"Próximo mes", 'nextMonthTooltip': r'Próximo mes',
"previousMonthTooltip": r"Mes anterior", 'previousMonthTooltip': r'Mes anterior',
"nextPageTooltip": r"Siguiente página", 'nextPageTooltip': r'Siguiente página',
"previousPageTooltip": r"Pagina anterior", 'previousPageTooltip': r'Pagina anterior',
"showMenuTooltip": r"Muestrame el menu", 'showMenuTooltip': r'Muestrame el menu',
"aboutListTileTitle": r"Desarrollado por $applicationName", 'aboutListTileTitle': r'Desarrollado por $applicationName',
"licensesPageTitle": r"Licencias", 'licensesPageTitle': r'Licencias',
"pageRowsInfoTitle": r"$firstRow$lastRow de $rowCount", 'pageRowsInfoTitle': r'$firstRow$lastRow de $rowCount',
"pageRowsInfoTitleApproximate": r"$firstRow$lastRow de aproximadamente $rowCount", 'pageRowsInfoTitleApproximate': r'$firstRow$lastRow de aproximadamente $rowCount',
"rowsPerPageTitle": r"Filas por página:", 'rowsPerPageTitle': r'Filas por página:',
"selectedRowCountTitleZero": r"No se han seleccionado elementos", 'selectedRowCountTitleZero': r'No se han seleccionado elementos',
"selectedRowCountTitleOne": r"1 artículo seleccionado", 'selectedRowCountTitleOne': r'1 artículo seleccionado',
"selectedRowCountTitleOther": r"$selectedRowCount artículos seleccionados", 'selectedRowCountTitleOther': r'$selectedRowCount artículos seleccionados',
"cancelButtonLabel": r"CANCELAR", 'cancelButtonLabel': r'CANCELAR',
"closeButtonLabel": r"CERRAR", 'closeButtonLabel': r'CERRAR',
"continueButtonLabel": r"CONTINUAR", 'continueButtonLabel': r'CONTINUAR',
"copyButtonLabel": r"COPIAR", 'copyButtonLabel': r'COPIAR',
"cutButtonLabel": r"CORTAR", 'cutButtonLabel': r'CORTAR',
"okButtonLabel": r"OK", 'okButtonLabel': r'OK',
"pasteButtonLabel": r"PEGAR", 'pasteButtonLabel': r'PEGAR',
"selectAllButtonLabel": r"SELECCIONAR TODO", 'selectAllButtonLabel': r'SELECCIONAR TODO',
"viewLicensesButtonLabel": r"VER LICENCIAS", 'viewLicensesButtonLabel': r'VER LICENCIAS',
}, },
"es_US": const <String, String>{ 'es_US': const <String, String>{
"timeOfDayFormat": r"h:mm a", 'timeOfDayFormat': r'h:mm a',
"anteMeridiemAbbreviation": r"AM", 'anteMeridiemAbbreviation': r'AM',
"postMeridiemAbbreviation": r"PM", 'postMeridiemAbbreviation': r'PM',
}, },
"fa": const <String, String>{ 'fa': const <String, String>{
"scriptCategory": r"tall", 'scriptCategory': r'tall',
"timeOfDayFormat": r"H:mm", 'timeOfDayFormat': r'H:mm',
"openAppDrawerTooltip": r"منوی ناوبری را باز کنید", 'openAppDrawerTooltip': r'منوی ناوبری را باز کنید',
"backButtonTooltip": r"بازگشت", 'backButtonTooltip': r'بازگشت',
"closeButtonTooltip": r"بستن", 'closeButtonTooltip': r'بستن',
"nextMonthTooltip": r"ماه بعد", 'nextMonthTooltip': r'ماه بعد',
"previousMonthTooltip": r"ماه گذشته", 'previousMonthTooltip': r'ماه گذشته',
"nextPageTooltip": r"صفحه بعد", 'nextPageTooltip': r'صفحه بعد',
"previousPageTooltip": r"صفحه قبلی", 'previousPageTooltip': r'صفحه قبلی',
"showMenuTooltip": r"نمایش منو", 'showMenuTooltip': r'نمایش منو',
"aboutListTileTitle": r"درباره $applicationName", 'aboutListTileTitle': r'درباره $applicationName',
"licensesPageTitle": r"مجوز", 'licensesPageTitle': r'مجوز',
"pageRowsInfoTitle": r"$firstRow$lastRow از $rowCount", 'pageRowsInfoTitle': r'$firstRow$lastRow از $rowCount',
"pageRowsInfoTitleApproximate": r"$firstRow$lastRow از حدود $rowCount", 'pageRowsInfoTitleApproximate': r'$firstRow$lastRow از حدود $rowCount',
"rowsPerPageTitle": r"ردیف در صفحه:", 'rowsPerPageTitle': r'ردیف در صفحه:',
"selectedRowCountTitleOther": r"$selectedRowCount آیتم های انتخاب شده", 'selectedRowCountTitleOther': r'$selectedRowCount آیتم های انتخاب شده',
"cancelButtonLabel": r"لغو", 'cancelButtonLabel': r'لغو',
"closeButtonLabel": r"بستن", 'closeButtonLabel': r'بستن',
"continueButtonLabel": r"ادامه دهید", 'continueButtonLabel': r'ادامه دهید',
"copyButtonLabel": r"کپی", 'copyButtonLabel': r'کپی',
"cutButtonLabel": r"برش", 'cutButtonLabel': r'برش',
"okButtonLabel": r"تایید", 'okButtonLabel': r'تایید',
"pasteButtonLabel": r"چسباندن", 'pasteButtonLabel': r'چسباندن',
"selectAllButtonLabel": r"انتخاب همه", 'selectAllButtonLabel': r'انتخاب همه',
"viewLicensesButtonLabel": r"مشاهده مجوز", 'viewLicensesButtonLabel': r'مشاهده مجوز',
}, },
"fr": const <String, String>{ 'fr': const <String, String>{
"scriptCategory": r"English-like", 'scriptCategory': r'English-like',
"timeOfDayFormat": r"HH:mm", 'timeOfDayFormat': r'HH:mm',
"openAppDrawerTooltip": r"Ouvrir le menu de navigation", 'openAppDrawerTooltip': r'Ouvrir le menu de navigation',
"backButtonTooltip": r"Retour", 'backButtonTooltip': r'Retour',
"closeButtonTooltip": r"Fermer", 'closeButtonTooltip': r'Fermer',
"nextMonthTooltip": r"Mois Suivant", 'nextMonthTooltip': r'Mois Suivant',
"previousMonthTooltip": r"Mois précédent", 'previousMonthTooltip': r'Mois précédent',
"nextPageTooltip": r"Page suivante", 'nextPageTooltip': r'Page suivante',
"previousPageTooltip": r"Page précédente", 'previousPageTooltip': r'Page précédente',
"showMenuTooltip": r"Afficher le menu", 'showMenuTooltip': r'Afficher le menu',
"aboutListTileTitle": r"À propos de $applicationName", 'aboutListTileTitle': r'À propos de $applicationName',
"licensesPageTitle": r"Licences", 'licensesPageTitle': r'Licences',
"pageRowsInfoTitle": r"$firstRow$lastRow de $rowCount", 'pageRowsInfoTitle': r'$firstRow$lastRow de $rowCount',
"pageRowsInfoTitleApproximate": r"$firstRow$lastRow d'environ $rowCount", 'pageRowsInfoTitleApproximate': r'$firstRow$lastRow d' "'" r'environ $rowCount',
"rowsPerPageTitle": r"Lignes par page:", 'rowsPerPageTitle': r'Lignes par page:',
"selectedRowCountTitleZero": r"Aucun élément sélectionné", 'selectedRowCountTitleZero': r'Aucun élément sélectionné',
"selectedRowCountTitleOne": r"1 élément sélectionné", 'selectedRowCountTitleOne': r'1 élément sélectionné',
"selectedRowCountTitleOther": r"$selectedRowCount éléments sélectionnés", 'selectedRowCountTitleOther': r'$selectedRowCount éléments sélectionnés',
"cancelButtonLabel": r"ANNULER", 'cancelButtonLabel': r'ANNULER',
"closeButtonLabel": r"FERMER", 'closeButtonLabel': r'FERMER',
"continueButtonLabel": r"CONTINUER", 'continueButtonLabel': r'CONTINUER',
"copyButtonLabel": r"COPIER", 'copyButtonLabel': r'COPIER',
"cutButtonLabel": r"COUPER", 'cutButtonLabel': r'COUPER',
"okButtonLabel": r"OK", 'okButtonLabel': r'OK',
"pasteButtonLabel": r"COLLER", 'pasteButtonLabel': r'COLLER',
"selectAllButtonLabel": r"TOUT SÉLECTIONNER", 'selectAllButtonLabel': r'TOUT SÉLECTIONNER',
"viewLicensesButtonLabel": r"AFFICHER LES LICENCES", 'viewLicensesButtonLabel': r'AFFICHER LES LICENCES',
}, },
"fr_CA": const <String, String>{ 'fr_CA': const <String, String>{
"timeOfDayFormat": r"HH 'h' mm", 'timeOfDayFormat': r'HH ' "'" r'h' "'" r' mm',
}, },
"he": const <String, String>{ 'he': const <String, String>{
"scriptCategory": r"English-like", 'scriptCategory': r'English-like',
"timeOfDayFormat": r"H:mm", 'timeOfDayFormat': r'H:mm',
"openAppDrawerTooltip": r"פתח תפריט ניווט", 'openAppDrawerTooltip': r'פתח תפריט ניווט',
"backButtonTooltip": r"אחורה", 'backButtonTooltip': r'אחורה',
"closeButtonTooltip": r"סגור", 'closeButtonTooltip': r'סגור',
"nextMonthTooltip": r"חודש הבא", 'nextMonthTooltip': r'חודש הבא',
"previousMonthTooltip": r"חודש קודם", 'previousMonthTooltip': r'חודש קודם',
"nextPageTooltip": r"עמוד הבא", 'nextPageTooltip': r'עמוד הבא',
"previousPageTooltip": r"עמוד קודם", 'previousPageTooltip': r'עמוד קודם',
"showMenuTooltip": r"הצג תפריט", 'showMenuTooltip': r'הצג תפריט',
"aboutListTileTitle": r"על $applicationName", 'aboutListTileTitle': r'על $applicationName',
"licensesPageTitle": r"רישיונות", 'licensesPageTitle': r'רישיונות',
"pageRowsInfoTitle": r"$firstRow$lastRow מתוך $rowCount", 'pageRowsInfoTitle': r'$firstRow$lastRow מתוך $rowCount',
"pageRowsInfoTitleApproximate": r"$firstRow$lastRow מתוך כ $rowCount", 'pageRowsInfoTitleApproximate': r'$firstRow$lastRow מתוך כ $rowCount',
"rowsPerPageTitle": r"שורות לעמוד:", 'rowsPerPageTitle': r'שורות לעמוד:',
"selectedRowCountTitleOther": r"$selectedRowCount פריטים שנבחרו", 'selectedRowCountTitleOther': r'$selectedRowCount פריטים שנבחרו',
"cancelButtonLabel": r"ביטול", 'cancelButtonLabel': r'ביטול',
"closeButtonLabel": r"סגור", 'closeButtonLabel': r'סגור',
"continueButtonLabel": r"המשך", 'continueButtonLabel': r'המשך',
"copyButtonLabel": r"העתק", 'copyButtonLabel': r'העתק',
"cutButtonLabel": r"גזור", 'cutButtonLabel': r'גזור',
"okButtonLabel": r"אישור", 'okButtonLabel': r'אישור',
"pasteButtonLabel": r"הדבק", 'pasteButtonLabel': r'הדבק',
"selectAllButtonLabel": r"בחר הכל", 'selectAllButtonLabel': r'בחר הכל',
"viewLicensesButtonLabel": r"הצג רישיונות", 'viewLicensesButtonLabel': r'הצג רישיונות',
}, },
"it": const <String, String>{ 'it': const <String, String>{
"scriptCategory": r"English-like", 'scriptCategory': r'English-like',
"timeOfDayFormat": r"HH:mm", 'timeOfDayFormat': r'HH:mm',
"openAppDrawerTooltip": r"Apri il menu di navigazione", 'openAppDrawerTooltip': r'Apri il menu di navigazione',
"backButtonTooltip": r"Indietro", 'backButtonTooltip': r'Indietro',
"closeButtonTooltip": r"Chiudi", 'closeButtonTooltip': r'Chiudi',
"nextMonthTooltip": r"Il prossimo mese", 'nextMonthTooltip': r'Il prossimo mese',
"previousMonthTooltip": r"Il mese scorso", 'previousMonthTooltip': r'Il mese scorso',
"nextPageTooltip": r"Pagina successiva", 'nextPageTooltip': r'Pagina successiva',
"previousPageTooltip": r"Pagina precedente", 'previousPageTooltip': r'Pagina precedente',
"showMenuTooltip": r"Mostra il menu", 'showMenuTooltip': r'Mostra il menu',
"aboutListTileTitle": r"A proposito di $applicationName", 'aboutListTileTitle': r'A proposito di $applicationName',
"licensesPageTitle": r"Licenze", 'licensesPageTitle': r'Licenze',
"pageRowsInfoTitle": r"$firstRow$lastRow di $rowCount", 'pageRowsInfoTitle': r'$firstRow$lastRow di $rowCount',
"pageRowsInfoTitleApproximate": r"$firstRow$lastRow di circa $rowCount", 'pageRowsInfoTitleApproximate': r'$firstRow$lastRow di circa $rowCount',
"rowsPerPageTitle": r"Righe per pagina:", 'rowsPerPageTitle': r'Righe per pagina:',
"selectedRowCountTitleOther": r"$selectedRowCount selezionati", 'selectedRowCountTitleOther': r'$selectedRowCount selezionati',
"cancelButtonLabel": r"ANNULLA", 'cancelButtonLabel': r'ANNULLA',
"closeButtonLabel": r"CHIUDI", 'closeButtonLabel': r'CHIUDI',
"continueButtonLabel": r"CONTINUA", 'continueButtonLabel': r'CONTINUA',
"copyButtonLabel": r"COPIA", 'copyButtonLabel': r'COPIA',
"cutButtonLabel": r"TAGLIA", 'cutButtonLabel': r'TAGLIA',
"okButtonLabel": r"OK", 'okButtonLabel': r'OK',
"pasteButtonLabel": r"INCOLLA", 'pasteButtonLabel': r'INCOLLA',
"selectAllButtonLabel": r"SELEZIONA TUTTO", 'selectAllButtonLabel': r'SELEZIONA TUTTO',
"viewLicensesButtonLabel": r"VEDI LE LICENZE", 'viewLicensesButtonLabel': r'VEDI LE LICENZE',
}, },
"ja": const <String, String>{ 'ja': const <String, String>{
"scriptCategory": r"dense", 'scriptCategory': r'dense',
"timeOfDayFormat": r"H:mm", 'timeOfDayFormat': r'H:mm',
"openAppDrawerTooltip": r"ナビゲーションメニューを開く", 'openAppDrawerTooltip': r'ナビゲーションメニューを開く',
"backButtonTooltip": r"戻る", 'backButtonTooltip': r'戻る',
"closeButtonTooltip": r"閉じる", 'closeButtonTooltip': r'閉じる',
"nextMonthTooltip": r"次の月へ", 'nextMonthTooltip': r'次の月へ',
"previousMonthTooltip": r"前の月へ", 'previousMonthTooltip': r'前の月へ',
"nextPageTooltip": r"次のページ", 'nextPageTooltip': r'次のページ',
"previousPageTooltip": r"前のページ", 'previousPageTooltip': r'前のページ',
"showMenuTooltip": r"メニューを表示", 'showMenuTooltip': r'メニューを表示',
"aboutListTileTitle": r"$applicationNameについて", 'aboutListTileTitle': r'$applicationNameについて',
"licensesPageTitle": r"ライセンス", 'licensesPageTitle': r'ライセンス',
"pageRowsInfoTitle": r"$rowCount行中の$firstRow$lastRow", 'pageRowsInfoTitle': r'$rowCount行中の$firstRow$lastRow',
"pageRowsInfoTitleApproximate": r"約$rowCount行中の$firstRow$lastRow", 'pageRowsInfoTitleApproximate': r'約$rowCount行中の$firstRow$lastRow',
"rowsPerPageTitle": r"1ページあたりの行数", 'rowsPerPageTitle': r'1ページあたりの行数',
"selectedRowCountTitleOther": r"$selectedRowCount個のアイテムが選択されています", 'selectedRowCountTitleOther': r'$selectedRowCount個のアイテムが選択されています',
"cancelButtonLabel": r"キャンセル", 'cancelButtonLabel': r'キャンセル',
"closeButtonLabel": r"閉じる", 'closeButtonLabel': r'閉じる',
"continueButtonLabel": r"次へ", 'continueButtonLabel': r'次へ',
"copyButtonLabel": r"コピー", 'copyButtonLabel': r'コピー',
"cutButtonLabel": r"カット", 'cutButtonLabel': r'カット',
"okButtonLabel": r"OK", 'okButtonLabel': r'OK',
"pasteButtonLabel": r"貼付け", 'pasteButtonLabel': r'貼付け',
"selectAllButtonLabel": r"全選択", 'selectAllButtonLabel': r'全選択',
"viewLicensesButtonLabel": r"ライセンス表記", 'viewLicensesButtonLabel': r'ライセンス表記',
}, },
"ps": const <String, String>{ 'ps': const <String, String>{
"scriptCategory": r"tall", 'scriptCategory': r'tall',
"timeOfDayFormat": r"HH:mm", 'timeOfDayFormat': r'HH:mm',
"openAppDrawerTooltip": r"د پرانیستی نیینګ مینو", 'openAppDrawerTooltip': r'د پرانیستی نیینګ مینو',
"backButtonTooltip": r"شاته", 'backButtonTooltip': r'شاته',
"closeButtonTooltip": r"بنده", 'closeButtonTooltip': r'بنده',
"nextMonthTooltip": r"بله میاشت", 'nextMonthTooltip': r'بله میاشت',
"previousMonthTooltip": r"تیره میاشت", 'previousMonthTooltip': r'تیره میاشت',
"nextPageTooltip": r"بله پاڼه", 'nextPageTooltip': r'بله پاڼه',
"previousPageTooltip": r"مخکینی مخ", 'previousPageTooltip': r'مخکینی مخ',
"showMenuTooltip": r"غورنۍ ښودل", 'showMenuTooltip': r'غورنۍ ښودل',
"aboutListTileTitle": r"د $applicationName په اړه", 'aboutListTileTitle': r'د $applicationName په اړه',
"licensesPageTitle": r"جوازونه", 'licensesPageTitle': r'جوازونه',
"pageRowsInfoTitle": r"$firstRow$lastRow د $rowCount", 'pageRowsInfoTitle': r'$firstRow$lastRow د $rowCount',
"pageRowsInfoTitleApproximate": r"$firstRow$lastRow څخه $rowCount د", 'pageRowsInfoTitleApproximate': r'$firstRow$lastRow څخه $rowCount د',
"rowsPerPageTitle": r"د هرې پاڼې پاڼې:", 'rowsPerPageTitle': r'د هرې پاڼې پاڼې:',
"selectedRowCountTitleOther": r"$selectedRowCount توکي غوره شوي", 'selectedRowCountTitleOther': r'$selectedRowCount توکي غوره شوي',
"cancelButtonLabel": r"لغوه کول", 'cancelButtonLabel': r'لغوه کول',
"closeButtonLabel": r"تړل", 'closeButtonLabel': r'تړل',
"continueButtonLabel": r"منځپانګې", 'continueButtonLabel': r'منځپانګې',
"copyButtonLabel": r"کاپی", 'copyButtonLabel': r'کاپی',
"cutButtonLabel": r"کم کړئ", 'cutButtonLabel': r'کم کړئ',
"okButtonLabel": r"سمه ده", 'okButtonLabel': r'سمه ده',
"pasteButtonLabel": r"پیټ کړئ", 'pasteButtonLabel': r'پیټ کړئ',
"selectAllButtonLabel": r"غوره کړئ", 'selectAllButtonLabel': r'غوره کړئ',
"viewLicensesButtonLabel": r"لیدلس وګورئ", 'viewLicensesButtonLabel': r'لیدلس وګورئ',
}, },
"pt": const <String, String>{ 'pt': const <String, String>{
"scriptCategory": r"English-like", 'scriptCategory': r'English-like',
"timeOfDayFormat": r"HH:mm", 'timeOfDayFormat': r'HH:mm',
"openAppDrawerTooltip": r"Abrir menu de navegação", 'openAppDrawerTooltip': r'Abrir menu de navegação',
"backButtonTooltip": r"Costas", 'backButtonTooltip': r'Costas',
"closeButtonTooltip": r"Fechar", 'closeButtonTooltip': r'Fechar',
"nextMonthTooltip": r"Próximo mês", 'nextMonthTooltip': r'Próximo mês',
"previousMonthTooltip": r"Mês anterior", 'previousMonthTooltip': r'Mês anterior',
"nextPageTooltip": r"Próxima página", 'nextPageTooltip': r'Próxima página',
"previousPageTooltip": r"Página anterior", 'previousPageTooltip': r'Página anterior',
"showMenuTooltip": r"Mostrar menu", 'showMenuTooltip': r'Mostrar menu',
"aboutListTileTitle": r"Sobre $applicationName", 'aboutListTileTitle': r'Sobre $applicationName',
"licensesPageTitle": r"Licenças", 'licensesPageTitle': r'Licenças',
"pageRowsInfoTitle": r"$firstRow$lastRow de $rowCount", 'pageRowsInfoTitle': r'$firstRow$lastRow de $rowCount',
"pageRowsInfoTitleApproximate": r"$firstRow$lastRow de cerca de $rowCount", 'pageRowsInfoTitleApproximate': r'$firstRow$lastRow de cerca de $rowCount',
"rowsPerPageTitle": r"Linhas por página:", 'rowsPerPageTitle': r'Linhas por página:',
"selectedRowCountTitleOther": r"$selectedRowCount selecionados", 'selectedRowCountTitleOther': r'$selectedRowCount selecionados',
"cancelButtonLabel": r"CANCELAR", 'cancelButtonLabel': r'CANCELAR',
"closeButtonLabel": r"FECHAR", 'closeButtonLabel': r'FECHAR',
"continueButtonLabel": r"CONTINUAR", 'continueButtonLabel': r'CONTINUAR',
"copyButtonLabel": r"CÓPIA DE", 'copyButtonLabel': r'CÓPIA DE',
"cutButtonLabel": r"CORTA", 'cutButtonLabel': r'CORTA',
"okButtonLabel": r"OK", 'okButtonLabel': r'OK',
"pasteButtonLabel": r"COLAR", 'pasteButtonLabel': r'COLAR',
"selectAllButtonLabel": r"SELECIONAR TUDO", 'selectAllButtonLabel': r'SELECIONAR TUDO',
"viewLicensesButtonLabel": r"VER LICENÇAS", 'viewLicensesButtonLabel': r'VER LICENÇAS',
}, },
"ru": const <String, String>{ 'ru': const <String, String>{
"scriptCategory": r"English-like", 'scriptCategory': r'English-like',
"timeOfDayFormat": r"H:mm", 'timeOfDayFormat': r'H:mm',
"openAppDrawerTooltip": r"Открыть меню навигации", 'openAppDrawerTooltip': r'Открыть меню навигации',
"backButtonTooltip": r"Назад", 'backButtonTooltip': r'Назад',
"closeButtonTooltip": r"Закрыть", 'closeButtonTooltip': r'Закрыть',
"nextMonthTooltip": r"Следующий месяц", 'nextMonthTooltip': r'Следующий месяц',
"previousMonthTooltip": r"Предыдущий месяц", 'previousMonthTooltip': r'Предыдущий месяц',
"nextPageTooltip": r"Следущая страница", 'nextPageTooltip': r'Следущая страница',
"previousPageTooltip": r"Предыдущая страница", 'previousPageTooltip': r'Предыдущая страница',
"showMenuTooltip": r"Показать меню", 'showMenuTooltip': r'Показать меню',
"pageRowsInfoTitle": r"$firstRow$lastRow из $rowCount", 'pageRowsInfoTitle': r'$firstRow$lastRow из $rowCount',
"pageRowsInfoTitleApproximate": r"$firstRow$lastRow из примерно $rowCount", 'pageRowsInfoTitleApproximate': r'$firstRow$lastRow из примерно $rowCount',
"rowsPerPageTitle": r"Строки на страницу:", 'rowsPerPageTitle': r'Строки на страницу:',
"aboutListTileTitle": r"O $applicationName", 'aboutListTileTitle': r'O $applicationName',
"licensesPageTitle": r"Лицензии", 'licensesPageTitle': r'Лицензии',
"selectedRowCountTitleZero": r"Строки не выбраны", 'selectedRowCountTitleZero': r'Строки не выбраны',
"selectedRowCountTitleOne": r"Выбрана 1 строка", 'selectedRowCountTitleOne': r'Выбрана 1 строка',
"selectedRowCountTitleOther": r"Выбрано $selectedRowCount строк", 'selectedRowCountTitleOther': r'Выбрано $selectedRowCount строк',
"cancelButtonLabel": r"ОТМЕНИТЬ", 'cancelButtonLabel': r'ОТМЕНИТЬ',
"closeButtonLabel": r"ЗАКРЫТЬ", 'closeButtonLabel': r'ЗАКРЫТЬ',
"continueButtonLabel": r"ПРОДОЛЖИТЬ", 'continueButtonLabel': r'ПРОДОЛЖИТЬ',
"copyButtonLabel": r"СКОПИРОВАТЬ", 'copyButtonLabel': r'СКОПИРОВАТЬ',
"cutButtonLabel": r"ВЫРЕЗАТЬ", 'cutButtonLabel': r'ВЫРЕЗАТЬ',
"okButtonLabel": r"ОК", 'okButtonLabel': r'ОК',
"pasteButtonLabel": r"ВСТАВИТЬ", 'pasteButtonLabel': r'ВСТАВИТЬ',
"selectAllButtonLabel": r"ВЫБРАТЬ ВСЁ", 'selectAllButtonLabel': r'ВЫБРАТЬ ВСЁ',
"viewLicensesButtonLabel": r"ПРОСМОТРЕТЬ ЛИЦЕНЗИИ", 'viewLicensesButtonLabel': r'ПРОСМОТРЕТЬ ЛИЦЕНЗИИ',
}, },
"sd": const <String, String>{ 'sd': const <String, String>{
"scriptCategory": r"tall", 'scriptCategory': r'tall',
"timeOfDayFormat": r"HH:mm", 'timeOfDayFormat': r'HH:mm',
"openAppDrawerTooltip": r"اوپن جي مينڊيٽ مينيو", 'openAppDrawerTooltip': r'اوپن جي مينڊيٽ مينيو',
"backButtonTooltip": r"پوئتي", 'backButtonTooltip': r'پوئتي',
"closeButtonTooltip": r"بند ڪريو", 'closeButtonTooltip': r'بند ڪريو',
"nextMonthTooltip": r"ايندڙ مهيني", 'nextMonthTooltip': r'ايندڙ مهيني',
"previousMonthTooltip": r"پويون مهينو", 'previousMonthTooltip': r'پويون مهينو',
"nextPageTooltip": r"اڳيون پيج", 'nextPageTooltip': r'اڳيون پيج',
"previousPageTooltip": r"پويون صفحو", 'previousPageTooltip': r'پويون صفحو',
"showMenuTooltip": r"ڏيکاريو", 'showMenuTooltip': r'ڏيکاريو',
"aboutListTileTitle": r"$applicationName بابت", 'aboutListTileTitle': r'$applicationName بابت',
"licensesPageTitle": r"لائسنس", 'licensesPageTitle': r'لائسنس',
"pageRowsInfoTitle": r"$firstRow$lastRow جي $rowCount", 'pageRowsInfoTitle': r'$firstRow$lastRow جي $rowCount',
"pageRowsInfoTitleApproximate": r"$firstRow$lastRow کان $rowCount تقريبن", 'pageRowsInfoTitleApproximate': r'$firstRow$lastRow کان $rowCount تقريبن',
"rowsPerPageTitle": r"رني پاسي وارو صفحو", 'rowsPerPageTitle': r'رني پاسي وارو صفحو',
"selectedRowCountTitleOther": r"$selectedRowCount شيون چونڊيل", 'selectedRowCountTitleOther': r'$selectedRowCount شيون چونڊيل',
"cancelButtonLabel": r"منسوخ ڪيو", 'cancelButtonLabel': r'منسوخ ڪيو',
"closeButtonLabel": r"بند ڪريو", 'closeButtonLabel': r'بند ڪريو',
"continueButtonLabel": r"جاري رکو", 'continueButtonLabel': r'جاري رکو',
"copyButtonLabel": r"ڪاپي", 'copyButtonLabel': r'ڪاپي',
"cutButtonLabel": r"پٽي", 'cutButtonLabel': r'پٽي',
"okButtonLabel": r"ٺيڪ آهي", 'okButtonLabel': r'ٺيڪ آهي',
"pasteButtonLabel": r"پيسٽ ڪريو", 'pasteButtonLabel': r'پيسٽ ڪريو',
"selectAllButtonLabel": r"سڀ چونڊيو", 'selectAllButtonLabel': r'سڀ چونڊيو',
"viewLicensesButtonLabel": r"لائسنس ڏسو", 'viewLicensesButtonLabel': r'لائسنس ڏسو',
}, },
"ur": const <String, String>{ 'ur': const <String, String>{
"scriptCategory": r"tall", 'scriptCategory': r'tall',
"timeOfDayFormat": r"h:mm a", 'timeOfDayFormat': r'h:mm a',
"openAppDrawerTooltip": r"کھولیں نیویگیشن مینو", 'openAppDrawerTooltip': r'کھولیں نیویگیشن مینو',
"backButtonTooltip": r"واپس", 'backButtonTooltip': r'واپس',
"closeButtonTooltip": r"بند کریں", 'closeButtonTooltip': r'بند کریں',
"nextMonthTooltip": r"اگلا مھینہ", 'nextMonthTooltip': r'اگلا مھینہ',
"previousMonthTooltip": r"پچھلا مھینہ", 'previousMonthTooltip': r'پچھلا مھینہ',
"nextPageTooltip": r"اگلا صفحہ", 'nextPageTooltip': r'اگلا صفحہ',
"previousPageTooltip": r"سابقہ ​​صفحہ", 'previousPageTooltip': r'سابقہ ​​صفحہ',
"showMenuTooltip": r"مینو دکھائیں", 'showMenuTooltip': r'مینو دکھائیں',
"aboutListTileTitle": r"کے بارے میں $applicationName", 'aboutListTileTitle': r'کے بارے میں $applicationName',
"licensesPageTitle": r"لائسنس", 'licensesPageTitle': r'لائسنس',
"pageRowsInfoTitle": r"$firstRow$lastRow کے $rowCount", 'pageRowsInfoTitle': r'$firstRow$lastRow کے $rowCount',
"pageRowsInfoTitleApproximate": r"$firstRow$lastRow میں سے $rowCount تقریبا", 'pageRowsInfoTitleApproximate': r'$firstRow$lastRow میں سے $rowCount تقریبا',
"rowsPerPageTitle": r"رویوں فی صفحہ:", 'rowsPerPageTitle': r'رویوں فی صفحہ:',
"selectedRowCountTitleOther": r"$selectedRowCount منتخب کردہ اشیاء", 'selectedRowCountTitleOther': r'$selectedRowCount منتخب کردہ اشیاء',
"cancelButtonLabel": r"منسوخ کریں", 'cancelButtonLabel': r'منسوخ کریں',
"closeButtonLabel": r"بند کریں", 'closeButtonLabel': r'بند کریں',
"continueButtonLabel": r"جاری رکھیں", 'continueButtonLabel': r'جاری رکھیں',
"copyButtonLabel": r"کاپی", 'copyButtonLabel': r'کاپی',
"cutButtonLabel": r"کاٹیں", 'cutButtonLabel': r'کاٹیں',
"okButtonLabel": r"ٹھیک ہے", 'okButtonLabel': r'ٹھیک ہے',
"pasteButtonLabel": r"چسپاں", 'pasteButtonLabel': r'چسپاں',
"selectAllButtonLabel": r"تکاپیمام منتخب کریں", 'selectAllButtonLabel': r'تکاپیمام منتخب کریں',
"viewLicensesButtonLabel": r"لائسنس دیکھیں", 'viewLicensesButtonLabel': r'لائسنس دیکھیں',
"anteMeridiemAbbreviation": r"AM", 'anteMeridiemAbbreviation': r'AM',
"postMeridiemAbbreviation": r"PM", 'postMeridiemAbbreviation': r'PM',
}, },
"zh": const <String, String>{ 'zh': const <String, String>{
"scriptCategory": r"dense", 'scriptCategory': r'dense',
"timeOfDayFormat": r"ah:mm", 'timeOfDayFormat': r'ah:mm',
"openAppDrawerTooltip": r"打开导航菜单", 'openAppDrawerTooltip': r'打开导航菜单',
"backButtonTooltip": r"返回", 'backButtonTooltip': r'返回',
"closeButtonTooltip": r"关", 'closeButtonTooltip': r'关',
"nextMonthTooltip": r"-下月就29了。", 'nextMonthTooltip': r'-下月就29了。',
"previousMonthTooltip": r"前一个月", 'previousMonthTooltip': r'前一个月',
"nextPageTooltip": r"下一页", 'nextPageTooltip': r'下一页',
"previousPageTooltip": r"上一页", 'previousPageTooltip': r'上一页',
"showMenuTooltip": r"显示菜单", 'showMenuTooltip': r'显示菜单',
"aboutListTileTitle": r"关于$applicationName", 'aboutListTileTitle': r'关于$applicationName',
"licensesPageTitle": r"许可证", 'licensesPageTitle': r'许可证',
"pageRowsInfoTitle": r"$rowCount中的$firstRow-$lastRow", 'pageRowsInfoTitle': r'$rowCount中的$firstRow-$lastRow',
"pageRowsInfoTitleApproximate": r"约$rowCount中的$firstRow-$lastRow", 'pageRowsInfoTitleApproximate': r'约$rowCount中的$firstRow-$lastRow',
"rowsPerPageTitle": r"每页行数:", 'rowsPerPageTitle': r'每页行数:',
"selectedRowCountTitleOther": r"$selectedRowCount行所选", 'selectedRowCountTitleOther': r'$selectedRowCount行所选',
"cancelButtonLabel": r"取消", 'cancelButtonLabel': r'取消',
"continueButtonLabel": r"继续", 'continueButtonLabel': r'继续',
"closeButtonLabel": r"关闭", 'closeButtonLabel': r'关闭',
"copyButtonLabel": r"复制", 'copyButtonLabel': r'复制',
"cutButtonLabel": r"剪切", 'cutButtonLabel': r'剪切',
"okButtonLabel": r"确定", 'okButtonLabel': r'确定',
"pasteButtonLabel": r"粘贴", 'pasteButtonLabel': r'粘贴',
"selectAllButtonLabel": r"全选", 'selectAllButtonLabel': r'全选',
"viewLicensesButtonLabel": r"查看许可证", 'viewLicensesButtonLabel': r'查看许可证',
"anteMeridiemAbbreviation": r"上午", 'anteMeridiemAbbreviation': r'上午',
"postMeridiemAbbreviation": r"下午", 'postMeridiemAbbreviation': r'下午',
}, },
}; };

View File

@ -348,7 +348,7 @@ class GlobalMaterialLocalizations implements MaterialLocalizations {
/// Looks up text geometry defined in [MaterialTextGeometry]. /// Looks up text geometry defined in [MaterialTextGeometry].
@override @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 /// Creates an object that provides localized resource values for the
/// for the widgets of the material library. /// for the widgets of the material library.

View File

@ -142,7 +142,7 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
createHttpClient = () { createHttpClient = () {
return new http.MockClient((http.BaseRequest request) { return new http.MockClient((http.BaseRequest request) {
return new Future<http.Response>.value( return new Future<http.Response>.value(
new http.Response("Mocked: Unavailable.", 404, request: request) new http.Response('Mocked: Unavailable.', 404, request: request)
); );
}); });
}; };

View File

@ -26,7 +26,7 @@ class _MockToStringDeep {
/// line break. /// line break.
List<String> _lines; List<String> _lines;
String toStringDeep({ String prefixLineOne: "", String prefixOtherLines: "" }) { String toStringDeep({ String prefixLineOne: '', String prefixOtherLines: '' }) {
final StringBuffer sb = new StringBuffer(); final StringBuffer sb = new StringBuffer();
if (_lines.isNotEmpty) if (_lines.isNotEmpty)
sb.write('$prefixLineOne${_lines.first}'); sb.write('$prefixLineOne${_lines.first}');

View File

@ -26,9 +26,9 @@ import '../lib/src/usage.dart';
// Note: this was largely inspired by lib/src/commands/test.dart. // Note: this was largely inspired by lib/src/commands/test.dart.
const String _kOptionPackages = "packages"; const String _kOptionPackages = 'packages';
const String _kOptionShell = "shell"; const String _kOptionShell = 'shell';
const String _kOptionTestDirectory = "test-directory"; const String _kOptionTestDirectory = 'test-directory';
const List<String> _kRequiredOptions = const <String>[ const List<String> _kRequiredOptions = const <String>[
_kOptionPackages, _kOptionPackages,
_kOptionShell, _kOptionShell,

View File

@ -175,7 +175,7 @@ Future<int> _handleToolError(
writelnStderr(); writelnStderr();
writelnStderr( writelnStderr(
"Run 'flutter -h' (or 'flutter <command> -h') for available " "Run 'flutter -h' (or 'flutter <command> -h') for available "
"flutter commands and options." 'flutter commands and options.'
); );
// Argument error exit code. // Argument error exit code.
return _exit(64); return _exit(64);

View File

@ -772,7 +772,7 @@ class _AndroidDevicePortForwarder extends DevicePortForwarder {
final List<String> lines = LineSplitter.split(stdout).toList(); final List<String> lines = LineSplitter.split(stdout).toList();
for (String line in lines) { for (String line in lines) {
if (line.startsWith(device.id)) { if (line.startsWith(device.id)) {
final List<String> splitLine = line.split("tcp:"); final List<String> splitLine = line.split('tcp:');
// Sanity check splitLine. // Sanity check splitLine.
if (splitLine.length != 3) if (splitLine.length != 3)

View File

@ -43,7 +43,7 @@ FlutterPluginVersion get flutterPluginVersion {
final File plugin = fs.file('android/buildSrc/src/main/groovy/FlutterPlugin.groovy'); final File plugin = fs.file('android/buildSrc/src/main/groovy/FlutterPlugin.groovy');
if (plugin.existsSync()) { if (plugin.existsSync()) {
final String packageLine = plugin.readAsLinesSync().skip(4).first; 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.v2;
} }
return FlutterPluginVersion.v1; return FlutterPluginVersion.v1;
@ -51,7 +51,7 @@ FlutterPluginVersion get flutterPluginVersion {
final File appGradle = fs.file('android/app/build.gradle'); final File appGradle = fs.file('android/app/build.gradle');
if (appGradle.existsSync()) { if (appGradle.existsSync()) {
for (String line in appGradle.readAsLinesSync()) { 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; return FlutterPluginVersion.managed;
} }
} }

View File

@ -116,7 +116,7 @@ class AndroidApk extends ApplicationPackage {
if (category.getAttribute('android:name') == 'android.intent.category.LAUNCHER') { if (category.getAttribute('android:name') == 'android.intent.category.LAUNCHER') {
final xml.XmlElement activity = category.parent.parent; final xml.XmlElement activity = category.parent.parent;
final String activityName = activity.getAttribute('android:name'); final String activityName = activity.getAttribute('android:name');
launchActivity = "$packageId/$activityName"; launchActivity = '$packageId/$activityName';
break; break;
} }
} }

View File

@ -40,5 +40,5 @@ class ToolExit implements Exception {
final int exitCode; final int exitCode;
@override @override
String toString() => "Exception: $message"; String toString() => 'Exception: $message';
} }

View File

@ -118,13 +118,13 @@ class _PosixUtils extends OperatingSystemUtils {
if (_name == null) { if (_name == null) {
if (platform.isMacOS) { if (platform.isMacOS) {
final List<ProcessResult> results = <ProcessResult>[ final List<ProcessResult> results = <ProcessResult>[
processManager.runSync(<String>["sw_vers", "-productName"]), processManager.runSync(<String>['sw_vers', '-productName']),
processManager.runSync(<String>["sw_vers", "-productVersion"]), processManager.runSync(<String>['sw_vers', '-productVersion']),
processManager.runSync(<String>["sw_vers", "-buildVersion"]), processManager.runSync(<String>['sw_vers', '-buildVersion']),
]; ];
if (results.every((ProcessResult result) => result.exitCode == 0)) { if (results.every((ProcessResult result) => result.exitCode == 0)) {
_name = "${results[0].stdout.trim()} ${results[1].stdout _name = '${results[0].stdout.trim()} ${results[1].stdout
.trim()} ${results[2].stdout.trim()}"; .trim()} ${results[2].stdout.trim()}';
} }
} }
_name ??= super.name; _name ??= super.name;

View File

@ -298,7 +298,7 @@ void _traceCommand(List<String> args, { String workingDirectory }) {
if (workingDirectory == null) if (workingDirectory == null)
printTrace(argsText); printTrace(argsText);
else else
printTrace("[$workingDirectory${fs.path.separator}] $argsText"); printTrace('[$workingDirectory${fs.path.separator}] $argsText');
} }
String _runWithLoggingSync(List<String> cmd, { String _runWithLoggingSync(List<String> cmd, {

View File

@ -239,10 +239,10 @@ Future<String> _buildAotSnapshot(
]; ];
if ((extraFrontEndOptions != null) && extraFrontEndOptions.isNotEmpty) if ((extraFrontEndOptions != null) && extraFrontEndOptions.isNotEmpty)
printTrace("Extra front-end options: $extraFrontEndOptions"); printTrace('Extra front-end options: $extraFrontEndOptions');
if ((extraGenSnapshotOptions != null) && extraGenSnapshotOptions.isNotEmpty) { if ((extraGenSnapshotOptions != null) && extraGenSnapshotOptions.isNotEmpty) {
printTrace("Extra gen-snapshot options: $extraGenSnapshotOptions"); printTrace('Extra gen-snapshot options: $extraGenSnapshotOptions');
genSnapshotCmd.addAll(extraGenSnapshotOptions); genSnapshotCmd.addAll(extraGenSnapshotOptions);
} }

View File

@ -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.'; 'If run on a project that already exists, this will repair the project, recreating any files that are missing.';
@override @override
String get invocation => "${runner.executableName} $name <output directory>"; String get invocation => '${runner.executableName} $name <output directory>';
@override @override
Future<Null> runCommand() async { Future<Null> runCommand() async {
@ -249,17 +249,17 @@ To edit platform code in an IDE see https://flutter.io/platform-plugins/#edit-co
} }
} else { } else {
printStatus("You'll need to install additional components before you can run " printStatus("You'll need to install additional components before you can run "
"your Flutter app:"); 'your Flutter app:');
printStatus(''); printStatus('');
// Give the user more detailed analysis. // Give the user more detailed analysis.
await doctor.diagnose(); await doctor.diagnose();
printStatus(''); printStatus('');
printStatus("After installing components, run 'flutter doctor' in order to " 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' " printStatus("When complete, type 'flutter run' from the '$relativeAppPath' "
"directory in order to launch your app."); 'directory in order to launch your app.');
printStatus("Your main program file is: $relativeAppPath/lib/main.dart"); 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', 'dartSdk': '$flutterRoot/bin/cache/dart-sdk',
'androidMinApiLevel': android.minApiLevel, 'androidMinApiLevel': android.minApiLevel,
'androidSdkVersion': android_sdk.minimumAndroidSdkVersion, '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, 'withDriverTest': renderDriverTest,
'pluginClass': pluginClass, 'pluginClass': pluginClass,
'pluginDartClass': pluginDartClass, 'pluginDartClass': pluginDartClass,
@ -333,7 +333,7 @@ String _createPluginClassName(String name) {
String _createUTIIdentifier(String organization, String name) { String _createUTIIdentifier(String organization, String name) {
// Create a UTI (https://en.wikipedia.org/wiki/Uniform_Type_Identifier) from a base 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 = camelCase(name).replaceAll(disallowed, '');
name = name.isEmpty ? 'untitled' : name; name = name.isEmpty ? 'untitled' : name;
return '$organization.$name'; return '$organization.$name';
@ -367,7 +367,7 @@ String _validateProjectName(String projectName) {
if (_packageDependencies.contains(projectName)) { if (_packageDependencies.contains(projectName)) {
return "Invalid project name: '$projectName' - this will conflict with Flutter " return "Invalid project name: '$projectName' - this will conflict with Flutter "
"package dependencies."; 'package dependencies.';
} }
return null; return null;
} }
@ -376,7 +376,7 @@ String _validateProjectName(String projectName) {
/// if we should disallow the directory name. /// if we should disallow the directory name.
String _validateProjectDir(String dirPath, { String flutterRoot }) { String _validateProjectDir(String dirPath, { String flutterRoot }) {
if (fs.path.isWithin(flutterRoot, dirPath)) { 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'."; "Target directory '$dirPath' is within the Flutter SDK at '$flutterRoot'.";
} }

View File

@ -197,28 +197,28 @@ abstract class Domain {
String _getStringArg(Map<String, dynamic> args, String name, { bool required: false }) { String _getStringArg(Map<String, dynamic> args, String name, { bool required: false }) {
if (required && !args.containsKey(name)) if (required && !args.containsKey(name))
throw "$name is required"; throw '$name is required';
final dynamic val = args[name]; final dynamic val = args[name];
if (val != null && val is! String) if (val != null && val is! String)
throw "$name is not a String"; throw '$name is not a String';
return val; return val;
} }
bool _getBoolArg(Map<String, dynamic> args, String name, { bool required: false }) { bool _getBoolArg(Map<String, dynamic> args, String name, { bool required: false }) {
if (required && !args.containsKey(name)) if (required && !args.containsKey(name))
throw "$name is required"; throw '$name is required';
final dynamic val = args[name]; final dynamic val = args[name];
if (val != null && val is! bool) if (val != null && val is! bool)
throw "$name is not a bool"; throw '$name is not a bool';
return val; return val;
} }
int _getIntArg(Map<String, dynamic> args, String name, { bool required: false }) { int _getIntArg(Map<String, dynamic> args, String name, { bool required: false }) {
if (required && !args.containsKey(name)) if (required && !args.containsKey(name))
throw "$name is required"; throw '$name is required';
final dynamic val = args[name]; final dynamic val = args[name];
if (val != null && val is! int) if (val != null && val is! int)
throw "$name is not an int"; throw '$name is not an int';
return val; return val;
} }

View File

@ -23,7 +23,7 @@ class DevicesCommand extends FlutterCommand {
if (!doctor.canListAnything) { if (!doctor.canListAnything) {
throwToolExit( throwToolExit(
"Unable to locate a development device; please run 'flutter doctor' for " "Unable to locate a development device; please run 'flutter doctor' for "
"information about installing additional components.", 'information about installing additional components.',
exitCode: 1); exitCode: 1);
} }

View File

@ -21,7 +21,7 @@ class FormatCommand extends FlutterCommand {
final String description = 'Format one or more dart files.'; final String description = 'Format one or more dart files.';
@override @override
String get invocation => "${runner.executableName} $name <one or more paths>"; String get invocation => '${runner.executableName} $name <one or more paths>';
@override @override
Future<Null> runCommand() async { Future<Null> runCommand() async {

View File

@ -256,9 +256,9 @@ class FuchsiaReloadCommand extends FlutterCommand {
// The Observatory requires somewhat non-standard URIs that the Uri class // The Observatory requires somewhat non-standard URIs that the Uri class
// can't build for us, so instead we build them by hand. // can't build for us, so instead we build them by hand.
final String isolateIdQuery = "?isolateId=isolates%2F$number"; final String isolateIdQuery = '?isolateId=isolates%2F$number';
final String isolateAddr = "$vmServiceAddr/#/inspect$isolateIdQuery"; final String isolateAddr = '$vmServiceAddr/#/inspect$isolateIdQuery';
final String debuggerAddr = "$vmServiceAddr/#/debugger$isolateIdQuery"; final String debuggerAddr = '$vmServiceAddr/#/debugger$isolateIdQuery';
final String newUsed = getSizeAsMB(isolate.newSpace.used); final String newUsed = getSizeAsMB(isolate.newSpace.used);
final String newCap = getSizeAsMB(isolate.newSpace.capacity); final String newCap = getSizeAsMB(isolate.newSpace.capacity);
@ -452,7 +452,7 @@ class _PortForwarder {
final ProcessResult result = await processManager.run(command); final ProcessResult result = await processManager.run(command);
printTrace(command.join(' ')); printTrace(command.join(' '));
if (result.exitCode != 0) { 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(' ')); printTrace(args.join(' '));
final ProcessResult result = await processManager.run(args); final ProcessResult result = await processManager.run(args);
if (result.exitCode != 0) { 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; return null;
} }
printTrace(result.stdout); printTrace(result.stdout);

View File

@ -498,10 +498,10 @@ class DevFS {
try { try {
await _httpWriter.write(dirtyEntries); await _httpWriter.write(dirtyEntries);
} on SocketException catch (socketException, stackTrace) { } 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); throw new DevFSException('Lost connection to device.', socketException, stackTrace);
} catch (exception, 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); throw new DevFSException('Sync failed', exception, stackTrace);
} }
} else { } else {

View File

@ -191,7 +191,7 @@ abstract class Device {
// String meant to be displayed to the user indicating if the device is // String meant to be displayed to the user indicating if the device is
// supported by Flutter, and, if not, why. // supported by Flutter, and, if not, why.
String supportMessage() => isSupported() ? "Supported" : "Unsupported"; String supportMessage() => isSupported() ? 'Supported' : 'Unsupported';
/// The device's platform. /// The device's platform.
Future<TargetPlatform> get targetPlatform; Future<TargetPlatform> get targetPlatform;

View File

@ -286,7 +286,7 @@ Future<XcodeBuildResult> buildXcodeProject({
commands.addAll(<String>[ commands.addAll(<String>[
'-workspace', fs.path.basename(entity.path), '-workspace', fs.path.basename(entity.path),
'-scheme', scheme, '-scheme', scheme,
"BUILD_DIR=${fs.path.absolute(getIosBuildDirectory())}", 'BUILD_DIR=${fs.path.absolute(getIosBuildDirectory())}',
]); ]);
break; break;
} }
@ -447,20 +447,20 @@ bool _checkXcodeVersion() {
Future<Null> _addServicesToBundle(Directory bundle) async { Future<Null> _addServicesToBundle(Directory bundle) async {
final List<Map<String, String>> services = <Map<String, String>>[]; final List<Map<String, String>> services = <Map<String, String>>[];
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 // Step 1: Parse the service configuration yaml files present in the service
// pub packages. // pub packages.
await parseServiceConfigs(services); 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. // 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); await _copyServiceFrameworks(services, frameworksDirectory);
// Step 3: Copy the service definitions manifest at the correct spot for // Step 3: Copy the service definitions manifest at the correct spot for
// xcodebuild to pick up. // 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); _copyServiceDefinitionsManifest(services, manifestFile);
} }
@ -470,7 +470,7 @@ Future<Null> _copyServiceFrameworks(List<Map<String, String>> services, Director
for (Map<String, String> service in services) { for (Map<String, String> service in services) {
final String dylibPath = await getServiceFromUrl(service['ios-framework'], service['root'], service['name']); final String dylibPath = await getServiceFromUrl(service['ios-framework'], service['root'], service['name']);
final File dylib = fs.file(dylibPath); final File dylib = fs.file(dylibPath);
printTrace("Copying ${dylib.path} into bundle."); printTrace('Copying ${dylib.path} into bundle.');
if (!dylib.existsSync()) { if (!dylib.existsSync()) {
printError("The service dylib '${dylib.path}' does not exist."); printError("The service dylib '${dylib.path}' does not exist.");
continue; continue;

View File

@ -5,8 +5,8 @@
import '../base/file_system.dart'; import '../base/file_system.dart';
import '../base/process.dart'; import '../base/process.dart';
const String kCFBundleIdentifierKey = "CFBundleIdentifier"; const String kCFBundleIdentifierKey = 'CFBundleIdentifier';
const String kCFBundleShortVersionStringKey = "CFBundleShortVersionString"; const String kCFBundleShortVersionStringKey = 'CFBundleShortVersionString';
String getValueFromFile(String plistFilePath, String key) { String getValueFromFile(String plistFilePath, String key) {
// TODO(chinmaygarde): For now, we only need to read from plist files on a mac // TODO(chinmaygarde): For now, we only need to read from plist files on a mac

View File

@ -433,7 +433,7 @@ class HotRunner extends ResidentRunner {
timer.stop(); timer.stop();
status.cancel(); status.cancel();
if (result.isOk) if (result.isOk)
printStatus("${result.message} in ${getElapsedAsMilliseconds(timer.elapsed)}."); printStatus('${result.message} in ${getElapsedAsMilliseconds(timer.elapsed)}.');
if (result.hint != null) if (result.hint != null)
printStatus(result.hint); printStatus(result.hint);
return result; return result;
@ -530,7 +530,7 @@ class HotRunner extends ResidentRunner {
reloadMessage = 'Reloaded $loadedLibraryCount of $finalLibraryCount libraries'; reloadMessage = 'Reloaded $loadedLibraryCount of $finalLibraryCount libraries';
} }
} catch (error, st) { } catch (error, st) {
printError("Hot reload failed: $error\n$st"); printError('Hot reload failed: $error\n$st');
final int errorCode = error['code']; final int errorCode = error['code'];
final String errorMessage = error['message']; final String errorMessage = error['message'];
if (errorCode == Isolate.kIsolateReloadBarred) { if (errorCode == Isolate.kIsolateReloadBarred) {
@ -587,8 +587,8 @@ class HotRunner extends ResidentRunner {
await view.uiIsolate.flutterReassemble(); await view.uiIsolate.flutterReassemble();
} on TimeoutException { } on TimeoutException {
reassembleTimedOut = true; reassembleTimedOut = true;
printTrace("Reassembling ${view.uiIsolate.name} took too long."); printTrace('Reassembling ${view.uiIsolate.name} took too long.');
printStatus("Hot reloading ${view.uiIsolate.name} took too long; the reload may have failed."); printStatus('Hot reloading ${view.uiIsolate.name} took too long; the reload may have failed.');
continue; continue;
} catch (error) { } catch (error) {
reassembleAndScheduleErrors = true; reassembleAndScheduleErrors = true;

View File

@ -265,18 +265,18 @@ abstract class FlutterCommand extends Command<Null> {
Future<List<Device>> findAllTargetDevices() async { Future<List<Device>> findAllTargetDevices() async {
if (!doctor.canLaunchAnything) { if (!doctor.canLaunchAnything) {
printError("Unable to locate a development device; please run 'flutter doctor' " 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; return null;
} }
List<Device> devices = await deviceManager.getDevices().toList(); List<Device> devices = await deviceManager.getDevices().toList();
if (devices.isEmpty && deviceManager.hasSpecifiedDeviceId) { if (devices.isEmpty && deviceManager.hasSpecifiedDeviceId) {
printStatus("No devices found with name or id " printStatus('No devices found with name or id '
"matching '${deviceManager.specifiedDeviceId}'"); "matching '${deviceManager.specifiedDeviceId}'");
return null; return null;
} else if (devices.isEmpty && deviceManager.hasSpecifiedAllDevices) { } else if (devices.isEmpty && deviceManager.hasSpecifiedAllDevices) {
printStatus("No devices found"); printStatus('No devices found');
return null; return null;
} else if (devices.isEmpty) { } else if (devices.isEmpty) {
printNoConnectedDevices(); printNoConnectedDevices();
@ -290,10 +290,10 @@ abstract class FlutterCommand extends Command<Null> {
return null; return null;
} else if (devices.length > 1 && !deviceManager.hasSpecifiedAllDevices) { } else if (devices.length > 1 && !deviceManager.hasSpecifiedAllDevices) {
if (deviceManager.hasSpecifiedDeviceId) { 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}':"); "'${deviceManager.specifiedDeviceId}':");
} else { } 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 <deviceId>' flag, or use '-d all' to act on all devices."); "the '-d <deviceId>' flag, or use '-d all' to act on all devices.");
devices = await deviceManager.getAllConnectedDevices().toList(); devices = await deviceManager.getAllConnectedDevices().toList();
} }
@ -313,7 +313,7 @@ abstract class FlutterCommand extends Command<Null> {
if (deviceList == null) if (deviceList == null)
return null; return null;
if (deviceList.length > 1) { 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 <deviceId>' flag."); "the '-d <deviceId>' flag.");
deviceList = await deviceManager.getAllConnectedDevices().toList(); deviceList = await deviceManager.getAllConnectedDevices().toList();
printStatus(''); printStatus('');

View File

@ -75,10 +75,10 @@ Future<Null> parseServiceConfigs(
} }
Future<String> getServiceFromUrl(String url, String rootDir, String serviceName) async { Future<String> 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. // It's something shipped in the standard android SDK.
return url.replaceAll('android-sdk:', '${androidSdk.directory}/'); return url.replaceAll('android-sdk:', '${androidSdk.directory}/');
} else if (url.startsWith("http")) { } else if (url.startsWith('http')) {
// It's a regular file to download. // It's a regular file to download.
return await cache.getThirdPartyFile(url, serviceName); return await cache.getThirdPartyFile(url, serviceName);
} else { } else {

View File

@ -10,7 +10,7 @@ import 'globals.dart';
const String _kTemplateExtension = '.tmpl'; const String _kTemplateExtension = '.tmpl';
const String _kCopyTemplateExtension = '.copy.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 /// Expands templates in a directory to a destination. All files that must
/// undergo template expansion should end with the '.tmpl' extension. All other /// undergo template expansion should end with the '.tmpl' extension. All other

View File

@ -15,8 +15,8 @@ class EventPrinter extends TestWatcher {
@override @override
void onStartedProcess(ProcessEvent event) { void onStartedProcess(ProcessEvent event) {
_sendEvent("test.startedProcess", _sendEvent('test.startedProcess',
<String, dynamic>{"observatoryUri": event.observatoryUri.toString()}); <String, dynamic>{'observatoryUri': event.observatoryUri.toString()});
} }
void _sendEvent(String name, [dynamic params]) { void _sendEvent(String name, [dynamic params]) {

View File

@ -408,8 +408,8 @@ class _FlutterPlatform extends PlatformPlugin {
String _getWebSocketUrl(HttpServer server) { String _getWebSocketUrl(HttpServer server) {
return host.type == InternetAddressType.IP_V4 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({ String _generateTestMain({

View File

@ -44,11 +44,11 @@ Future<int> runTests(
} }
for (String name in names) { for (String name in names) {
testArgs..add("--name")..add(name); testArgs..add('--name')..add(name);
} }
for (String plainName in plainNames) { for (String plainName in plainNames) {
testArgs..add("--plain-name")..add(plainName); testArgs..add('--plain-name')..add(plainName);
} }
testArgs.add('--'); testArgs.add('--');

View File

@ -321,7 +321,7 @@ abstract class ServiceObject {
return null; return null;
if (!_isServiceMap(map)) 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']); final String type = _stripRef(map['type']);
@ -435,7 +435,7 @@ abstract class ServiceObject {
final String mapType = _stripRef(map['type']); final String mapType = _stripRef(map['type']);
if ((_type != null) && (_type != mapType)) { if ((_type != null) && (_type != mapType)) {
throw new VMServiceObjectLoadError("ServiceObject types must not change", throw new VMServiceObjectLoadError('ServiceObject types must not change',
map); map);
} }
_type = mapType; _type = mapType;
@ -443,7 +443,7 @@ abstract class ServiceObject {
_canCache = map['fixedId'] == true; _canCache = map['fixedId'] == true;
if ((_id != null) && (_id != map['id']) && _canCache) { if ((_id != null) && (_id != map['id']) && _canCache) {
throw new VMServiceObjectLoadError("ServiceObject id changed", map); throw new VMServiceObjectLoadError('ServiceObject id changed', map);
} }
_id = map['id']; _id = map['id'];
@ -1061,7 +1061,7 @@ class Isolate extends ServiceObjectOwner {
if (ownerType == 'Library' || ownerType == '@Library') if (ownerType == 'Library' || ownerType == '@Library')
break; break;
final String ownerName = owner['name']; final String ownerName = owner['name'];
name = "$ownerName.$name"; name = '$ownerName.$name';
owner = owner['owner']; owner = owner['owner'];
} }

View File

@ -47,7 +47,7 @@ $fontsSection
} }
void writePackagesFile(String packages) { void writePackagesFile(String packages) {
fs.file(".packages") fs.file('.packages')
..createSync() ..createSync()
..writeAsStringSync(packages); ..writeAsStringSync(packages);
} }

View File

@ -55,7 +55,7 @@ $assetsSection
} }
void writePackagesFile(String packages) { void writePackagesFile(String packages) {
fs.file(".packages") fs.file('.packages')
..createSync() ..createSync()
..writeAsStringSync(packages); ..writeAsStringSync(packages);
} }
@ -155,7 +155,7 @@ $assetsSection
expectedAssetManifest, expectedAssetManifest,
); );
}, overrides: contextOverrides); }, overrides: contextOverrides);
testUsingContext("One asset is bundled when the package has one asset, listed in the app's pubspec", () async { testUsingContext("One asset is bundled when the package has one asset, listed in the app's pubspec", () async {
establishFlutterRoot(); establishFlutterRoot();
@ -180,7 +180,7 @@ $assetsSection
); );
}, overrides: contextOverrides); }, 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(); establishFlutterRoot();
writePubspecFile('pubspec.yaml', 'test'); writePubspecFile('pubspec.yaml', 'test');
@ -204,7 +204,7 @@ $assetsSection
); );
}, overrides: contextOverrides); }, 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(); establishFlutterRoot();
writePubspecFile( writePubspecFile(
@ -231,7 +231,7 @@ $assetsSection
); );
}, overrides: contextOverrides); }, 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(); establishFlutterRoot();
writePubspecFile('pubspec.yaml', 'test'); writePubspecFile('pubspec.yaml', 'test');
@ -288,7 +288,7 @@ $assetsSection
); );
}, overrides: contextOverrides); }, 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(); establishFlutterRoot();
writePubspecFile( writePubspecFile(
@ -323,7 +323,7 @@ $assetsSection
expectedAssetManifest, expectedAssetManifest,
); );
}, overrides: contextOverrides); }, overrides: contextOverrides);
testUsingContext("Two assets are bundled when two packages each have an asset, listed in the app's pubspec", () async { testUsingContext("Two assets are bundled when two packages each have an asset, listed in the app's pubspec", () async {
establishFlutterRoot(); establishFlutterRoot();
@ -363,7 +363,7 @@ $assetsSection
); );
}, overrides: contextOverrides); }, 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(); establishFlutterRoot();
writePubspecFile( writePubspecFile(
'pubspec.yaml', 'pubspec.yaml',

View File

@ -23,7 +23,7 @@ void main() {
// path separator. // path separator.
Cache.flutterRoot = getFlutterRoot(); Cache.flutterRoot = getFlutterRoot();
fs.file("pubspec.yaml") fs.file('pubspec.yaml')
..createSync() ..createSync()
..writeAsStringSync( ..writeAsStringSync(
''' '''
@ -36,7 +36,7 @@ flutter:
- a/b/c/foo - a/b/c/foo
''' '''
); );
fs.file(".packages")..createSync(); fs.file('.packages')..createSync();
final List<String> assets = <String>[ final List<String> assets = <String>[
'a/b/c/foo', 'a/b/c/foo',

View File

@ -261,7 +261,7 @@ void main() {
Cache.flutterRoot = '../..'; Cache.flutterRoot = '../..';
final CreateCommand command = new CreateCommand(); final CreateCommand command = new CreateCommand();
final CommandRunner<Null> runner = createTestCommandRunner(command); final CommandRunner<Null> runner = createTestCommandRunner(command);
final File existingFile = fs.file("${projectDir.path.toString()}/bad"); final File existingFile = fs.file('${projectDir.path.toString()}/bad');
if (!existingFile.existsSync()) if (!existingFile.existsSync())
existingFile.createSync(recursive: true); existingFile.createSync(recursive: true);
expect( expect(

View File

@ -277,12 +277,12 @@ class MemoryIOSink implements IOSink {
} }
@override @override
void writeln([Object obj = ""]) { void writeln([Object obj = '']) {
add(encoding.encode('$obj\n')); add(encoding.encode('$obj\n'));
} }
@override @override
void writeAll(Iterable<dynamic> objects, [String separator = ""]) { void writeAll(Iterable<dynamic> objects, [String separator = '']) {
bool addSeparator = false; bool addSeparator = false;
for (dynamic object in objects) { for (dynamic object in objects) {
if (addSeparator) { if (addSeparator) {