some whitespace cleanup (#14443)

This commit is contained in:
Alexandre Ardhuin 2018-02-02 23:27:29 +01:00 committed by GitHub
parent 688a571c71
commit c02b6a8bcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
158 changed files with 340 additions and 340 deletions

View File

@ -64,7 +64,7 @@ class TileScrollLayout extends StatelessWidget {
itemCount: 200, itemCount: 200,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return new Padding( return new Padding(
padding:const EdgeInsets.all(5.0), padding: const EdgeInsets.all(5.0),
child: new Material( child: new Material(
elevation: (index % 5 + 1).toDouble(), elevation: (index % 5 + 1).toDouble(),
color: Colors.white, color: Colors.white,

View File

@ -267,7 +267,7 @@ class FrameData {
final List<SvgPath> paths; final List<SvgPath> paths;
@override @override
bool operator ==(Object other){ bool operator ==(Object other) {
if (runtimeType != other.runtimeType) if (runtimeType != other.runtimeType)
return false; return false;
final FrameData typedOther = other; final FrameData typedOther = other;
@ -464,7 +464,7 @@ const String _transformCommandAtom = ' *([^(]+)\\(([^)]*)\\)';
final RegExp _transformValidator = new RegExp('^($_transformCommandAtom)*\$'); final RegExp _transformValidator = new RegExp('^($_transformCommandAtom)*\$');
final RegExp _transformCommand = new RegExp(_transformCommandAtom); final RegExp _transformCommand = new RegExp(_transformCommandAtom);
Matrix3 _parseSvgTransform(String transform){ Matrix3 _parseSvgTransform(String transform) {
if (!_transformValidator.hasMatch(transform)) if (!_transformValidator.hasMatch(transform))
throw new Exception('illegal or unsupported transform: $transform'); throw new Exception('illegal or unsupported transform: $transform');
final Iterable<Match> matches =_transformCommand.allMatches(transform).toList().reversed; final Iterable<Match> matches =_transformCommand.allMatches(transform).toList().reversed;

View File

@ -30,10 +30,10 @@ const List<String> coolColorNames = const <String>[
class CupertinoNavigationDemo extends StatelessWidget { class CupertinoNavigationDemo extends StatelessWidget {
CupertinoNavigationDemo() CupertinoNavigationDemo()
: colorItems = new List<Color>.generate(50, (int index){ : colorItems = new List<Color>.generate(50, (int index) {
return coolColors[new math.Random().nextInt(coolColors.length)]; return coolColors[new math.Random().nextInt(coolColors.length)];
}) , }) ,
colorNameItems = new List<String>.generate(50, (int index){ colorNameItems = new List<String>.generate(50, (int index) {
return coolColorNames[new math.Random().nextInt(coolColorNames.length)]; return coolColorNames[new math.Random().nextInt(coolColorNames.length)];
}); });

View File

@ -111,7 +111,7 @@ class ScrollableTabsDemoState extends State<ScrollableTabsDemo> with SingleTicke
child: new Container( child: new Container(
key: new ObjectKey(page.icon), key: new ObjectKey(page.icon),
padding: const EdgeInsets.all(12.0), padding: const EdgeInsets.all(12.0),
child:new Card( child: new Card(
child: new Center( child: new Center(
child: new Icon( child: new Icon(
page.icon, page.icon,

View File

@ -109,7 +109,7 @@ class DartSyntaxHighlighter extends SyntaxHighlighter {
return new TextSpan(style: _style.baseStyle, children: formattedText); return new TextSpan(style: _style.baseStyle, children: formattedText);
} else { } else {
// Parsing failed, return with only basic formatting // Parsing failed, return with only basic formatting
return new TextSpan(style:_style.baseStyle, text: src); return new TextSpan(style: _style.baseStyle, text: src);
} }
} }

View File

@ -396,7 +396,7 @@ void main() {
expect(controller.value, 1.0); expect(controller.value, 1.0);
}); });
test('resetting animation works at all phases', (){ test('resetting animation works at all phases', () {
final List<AnimationStatus> statusLog = <AnimationStatus>[]; final List<AnimationStatus> statusLog = <AnimationStatus>[];
final AnimationController controller = new AnimationController( final AnimationController controller = new AnimationController(
duration: const Duration(milliseconds: 100), duration: const Duration(milliseconds: 100),

View File

@ -58,7 +58,7 @@ void main() {
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
child: new Container( child: new Container(
width: 600.0, width: 600.0,
child:new ListView( child: new ListView(
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
children: <String>['A', 'B', 'C', 'D', 'E', 'F'].map((String item) { children: <String>['A', 'B', 'C', 'D', 'E', 'F'].map((String item) {
return new SizedBox( return new SizedBox(

View File

@ -505,7 +505,7 @@ void main() {
persistentFooterButtons: const <Widget>[const Text(persistentFooterButtonLabel)], persistentFooterButtons: const <Widget>[const Text(persistentFooterButtonLabel)],
bottomNavigationBar: const Text(bottomNavigationBarLabel), bottomNavigationBar: const Text(bottomNavigationBarLabel),
floatingActionButton: const Text(floatingActionButtonLabel), floatingActionButton: const Text(floatingActionButtonLabel),
drawer: const Drawer(child:const Text(drawerLabel)), drawer: const Drawer(child: const Text(drawerLabel)),
))); )));
expect(semantics, includesNodeWith(label: bodyLabel)); expect(semantics, includesNodeWith(label: bodyLabel));
@ -719,8 +719,8 @@ void main() {
final SemanticsTester semantics = new SemanticsTester(tester); final SemanticsTester semantics = new SemanticsTester(tester);
await tester.pumpWidget(new MaterialApp(home: const Scaffold( await tester.pumpWidget(new MaterialApp(home: const Scaffold(
body: const Text(bodyLabel), body: const Text(bodyLabel),
drawer: const Drawer(child:const Text(drawerLabel)), drawer: const Drawer(child: const Text(drawerLabel)),
endDrawer: const Drawer(child:const Text(endDrawerLabel)), endDrawer: const Drawer(child: const Text(endDrawerLabel)),
))); )));
expect(semantics, includesNodeWith(label: bodyLabel)); expect(semantics, includesNodeWith(label: bodyLabel));

View File

@ -444,7 +444,7 @@ void main() {
await tester.tap(find.text('ACTION')); await tester.tap(find.text('ACTION'));
expect(actionPressed, isTrue); expect(actionPressed, isTrue);
// Closed reason is only set when the animation is complete. // Closed reason is only set when the animation is complete.
await tester.pump(const Duration(milliseconds:250)); await tester.pump(const Duration(milliseconds: 250));
expect(closedReason, isNull); expect(closedReason, isNull);
// Wait for animation to complete. // Wait for animation to complete.
await tester.pumpAndSettle(const Duration(seconds: 1)); await tester.pumpAndSettle(const Duration(seconds: 1));

View File

@ -167,7 +167,7 @@ void main() {
await tester.pumpWidget(new Directionality( await tester.pumpWidget(new Directionality(
textDirection: TextDirection.ltr, textDirection: TextDirection.ltr,
child:new MediaQuery( child: new MediaQuery(
data: const MediaQueryData(), data: const MediaQueryData(),
child: new Scrollable( child: new Scrollable(
controller: scrollController, controller: scrollController,

View File

@ -114,7 +114,7 @@ class CachedArtifacts extends Artifacts {
} }
@override @override
String getEngineType(TargetPlatform platform, [BuildMode mode]){ String getEngineType(TargetPlatform platform, [BuildMode mode]) {
return fs.path.basename(_getEngineArtifactsPath(platform, mode)); return fs.path.basename(_getEngineArtifactsPath(platform, mode));
} }

View File

@ -21,12 +21,12 @@ void main() {
testUsingContext('recursively creates a directory if it does not exist', () async { testUsingContext('recursively creates a directory if it does not exist', () async {
ensureDirectoryExists('foo/bar/baz.flx'); ensureDirectoryExists('foo/bar/baz.flx');
expect(fs.isDirectorySync('foo/bar'), true); expect(fs.isDirectorySync('foo/bar'), true);
}, overrides: <Type, Generator>{ FileSystem: () => fs } ); }, overrides: <Type, Generator>{ FileSystem: () => fs });
testUsingContext('throws tool exit on failure to create', () async { testUsingContext('throws tool exit on failure to create', () async {
fs.file('foo').createSync(); fs.file('foo').createSync();
expect(() => ensureDirectoryExists('foo/bar.flx'), throwsToolExit()); expect(() => ensureDirectoryExists('foo/bar.flx'), throwsToolExit());
}, overrides: <Type, Generator>{ FileSystem: () => fs } ); }, overrides: <Type, Generator>{ FileSystem: () => fs });
}); });
group('copyDirectorySync', () { group('copyDirectorySync', () {

View File

@ -55,5 +55,5 @@ void main() {
fs.directory(fs.path.join(root, 'dev', 'tools', 'aatool')).path, fs.directory(fs.path.join(root, 'dev', 'tools', 'aatool')).path,
fs.directory(fs.path.join(root, 'dev', 'tools')).path, fs.directory(fs.path.join(root, 'dev', 'tools')).path,
]); ]);
}, overrides: <Type, Generator>{ FileSystem: () => fs } ); }, overrides: <Type, Generator>{ FileSystem: () => fs });
} }