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
158 changed files with 340 additions and 340 deletions

View File

@@ -18,7 +18,7 @@ class SampleError extends Error {
// Sample apps are .dart files in the lib directory which contain a block
// comment that begins with a '/* Sample Catalog' line, and ends with a line
// that just contains '*/'. The following keywords may appear at the
// that just contains '*/'. The following keywords may appear at the
// beginning of lines within the comment. A keyword's value is all of
// the following text up to the next keyword or the end of the comment,
// sans leading and trailing whitespace.

View File

@@ -42,7 +42,7 @@ class _AnimatedListSampleState extends State<AnimatedListSample> {
}
// Used to build an item after it has been removed from the list. This method is
// needed because a removed item remains visible until its animation has
// needed because a removed item remains visible until its animation has
// completed (even though it's gone as far this ListModel is concerned).
// The widget will be used by the [AnimatedListState.removeItem] method's
// [AnimatedListRemovedItemBuilder] parameter.

View File

@@ -375,7 +375,7 @@ class _SnappingScrollPhysics extends ClampingScrollPhysics {
@override
_SnappingScrollPhysics applyTo(ScrollPhysics ancestor) {
return new _SnappingScrollPhysics(parent: buildParent(ancestor), midScrollOffset: midScrollOffset);
return new _SnappingScrollPhysics(parent: buildParent(ancestor), midScrollOffset: midScrollOffset);
}
Simulation _toMidScrollOffsetSimulation(double offset, double dragVelocity) {
@@ -411,7 +411,7 @@ class _SnappingScrollPhysics extends ClampingScrollPhysics {
// snap to midScrollOffset if they're more than halfway there,
// otherwise snap to zero.
final double snapThreshold = midScrollOffset / 2.0;
if (offset >= snapThreshold && offset < midScrollOffset)
if (offset >= snapThreshold && offset < midScrollOffset)
return _toMidScrollOffsetSimulation(offset, dragVelocity);
if (offset > 0.0 && offset < snapThreshold)
return _toZeroScrollOffsetSimulation(offset, dragVelocity);

View File

@@ -97,7 +97,7 @@ class PaletteTabView extends StatelessWidget {
final TextTheme textTheme = Theme.of(context).textTheme;
final TextStyle whiteTextStyle = textTheme.body1.copyWith(color: Colors.white);
final TextStyle blackTextStyle = textTheme.body1.copyWith(color: Colors.black);
final List<Widget> colorItems = primaryKeys.map((int index) {
final List<Widget> colorItems = primaryKeys.map((int index) {
return new DefaultTextStyle(
style: index > colors.threshold ? whiteTextStyle : blackTextStyle,
child: new ColorItem(index: index, color: colors.primary[index]),

View File

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

View File

@@ -23,7 +23,7 @@ class _CupertinoSwitchDemoState extends State<CupertinoSwitchDemo> {
title: const Text('Cupertino Switch'),
),
body: new Center(
child: new CupertinoSwitch(
child: new CupertinoSwitch(
value: _switchValue,
onChanged: (bool value) {
setState(() {

View File

@@ -100,7 +100,7 @@ class _DrawerDemoState extends State<DrawerDemo> with TickerProviderStateMixin {
package: _kGalleryAssetsPackage,
),
),
otherAccountsPictures: <Widget>[
otherAccountsPictures: <Widget>[
new GestureDetector(
onTap: () {
_onOtherAccountsTap(context);

View File

@@ -53,7 +53,7 @@ class _PersistentBottomSheetDemoState extends State<PersistentBottomSheetDemo> {
});
}
void _showMessage() {
void _showMessage() {
showDialog<Null>(
context: context,
child: new AlertDialog(

View File

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

View File

@@ -42,7 +42,7 @@ class TextFormFieldDemoState extends State<TextFormFieldDemo> {
void _handleSubmitted() {
final FormState form = _formKey.currentState;
if (!form.validate()) {
_autovalidate = true; // Start validating on every change.
_autovalidate = true; // Start validating on every change.
showInSnackBar('Please fix the errors in red before submitting.');
} else {
form.save();

View File

@@ -18,7 +18,7 @@ class PestoDemo extends StatelessWidget {
const String _kSmallLogoImage = 'pesto/logo_small.png';
const String _kGalleryAssetsPackage = 'flutter_gallery_assets';
const double _kAppBarHeight = 128.0;
const double _kFabHalfSize = 28.0; // TODO(mpcomplete): needs to adapt to screen size
const double _kFabHalfSize = 28.0; // TODO(mpcomplete): needs to adapt to screen size
const double _kRecipePageMaxWidth = 500.0;
final Set<Recipe> _favoriteRecipes = new Set<Recipe>();
@@ -667,7 +667,7 @@ const List<Recipe> kPestoRecipes = const <Recipe>[
author: 'Ali Connors',
ingredientsImagePath: 'pesto/healthy.png',
ingredientsImagePackage: _kGalleryAssetsPackage,
description: 'This dish is a terrific pairing to almost any main. Bonus- it’s quick, easy to make, and turns even the simplest of dishes into a delicacy. Sweet coconut cream will leave your mouth watering, with yummy caramelized flecks of rice adding an extra bit of taste. Fluff with fork before serving for best results.',
description: 'This dish is a terrific pairing to almost any main. Bonus- it’s quick, easy to make, and turns even the simplest of dishes into a delicacy. Sweet coconut cream will leave your mouth watering, with yummy caramelized flecks of rice adding an extra bit of taste. Fluff with fork before serving for best results.',
imagePath: 'pesto/image6.jpg',
imagePackage: _kGalleryAssetsPackage,
ingredients: const<RecipeIngredient>[
@@ -732,7 +732,7 @@ const List<Recipe> kPestoRecipes = const <Recipe>[
imagePackage: _kGalleryAssetsPackage,
ingredients: const<RecipeIngredient>[
const RecipeIngredient(amount: '1', description: 'Small garlic clove, peeled'),
const RecipeIngredient(amount: '2', description: 'Whole artichokes'),
const RecipeIngredient(amount: '2', description: 'Whole artichokes'),
const RecipeIngredient(amount: '4 tbsp', description: 'Fresh lemon juice'),
const RecipeIngredient(amount: '4 tbsp', description: 'Unsalted butter'),
const RecipeIngredient(amount: '2 tbsp', description: 'Extra-virgin olive oil'),
@@ -748,7 +748,7 @@ const List<Recipe> kPestoRecipes = const <Recipe>[
author: 'Trevor Hansen',
ingredientsImagePath: 'pesto/veggie.png',
ingredientsImagePackage: _kGalleryAssetsPackage,
description: 'Life is good when you add amazingly warm bread, fresh pesto sauce, and roasted tomatoes to the table. This a classic starter to break out in a pinch. It’s easy to make and extra tasty.',
description: 'Life is good when you add amazingly warm bread, fresh pesto sauce, and roasted tomatoes to the table. This a classic starter to break out in a pinch. It’s easy to make and extra tasty.',
imagePath: 'pesto/image10.jpg',
imagePackage: _kGalleryAssetsPackage,
ingredients: const<RecipeIngredient>[
@@ -771,7 +771,7 @@ const List<Recipe> kPestoRecipes = const <Recipe>[
author: 'Sandra Adams',
ingredientsImagePath: 'pesto/spicy.png',
ingredientsImagePackage: _kGalleryAssetsPackage,
description: 'Great stir-fried bok choy starts at the market. For me, nothing says tasty like garlic and baby bok choy. Choose fresh, crisp greens. Once home, wash, chop, and then ready for the wok. No family style spread is complete without these greens.',
description: 'Great stir-fried bok choy starts at the market. For me, nothing says tasty like garlic and baby bok choy. Choose fresh, crisp greens. Once home, wash, chop, and then ready for the wok. No family style spread is complete without these greens.',
imagePath: 'pesto/image11.jpg',
imagePackage: _kGalleryAssetsPackage,
ingredients: const<RecipeIngredient>[

View File

@@ -30,7 +30,7 @@ const Vendor _trevor = const Vendor(
avatarAsset: 'shrine/vendors/zach.jpg',
avatarAssetPackage: _kGalleryAssetsPackage,
description:
'Trevor makes great stuff for awesome people like you. Super cool and extra '
'Trevor makes great stuff for awesome people like you. Super cool and extra '
'awesome all of his shop’s goods are handmade with love. Custom orders are '
'available upon request if you need something extra special.'
);
@@ -40,7 +40,7 @@ const Vendor _peter = const Vendor(
avatarAsset: 'shrine/vendors/peter-carlsson.png',
avatarAssetPackage: _kGalleryAssetsPackage,
description:
'Peter makes great stuff for awesome people like you. Super cool and extra '
'Peter makes great stuff for awesome people like you. Super cool and extra '
'awesome all of his shop’s goods are handmade with love. Custom orders are '
'available upon request if you need something extra special.'
);

View File

@@ -109,7 +109,7 @@ class DartSyntaxHighlighter extends SyntaxHighlighter {
return new TextSpan(style: _style.baseStyle, children: formattedText);
} else {
// 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

@@ -13,7 +13,7 @@ void main() {
// We press the "1" and the "2" buttons and check that the display
// reads "12".
testWidgets('Flutter calculator app smoke test', (WidgetTester tester) async {
testWidgets('Flutter calculator app smoke test', (WidgetTester tester) async {
await tester.pumpWidget(new MaterialApp(home: const CalculatorDemo()));
final Finder oneButton = find.widgetWithText(InkResponse, '1');

View File

@@ -7,7 +7,7 @@ import 'package:flutter_gallery/demo/material/drawer_demo.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('Drawer header does not scroll', (WidgetTester tester) async {
testWidgets('Drawer header does not scroll', (WidgetTester tester) async {
await tester.pumpWidget(new MaterialApp(
theme: new ThemeData(platform: TargetPlatform.iOS),
home: new DrawerDemo(),

View File

@@ -7,7 +7,7 @@ import 'package:flutter_gallery/demo/material/text_form_field_demo.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('validates name field correctly', (WidgetTester tester) async {
testWidgets('validates name field correctly', (WidgetTester tester) async {
await tester.pumpWidget(new MaterialApp(home: const TextFormFieldDemo()));
final Finder submitButton = find.widgetWithText(RaisedButton, 'SUBMIT');

View File

@@ -1,4 +1,4 @@
// Copyright 2017, the Flutter project authors. Please see the AUTHORS file
// Copyright 2017, the Flutter project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.