Skip to content

Commit

Permalink
Remove errant double spaces (#110758)
Browse files Browse the repository at this point in the history
  • Loading branch information
guidezpl authored Sep 2, 2022
1 parent 1658cb5 commit 0c2f7bc
Show file tree
Hide file tree
Showing 93 changed files with 155 additions and 154 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ Future<void> main() async {

/// Calculates the smoothness measure from `scrollOffset` and `delays` list.
///
/// Smoothness (`abs_jerk`) is measured by the absolute value of the discrete
/// Smoothness (`abs_jerk`) is measured by the absolute value of the discrete
/// 2nd derivative of the scroll offset.
///
/// It was experimented that jerk (3rd derivative of the position) is a good
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void main() async {
watch.reset();
watch.start();
for (int i = 0; i < _kBatchSize; i += 1) {
// Note: We don't load images like this. PlatformAssetBundle is used for
// Note: We don't load images like this. PlatformAssetBundle is used for
// other assets (like Rive animations). We are using an image because it's
// conveniently sized and available for the test.
tally += (await bundle.load('packages/flutter_gallery_assets/places/india_pondicherry_salt_farm.png')).lengthInBytes;
Expand Down
3 changes: 1 addition & 2 deletions dev/benchmarks/platform_channels_benchmarks/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import 'dart:math' as math;
import 'package:flutter/foundation.dart' show kDebugMode;
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

import 'package:microbenchmarks/common.dart';

List<Object?> _makeTestBuffer(int size) {
Expand Down Expand Up @@ -195,7 +194,7 @@ Future<void> _runTests() async {
);

/// WARNING: Don't change the following line of code, it will invalidate
/// `Large` tests. Instead make a different test. The size of largeBuffer
/// `Large` tests. Instead make a different test. The size of largeBuffer
/// serialized is 14214 bytes.
final List<Object?> largeBuffer = _makeTestBuffer(1000);
final ByteData largeBufferBytes =
Expand Down
2 changes: 1 addition & 1 deletion dev/bots/analyze_snippet_code.dart
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ class _SnippetChecker {

/// The directory for the dart:ui code to be analyzed with the flutter code.
///
/// If this is null, then no dart:ui code is included in the analysis. It
/// If this is null, then no dart:ui code is included in the analysis. It
/// defaults to the location inside of the flutter bin/cache directory that
/// contains the dart:ui code supplied by the engine.
final Directory? _dartUiLocation;
Expand Down
6 changes: 3 additions & 3 deletions dev/bots/prepare_package.dart
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ typedef HttpReader = Future<Uint8List> Function(Uri url, {Map<String, String> he

/// Creates a pre-populated Flutter archive from a git repo.
class ArchiveCreator {
/// [tempDir] is the directory to use for creating the archive. The script
/// [tempDir] is the directory to use for creating the archive. The script
/// will place several GiB of data there, so it should have available space.
///
/// The processManager argument is used to inject a mock of [ProcessManager] for
Expand Down Expand Up @@ -263,7 +263,7 @@ class ArchiveCreator {
/// platform we're running on.
final Platform platform;

/// The branch to build the archive for. The branch must contain [revision].
/// The branch to build the archive for. The branch must contain [revision].
final Branch branch;

/// The git revision hash to build the archive for. This revision has
Expand Down Expand Up @@ -385,7 +385,7 @@ class ArchiveCreator {
/// git will give an error.
///
/// If [strict] is true, the exact [revision] must be tagged to return the
/// version. If [strict] is not true, will look backwards in time starting at
/// version. If [strict] is not true, will look backwards in time starting at
/// [revision] to find the most recent version tag.
///
/// The version found as a git tag is added to the information given by
Expand Down
2 changes: 1 addition & 1 deletion dev/bots/test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ const Map<String, List<String>> kWebTestFileKnownFailures = <String, List<String
const String kTestHarnessShardName = 'test_harness_tests';
const List<String> _kAllBuildModes = <String>['debug', 'profile', 'release'];

// The seed used to shuffle tests. If not passed with
// The seed used to shuffle tests. If not passed with
// --test-randomize-ordering-seed=<seed> on the command line, it will be set the
// first time it is accessed. Pass zero to turn off shuffling.
String? _shuffleSeed;
Expand Down
6 changes: 3 additions & 3 deletions dev/bots/unpublish_package.dart
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ Future<void> main(List<String> rawArguments) async {
'confirm',
help: 'If set, will actually remove the archive from Google Cloud Storage '
'upon successful execution of this script. Published archives will be '
'removed from this directory: $baseUrl$releaseFolder. This option '
'removed from this directory: $baseUrl$releaseFolder. This option '
'must be set to perform any action on the server, otherwise only a dry '
'run is performed.',
);
Expand Down Expand Up @@ -479,7 +479,7 @@ Future<void> main(List<String> rawArguments) async {
}

if (!(parsedArguments['confirm'] as bool)) {
_printBanner('This will be just a dry run. To actually perform the changes below, re-run with --confirm argument.');
_printBanner('This will be just a dry run. To actually perform the changes below, re-run with --confirm argument.');
}

final List<String> channelArg = parsedArguments['channel'] as List<String>;
Expand Down Expand Up @@ -518,7 +518,7 @@ Future<void> main(List<String> rawArguments) async {
errorExit('$message\n$stack', exitCode: exitCode);
}
if (!(parsedArguments['confirm'] as bool)) {
_printBanner('This was just a dry run. To actually perform the above changes, re-run with --confirm argument.');
_printBanner('This was just a dry run. To actually perform the above changes, re-run with --confirm argument.');
}
exit(0);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ class _ChipDemoState extends State<ChipDemo> {
}

// This converts a String to a unique color, based on the hash value of the
// String object. It takes the bottom 16 bits of the hash, and uses that to
// String object. It takes the bottom 16 bits of the hash, and uses that to
// pick a hue for an HSV color, and then creates the color (with a preset
// saturation and value). This means that any unique strings will also have
// saturation and value). This means that any unique strings will also have
// unique colors, but they'll all be readable, since they have the same
// saturation and value.
Color _nameToColor(String name, ThemeData theme) {
Expand Down
2 changes: 1 addition & 1 deletion dev/tools/dartdoc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ ArgParser _createArgsParser() {
help: 'Show command help.');
parser.addFlag('verbose', defaultsTo: true,
help: 'Whether to report all error messages (on) or attempt to '
'filter out some known false positives (off). Shut this off '
'filter out some known false positives (off). Shut this off '
'locally if you want to address Flutter-specific issues.');
parser.addFlag('checked', abbr: 'c',
help: 'Run dartdoc in checked mode.');
Expand Down
4 changes: 2 additions & 2 deletions dev/tools/localization/bin/gen_subtag_registry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import 'dart:io';

const String registry = 'https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry';

/// A script to generate a Dart cache of https://www.iana.org. This should be
/// run occasionally. It was created since iana.org was found to be flakey.
/// A script to generate a Dart cache of https://www.iana.org. This should be
/// run occasionally. It was created since iana.org was found to be flakey.
///
/// To execute: dart gen_subtag_registry.dart > language_subtag_registry.dart
Future<void> main() async {
Expand Down
2 changes: 1 addition & 1 deletion examples/api/lib/animation/curves/curve2_d.0.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class _FollowCurve2DState extends State<FollowCurve2D>
super.initState();
controller = AnimationController(duration: widget.duration, vsync: this);
animation = CurvedAnimation(parent: controller, curve: widget.curve);
// Have the controller repeat indefinitely. If you want it to "bounce" back
// Have the controller repeat indefinitely. If you want it to "bounce" back
// and forth, set the reverse parameter to true.
controller.repeat();
controller.addListener(() => setState(() {}));
Expand Down
2 changes: 1 addition & 1 deletion examples/api/lib/material/text_field/text_field.2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Flutter code sample for Material Design 3 TextFields.
// Flutter code sample for Material Design 3 TextFields.

import 'package:flutter/material.dart';

Expand Down
6 changes: 3 additions & 3 deletions packages/flutter/lib/src/animation/curves.dart
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ abstract class Curve2D extends ParametricCurve<Offset> {
double end = 1.0,
double tolerance = 1e-10,
}) {
// The sampling algorithm is:
// The sampling algorithm is:
// 1. Evaluate the area of the triangle (a proxy for the "flatness" of the
// curve) formed by two points and a test point.
// 2. If the area of the triangle is small enough (below tolerance), then
Expand Down Expand Up @@ -675,7 +675,7 @@ class CatmullRomSpline extends Curve2D {
/// interpolate.
///
/// The internal curve data structures are lazily computed the first time
/// [transform] is called. If you would rather pre-compute the structures,
/// [transform] is called. If you would rather pre-compute the structures,
/// use [CatmullRomSpline.precompute] instead.
CatmullRomSpline(
List<Offset> controlPoints, {
Expand Down Expand Up @@ -851,7 +851,7 @@ class CatmullRomCurve extends Curve {
/// is equivalent to a linear interpolation between points.
///
/// The internal curve data structures are lazily computed the first time
/// [transform] is called. If you would rather pre-compute the curve, use
/// [transform] is called. If you would rather pre-compute the curve, use
/// [CatmullRomCurve.precompute] instead.
///
/// All of the arguments must not be null.
Expand Down
6 changes: 3 additions & 3 deletions packages/flutter/lib/src/cupertino/dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ class _CupertinoDialogRenderElement extends RenderObjectElement {
//
// If all content and buttons do not fit on screen, and iOS is NOT in accessibility mode:
// A minimum height for the action button section is calculated. The action
// button section will not be rendered shorter than this minimum. See
// button section will not be rendered shorter than this minimum. See
// [_RenderCupertinoDialogActions] for the minimum height calculation.
//
// With the minimum action button section calculated, the content section can
Expand Down Expand Up @@ -1335,7 +1335,7 @@ enum _AlertDialogSections {

// The "content section" of a CupertinoAlertDialog.
//
// If title is missing, then only content is added. If content is
// If title is missing, then only content is added. If content is
// missing, then only title is added. If both are missing, then it returns
// a SingleChildScrollView with a zero-sized Container.
class _CupertinoAlertContentSection extends StatelessWidget {
Expand Down Expand Up @@ -2254,7 +2254,7 @@ class _RenderCupertinoDialogActions extends RenderBox

void _drawButtonBackgroundsAndDividersSingleRow(Canvas canvas, Offset offset) {
// The vertical divider sits between the left button and right button (if
// the dialog has 2 buttons). The vertical divider is hidden if either the
// the dialog has 2 buttons). The vertical divider is hidden if either the
// left or right button is pressed.
final Rect verticalDivider = childCount == 2 && !_isButtonPressed
? Rect.fromLTWH(
Expand Down
4 changes: 2 additions & 2 deletions packages/flutter/lib/src/cupertino/icons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,14 @@ class CupertinoIcons {
/// * [check_mark_circled], which is similar, but not filled in.
static const IconData check_mark_circled_solid = IconData(0xf3ff, fontFamily: iconFont, fontPackage: iconFontPackage);

/// <i class='cupertino-icons md-36'>circle</i> &#x2014; Cupertino icon for an empty circle (a ring). An un-selected radio button.
/// <i class='cupertino-icons md-36'>circle</i> &#x2014; Cupertino icon for an empty circle (a ring). An un-selected radio button.
///
/// See also:
///
/// * [circle_filled], which is similar but filled in.
static const IconData circle = IconData(0xf401, fontFamily: iconFont, fontPackage: iconFontPackage);

/// <i class='cupertino-icons md-36'>circle_fill</i> &#x2014; Cupertino icon for a filled circle. The circle is surrounded by a ring. A selected radio button.
/// <i class='cupertino-icons md-36'>circle_fill</i> &#x2014; Cupertino icon for a filled circle. The circle is surrounded by a ring. A selected radio button.
/// This is the same icon as [circle_fill] in cupertino_icons 1.0.0+.
///
/// See also:
Expand Down
4 changes: 2 additions & 2 deletions packages/flutter/lib/src/cupertino/picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ class CupertinoPicker extends StatefulWidget {
/// the current picker index or for selecting an initial index value.
///
/// The [looping] argument decides whether the child list loops and can be
/// scrolled infinitely. If set to true, scrolling past the end of the list
/// will loop the list back to the beginning. If set to false, the list will
/// scrolled infinitely. If set to true, scrolling past the end of the list
/// will loop the list back to the beginning. If set to false, the list will
/// stop scrolling when you reach the end or the beginning.
CupertinoPicker({
super.key,
Expand Down
3 changes: 2 additions & 1 deletion packages/flutter/lib/src/cupertino/tab_scaffold.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// found in the LICENSE file.

import 'package:flutter/widgets.dart';

import 'bottom_tab_bar.dart';
import 'colors.dart';
import 'theme.dart';
Expand Down Expand Up @@ -457,7 +458,7 @@ class _TabSwitchingViewState extends State<_TabSwitchingView> {
_focusActiveTab();
}

// Will focus the active tab if the FocusScope above it has focus already. If
// Will focus the active tab if the FocusScope above it has focus already. If
// not, then it will just mark it as the preferred focus for that scope.
void _focusActiveTab() {
if (tabFocusNodes.length != widget.tabCount) {
Expand Down
5 changes: 3 additions & 2 deletions packages/flutter/lib/src/foundation/binding.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'dart:convert' show json;
import 'dart:developer' as developer;
import 'dart:io' show exit;
import 'dart:ui' as ui show Brightness, PlatformDispatcher, SingletonFlutterWindow, window;

// Before adding any more dart:ui imports, please read the README.

import 'package:meta/meta.dart';
Expand Down Expand Up @@ -178,8 +179,8 @@ abstract class BindingBase {
/// Each of these other bindings could individually access a
/// [ui.SingletonFlutterWindow] statically, but that would preclude the
/// ability to test its behaviors with a fake window for verification
/// purposes. Therefore, [BindingBase] exposes this
/// [ui.SingletonFlutterWindow] for use by other bindings. A subclass of
/// purposes. Therefore, [BindingBase] exposes this
/// [ui.SingletonFlutterWindow] for use by other bindings. A subclass of
/// [BindingBase], such as [TestWidgetsFlutterBinding], can override this
/// accessor to return a different [ui.SingletonFlutterWindow] implementation,
/// such as a [TestWindow].
Expand Down
6 changes: 3 additions & 3 deletions packages/flutter/lib/src/material/app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
/// The shape of the app bar's [Material] as well as its shadow.
///
/// If this property is null, then [AppBarTheme.shape] of
/// [ThemeData.appBarTheme] is used. Both properties default to null.
/// [ThemeData.appBarTheme] is used. Both properties default to null.
/// If both properties are null then the shape of the app bar's [Material]
/// is just a simple rectangle.
///
Expand Down Expand Up @@ -561,7 +561,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
///
/// The AppBar is built within a `AnnotatedRegion<SystemUiOverlayStyle>`
/// which causes [SystemChrome.setSystemUIOverlayStyle] to be called
/// automatically. Apps should not enclose the AppBar with
/// automatically. Apps should not enclose the AppBar with
/// their own [AnnotatedRegion].
/// {@endtemplate}
///
Expand Down Expand Up @@ -780,7 +780,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
/// The AppBar's descendants are built within a
/// `AnnotatedRegion<SystemUiOverlayStyle>` widget, which causes
/// [SystemChrome.setSystemUIOverlayStyle] to be called
/// automatically. Apps should not enclose an AppBar with their
/// automatically. Apps should not enclose an AppBar with their
/// own [AnnotatedRegion].
/// {@endtemplate}
//
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/material/button_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ import 'theme_data.dart';
/// Configuring a ButtonStyle directly makes it possible to very
/// precisely control the button’s visual attributes for all states.
/// This level of control is typically required when a custom
/// “branded” look and feel is desirable. However, in many cases it’s
/// “branded” look and feel is desirable. However, in many cases it’s
/// useful to make relatively sweeping changes based on a few initial
/// parameters with simple values. The button styleFrom() methods
/// enable such sweeping changes. See for example:
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/material/chip.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2068,7 +2068,7 @@ class _RenderChip extends RenderBox with SlottedContainerRenderObjectMixin<_Chip
}

// Set this to true to have outlines of the tap targets drawn over
// the chip. This should never be checked in while set to 'true'.
// the chip. This should never be checked in while set to 'true'.
static const bool _debugShowTapTargetOutlines = false;

@override
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/material/date_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ class _DatePickerHeader extends StatelessWidget {
///
/// * [helpText], the label displayed at the top of the dialog.
/// * [cancelText], the label on the cancel button for the text input mode.
/// * [confirmText],the label on the ok button for the text input mode.
/// * [confirmText],the label on the ok button for the text input mode.
/// * [saveText], the label on the save button for the fullscreen calendar
/// mode.
/// * [errorFormatText], the message used when an input text isn't in a proper
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/material/dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ class SimpleDialog extends StatelessWidget {
/// announce screen transitions when the dialog is opened and closed.
///
/// If this label is not provided, a semantic label will be inferred from the
/// [title] if it is not null. If there is no title, the label will be taken
/// [title] if it is not null. If there is no title, the label will be taken
/// from [MaterialLocalizations.dialogLabel].
///
/// See also:
Expand Down
4 changes: 2 additions & 2 deletions packages/flutter/lib/src/material/elevated_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import 'theme_data.dart';
/// A Material Design "elevated button".
///
/// Use elevated buttons to add dimension to otherwise mostly flat
/// layouts, e.g. in long busy lists of content, or in wide
/// layouts, e.g. in long busy lists of content, or in wide
/// spaces. Avoid using elevated buttons on already-elevated content
/// such as dialogs or cards.
///
Expand All @@ -33,7 +33,7 @@ import 'theme_data.dart';
/// background is the [ButtonStyle.backgroundColor].
///
/// The elevated button's default style is defined by
/// [defaultStyleOf]. The style of this elevated button can be
/// [defaultStyleOf]. The style of this elevated button can be
/// overridden with its [style] parameter. The style of all elevated
/// buttons in a subtree can be overridden with the
/// [ElevatedButtonTheme], and the style of all of the elevated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import 'theme.dart';
/// overall [Theme]'s [ThemeData.elevatedButtonTheme].
///
/// The [style]'s properties override [ElevatedButton]'s default style,
/// i.e. the [ButtonStyle] returned by [ElevatedButton.defaultStyleOf]. Only
/// i.e. the [ButtonStyle] returned by [ElevatedButton.defaultStyleOf]. Only
/// the style's non-null property values or resolved non-null
/// [MaterialStateProperty] values are used.
///
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/material/flexible_space_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ class FlexibleSpaceBarSettings extends InheritedWidget {
///
/// This value is used by the [AppBar] to resolve
/// [AppBar.backgroundColor] against [MaterialState.scrolledUnder],
/// i.e. to enable apps to specify different colors when content
/// i.e. to enable apps to specify different colors when content
/// has been scrolled up and behind the app bar.
///
/// Null if the caller hasn't determined if the FlexibleSpaceBar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ enum _FloatingActionButtonType {
///
/// {@tool dartpad}
/// This example shows how to make an extended [FloatingActionButton] in a
/// [Scaffold], with a pink [backgroundColor], a thumbs up [Icon] and a
/// [Scaffold], with a pink [backgroundColor], a thumbs up [Icon] and a
/// [Text] label that reads "Approve".
///
/// ![](https://flutter.github.io/assets-for-api-docs/assets/material/floating_action_button_label.png)
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/material/ink_well.dart
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ class InkResponse extends StatelessWidget {
/// [MaterialState.pressed] triggers a ripple (an ink splash), per
/// the current Material Design spec. The [overlayColor] doesn't map
/// a state to [highlightColor] because a separate highlight is not
/// used by the current design guidelines. See
/// used by the current design guidelines. See
/// https://material.io/design/interaction/states.html#pressed
///
/// If the overlay color is null or resolves to null, then [focusColor],
Expand Down
Loading

0 comments on commit 0c2f7bc

Please sign in to comment.