[go: nahoru, domu]

Skip to content

Commit

Permalink
Remove superfluous words from comments (#119055)
Browse files Browse the repository at this point in the history
* Remove superfluous words from comments.

* Revert `win32_window.h`

Which seems to come from `gallery`
  • Loading branch information
asashour committed Jan 25, 2023
1 parent 0dd63d3 commit 1fd71de
Show file tree
Hide file tree
Showing 28 changed files with 38 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,15 @@ class CupertinoAdaptiveTextSelectionToolbar extends StatelessWidget {
final List<ContextMenuButtonItem>? buttonItems;

/// Returns a List of Widgets generated by turning [buttonItems] into the
/// the default context menu buttons for Cupertino on the current platform.
/// default context menu buttons for Cupertino on the current platform.
///
/// This is useful when building a text selection toolbar with the default
/// button appearance for the given platform, but where the toolbar and/or the
/// button actions and labels may be custom.
///
/// Does not build Material buttons. On non-Apple platforms, Cupertino buttons
/// will still be used, because the Cupertino library does not access the
/// Material library. To get the native-looking buttons on every platform, use
/// Material library. To get the native-looking buttons on every platform,
/// use [AdaptiveTextSelectionToolbar.getAdaptiveButtons] in the Material
/// library.
///
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/foundation/diagnostics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2561,7 +2561,7 @@ class DiagnosticsProperty<T> extends DiagnosticsNode {
/// The [showName], [showSeparator], [style], [missingIfNull], and [level]
/// arguments must not be null.
///
/// The [level] argument is just a suggestion and can be overridden if
/// The [level] argument is just a suggestion and can be overridden
/// if something else about the property causes it to have a lower or higher
/// level. For example, if calling `computeValue` throws an exception, [level]
/// will always return [DiagnosticLevel.error].
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/gestures/monodrag.dart
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer {
/// * [allowedButtonsFilter], which decides which button will be allowed.
GestureDragCancelCallback? onCancel;

/// The minimum distance an input pointer drag must have moved to
/// The minimum distance an input pointer drag must have moved
/// to be considered a fling gesture.
///
/// This value is typically compared with the distance traveled along the
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/material/action_chip.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import 'theme_data.dart';
/// Action chips can be tapped to trigger an action or show progress and
/// confirmation. For Material 3, a disabled state is supported for Action
/// chips and is specified with [onPressed] being null. For previous versions
/// of Material Design, it is recommended to remove the Action chip from the
/// of Material Design, it is recommended to remove the Action chip from
/// the interface entirely rather than display a disabled chip.
///
/// Action chips are displayed after primary content, such as below a card or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class AdaptiveTextSelectionToolbar extends StatelessWidget {
}

/// Returns a List of Widgets generated by turning [buttonItems] into the
/// the default context menu buttons for the current platform.
/// default context menu buttons for the current platform.
///
/// This is useful when building a text selection toolbar with the default
/// button appearance for the given platform, but where the toolbar and/or the
Expand Down
8 changes: 4 additions & 4 deletions packages/flutter/lib/src/material/app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class _PreferredAppBarSize extends Size {
///
/// If the app bar's [actions] contains [TextButton]s, they will not
/// be visible if their foreground (text) color is the same as the
/// the app bar's background color.
/// app bar's background color.
///
/// The default app bar [backgroundColor] is the overall theme's
/// [ColorScheme.primary] if the overall theme's brightness is
Expand Down Expand Up @@ -591,7 +591,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
/// See also:
///
/// * [actionsIconTheme], which defines the appearance of icons in
/// in the [actions] list.
/// the [actions] list.
final IconThemeData? iconTheme;

/// {@template flutter.material.appbar.actionsIconTheme}
Expand Down Expand Up @@ -746,7 +746,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
///
/// * [titleTextStyle], which overrides the default text style for the [title].
/// * [DefaultTextStyle], which overrides the default text style for all of the
/// the widgets in a subtree.
/// widgets in a subtree.
final TextStyle? toolbarTextStyle;

/// {@template flutter.material.appbar.titleTextStyle}
Expand All @@ -764,7 +764,7 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
/// [title], [leading], and [actions] widgets, also known as the
/// AppBar's "toolbar".
/// * [DefaultTextStyle], which overrides the default text style for all of the
/// the widgets in a subtree.
/// widgets in a subtree.
final TextStyle? titleTextStyle;

/// {@template flutter.material.appbar.systemOverlayStyle}
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/material/checkbox.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import 'toggleable.dart';
///
/// {@tool dartpad}
/// This example shows how you can override the default theme of
/// of a [Checkbox] with a [MaterialStateProperty].
/// a [Checkbox] with a [MaterialStateProperty].
/// In this example, the checkbox's color will be `Colors.blue` when the [Checkbox]
/// is being pressed, hovered, or focused. Otherwise, the checkbox's color will
/// be `Colors.red`.
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/material/drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const Duration _kBaseSettleDuration = Duration(milliseconds: 246);
/// {@end-tool}
///
/// An open drawer may be closed with a swipe to close gesture, pressing the
/// the escape key, by tapping the scrim, or by calling pop route function such as
/// escape key, by tapping the scrim, or by calling pop route function such as
/// [Navigator.pop]. For example a drawer item might close the drawer when tapped:
///
/// ```dart
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 @@ -116,7 +116,7 @@ class FlexibleSpaceBar extends StatefulWidget {
/// bottom-left or its center.
///
/// Typically this property is used to adjust how far the title is
/// is inset from the bottom-left and it is specified along with
/// inset from the bottom-left and it is specified along with
/// [centerTitle] false.
///
/// By default the value of this property is
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/material/range_slider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ class RangeSlider extends StatefulWidget {
/// the range slider thumb is hovered or dragged.
///
/// If this property is null, [RangeSlider] will use [activeColor] with
/// with an opacity of 0.12. If null, [SliderThemeData.overlayColor]
/// an opacity of 0.12. If null, [SliderThemeData.overlayColor]
/// will be used, otherwise defaults to [ColorScheme.primary] with
/// an opacity of 0.12.
final MaterialStateProperty<Color?>? overlayColor;
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/material/slider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ class Slider extends StatefulWidget {
/// the slider thumb is focused, hovered, or dragged.
///
/// If this property is null, [Slider] will use [activeColor] with
/// with an opacity of 0.12, If null, [SliderThemeData.overlayColor]
/// an opacity of 0.12, If null, [SliderThemeData.overlayColor]
/// will be used.
///
/// If that is also null, If [ThemeData.useMaterial3] is true,
Expand Down
4 changes: 2 additions & 2 deletions packages/flutter/lib/src/material/snack_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class SnackBarAction extends StatefulWidget {
/// [SnackBarThemeData.actionTextColor].
///
/// If [textColor] is a [MaterialStateColor], then the text color will be
/// be resolved against the set of [MaterialState]s that the action text
/// resolved against the set of [MaterialState]s that the action text
/// is in, thus allowing for different colors for states such as pressed,
/// hovered and others.
final Color? textColor;
Expand Down Expand Up @@ -366,7 +366,7 @@ class SnackBar extends StatefulWidget {
/// inverse surface.
///
/// If [closeIconColor] is a [MaterialStateColor], then the icon color will be
/// be resolved against the set of [MaterialState]s that the action text
/// resolved against the set of [MaterialState]s that the action text
/// is in, thus allowing for different colors for states such as pressed,
/// hovered and others.
final Color? closeIconColor;
Expand Down
6 changes: 3 additions & 3 deletions packages/flutter/lib/src/material/theme_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ class ThemeData with Diagnosticable {
/// to determine the current platform for the purpose of emulating the
/// platform behavior (e.g. scrolling or haptic effects). Widgets and render
/// objects at lower layers that try to emulate the underlying platform
/// platform can depend on [defaultTargetPlatform] directly, or may require
/// can depend on [defaultTargetPlatform] directly, or may require
/// that the target platform be provided as an argument. The
/// [dart:io.Platform] object should only be used directly when it's critical
/// to actually know the current platform, without any overrides possible (for
Expand Down Expand Up @@ -1591,7 +1591,7 @@ class ThemeData with Diagnosticable {
///
/// Apps should migrate uses of this property to the theme's [colorScheme]
/// [ColorScheme.secondary] color. In cases where a color is needed that
/// that contrasts well with the secondary color [ColorScheme.onSecondary]
/// contrasts well with the secondary color [ColorScheme.onSecondary]
/// can be used.
@Deprecated(
'Use colorScheme.secondary instead. '
Expand Down Expand Up @@ -2539,7 +2539,7 @@ class ThemeData with Diagnosticable {
/// styles.
///
/// In the most basic case, [ThemeData]'s `cupertinoOverrideTheme` is null and
/// and descendant Cupertino widgets' styling is derived from the Material theme.
/// descendant Cupertino widgets' styling is derived from the Material theme.
///
/// To override individual parts of the Material-derived Cupertino styling,
/// `cupertinoOverrideTheme`'s construction parameters can be used.
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/painting/box_shadow.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class BoxShadow extends ui.Shadow {

/// Linearly interpolate between two box shadows.
///
/// If either box shadow is null, this function linearly interpolates from a
/// If either box shadow is null, this function linearly interpolates from
/// a box shadow that matches the other box shadow in color but has a zero
/// offset and a zero blurRadius.
///
Expand Down
4 changes: 2 additions & 2 deletions packages/flutter/lib/src/painting/gradient.dart
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ class LinearGradient extends Gradient {

/// Linearly interpolate between two [LinearGradient]s.
///
/// If either gradient is null, this function linearly interpolates from a
/// If either gradient is null, this function linearly interpolates from
/// a gradient that matches the other gradient in [begin], [end], [stops] and
/// [tileMode] and with the same [colors] but transparent (using [scale]).
///
Expand Down Expand Up @@ -747,7 +747,7 @@ class RadialGradient extends Gradient {

/// Linearly interpolate between two [RadialGradient]s.
///
/// If either gradient is null, this function linearly interpolates from a
/// If either gradient is null, this function linearly interpolates from
/// a gradient that matches the other gradient in [center], [radius], [stops] and
/// [tileMode] and with the same [colors] but transparent (using [scale]).
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class SliverMultiBoxAdaptorParentData extends SliverLogicalParentData with Conta
/// been laid out during that layout pass.
/// * Children cannot be added except during a call to [childManager], and
/// then only if there is no child corresponding to that index (or the child
/// child corresponding to that index was first removed).
/// corresponding to that index was first removed).
///
/// See also:
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ class DraggableScrollableSheet extends StatefulWidget {
/// The initial fractional value of the parent container's height to use when
/// displaying the widget.
///
/// Rebuilding the sheet with a new [initialChildSize] will only move the
/// Rebuilding the sheet with a new [initialChildSize] will only move
/// the sheet to the new value if the sheet has not yet been dragged since it
/// was first built or since the last call to [DraggableScrollableActuator.reset].
///
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/widgets/editable_text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3966,7 +3966,7 @@ class EditableTextState extends State<EditableText> with AutomaticKeepAliveClien
// `x ∉ getTextBoundaryAt(x)`. In case `caretOffset` points to one such
// control character, we define that these control characters themselves are
// still part of the previous line, but also exclude them from the
// the line boundary range since they're non-printing. IOW, no additional
// line boundary range since they're non-printing. IOW, no additional
// processing needed since the LineBoundary class does exactly that.
return forward
? TextPosition(offset: textBoundary.getTrailingTextBoundaryAt(caretOffset) ?? _value.text.length, affinity: TextAffinity.upstream)
Expand Down
4 changes: 2 additions & 2 deletions packages/flutter/lib/src/widgets/localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ class _LocalizationsScope extends InheritedWidget {
/// }
/// ```
///
/// Each delegate can be viewed as a factory for objects that encapsulate a
/// a set of localized resources. These objects are retrieved with
/// Each delegate can be viewed as a factory for objects that encapsulate a set
/// of localized resources. These objects are retrieved with
/// by runtime type with [Localizations.of].
///
/// The [WidgetsApp] class creates a [Localizations] widget so most apps
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/widgets/performance_overlay.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class PerformanceOverlay extends LeafRenderObjectWidget {
/// For example, if you want a trace of all pictures that could not be
/// rendered by the rasterizer within the frame boundary (and hence caused
/// jank), specify 1. Specifying 2 will trace all pictures that took more
/// more than 2 frame intervals to render. Adjust this value to only capture
/// than 2 frame intervals to render. Adjust this value to only capture
/// the particularly expensive pictures while skipping the others. Specifying
/// 0 disables all capture.
///
Expand Down
4 changes: 2 additions & 2 deletions packages/flutter/lib/src/widgets/scroll_physics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,8 @@ class ScrollPhysics {
);
}

/// The minimum distance an input pointer drag must have moved to
/// to be considered a scroll fling gesture.
/// The minimum distance an input pointer drag must have moved to be
/// considered a scroll fling gesture.
///
/// This value is typically compared with the distance traveled along the
/// scrolling axis.
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/test/material/tabs_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ void main() {
}
// End the fling by reversing direction. This should cause not cause
// a change to the selected tab, everything should just settle back to
// to where it started.
// where it started.
for (int index = 0; index > 50; index += 1) {
await gesture.moveBy(const Offset(10.0, 0.0));
await tester.pump(const Duration(milliseconds: 1));
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/test/material/text_field_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11039,7 +11039,7 @@ void main() {
expect(
tester.getSize(find.byType(TextField)),
// When the strut fontSize is larger than a provided TextStyle, the
// the strut's height takes precedence.
// strut's height takes precedence.
const Size(800, 78),
);
},
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/test/physics/newton_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void main() {
expect(friction.dx(1.0), moreOrLessEquals(endVelocity));

// Same scenario as above except that the velocities are
// are negative.
// negative.
startPosition = 1000.0;
startVelocity = -500.0;
f = FrictionSimulation(0.025, 1000.0, -500.0);
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter_tools/lib/src/base/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ List<String> _wrapTextAsLines(String text, {
final int effectiveLength = math.max(columnWidth - start, kMinColumnWidth);
for (final String line in text.split('\n')) {
// If the line is short enough, even with ANSI codes, then we can just add
// add it and move on.
// it and move on.
if (line.length <= effectiveLength || !shouldWrap) {
result.add(line);
continue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ class Parser {
parsingStack.addAll(grammarRule.reversed);

// For tree construction, add nodes to the parent until the parent has all
// all the children it is expecting.
// the children it is expecting.
parent.children.add(node);
if (parent.isFull) {
treeTraversalStack.removeLast();
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter_tools/lib/src/template.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class Template {
from: templateFiles[entity]!.absolute.path);
if (relativePath.contains(templateExtension)) {
// If '.tmpl' appears anywhere within the path of this entity, it is
// is a candidate for rendering. This catches cases where the folder
// a candidate for rendering. This catches cases where the folder
// itself is a template.
_templateFilePaths[relativePath] = fileSystem.path.absolute(entity.path);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter_tools/lib/src/test/web_test_compiler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class WebTestCompiler {
LanguageVersion languageVersion = LanguageVersion(2, 8);
late final String platformDillName;

// TODO(zanderso): to support autodetect this would need to partition the source code into a
// TODO(zanderso): to support autodetect this would need to partition the source code into
// a sound and unsound set and perform separate compilations
final List<String> extraFrontEndOptions = List<String>.of(buildInfo.extraFrontEndOptions);
if (buildInfo.nullSafetyMode == NullSafetyMode.unsound || buildInfo.nullSafetyMode == NullSafetyMode.autodetect) {
Expand Down

0 comments on commit 1fd71de

Please sign in to comment.