From c35efdaa6854330b28d3968f4ec8c073e5c49252 Mon Sep 17 00:00:00 2001 From: Ahmed Ashour Date: Tue, 24 Jan 2023 02:57:00 +0100 Subject: [PATCH] Remove superfluous words. (#119008) * Remove superfluous words. * Update packages/flutter/lib/src/widgets/slotted_render_object_widget.dart Co-authored-by: Michael Goderbauer --- .../lib/widgets/hardware_keyboard/key_event_manager.0.dart | 2 +- packages/flutter/lib/src/cupertino/switch.dart | 2 +- packages/flutter/lib/src/material/menu_anchor.dart | 4 ++-- packages/flutter/lib/src/material/navigation_bar.dart | 2 +- packages/flutter/lib/src/material/navigation_drawer.dart | 2 +- packages/flutter/lib/src/painting/borders.dart | 2 +- packages/flutter/lib/src/services/debug.dart | 2 +- packages/flutter/lib/src/services/text_editing_delta.dart | 2 +- .../flutter/lib/src/widgets/display_feature_sub_screen.dart | 2 +- packages/flutter/lib/src/widgets/selectable_region.dart | 4 ++-- .../flutter/lib/src/widgets/slotted_render_object_widget.dart | 2 +- packages/flutter/test/material/text_selection_test.dart | 2 +- packages/flutter/test/widgets/mouse_region_test.dart | 2 +- packages/flutter_test/lib/src/widget_tester.dart | 2 +- packages/flutter_tools/lib/src/android/gradle.dart | 2 +- .../templates/plugin_ffi/lib/projectName.dart.tmpl | 2 +- .../flutter_tools/test/general.shard/web/devfs_web_test.dart | 2 +- 17 files changed, 19 insertions(+), 19 deletions(-) diff --git a/examples/api/lib/widgets/hardware_keyboard/key_event_manager.0.dart b/examples/api/lib/widgets/hardware_keyboard/key_event_manager.0.dart index 2d16609a86..e899078f03 100644 --- a/examples/api/lib/widgets/hardware_keyboard/key_event_manager.0.dart +++ b/examples/api/lib/widgets/hardware_keyboard/key_event_manager.0.dart @@ -91,7 +91,7 @@ class FallbackFocusNode { /// /// A global registrar like [FallbackKeyEventRegistrar] is almost always needed /// when patching [KeyEventManager.keyMessageHandler]. This is because -/// [FallbackFocus] will add and and remove callbacks constantly, but +/// [FallbackFocus] will add and remove callbacks constantly, but /// [KeyEventManager.keyMessageHandler] can only be patched once, and can not /// be unpatched. Therefore [FallbackFocus] must not directly interact with /// [KeyEventManager.keyMessageHandler], but through a separate registrar that diff --git a/packages/flutter/lib/src/cupertino/switch.dart b/packages/flutter/lib/src/cupertino/switch.dart index e7d5a27de7..0d12795677 100644 --- a/packages/flutter/lib/src/cupertino/switch.dart +++ b/packages/flutter/lib/src/cupertino/switch.dart @@ -127,7 +127,7 @@ class CupertinoSwitch extends StatefulWidget { /// The color to use for the focus highlight for keyboard interactions. /// - /// Defaults to a a slightly transparent [activeColor]. + /// Defaults to a slightly transparent [activeColor]. final Color? focusColor; /// {@template flutter.cupertino.CupertinoSwitch.applyTheme} diff --git a/packages/flutter/lib/src/material/menu_anchor.dart b/packages/flutter/lib/src/material/menu_anchor.dart index b5c27b12df..1cdd3c4e3a 100644 --- a/packages/flutter/lib/src/material/menu_anchor.dart +++ b/packages/flutter/lib/src/material/menu_anchor.dart @@ -44,11 +44,11 @@ const bool _kDebugMenus = false; // has a submenu. const double _kDefaultSubmenuIconSize = 24; -// The default spacing between the the leading icon, label, trailing icon, and +// The default spacing between the leading icon, label, trailing icon, and // shortcut label in a _MenuItemLabel. const double _kLabelItemDefaultSpacing = 12; -// The minimum spacing between the the leading icon, label, trailing icon, and +// The minimum spacing between the leading icon, label, trailing icon, and // shortcut label in a _MenuItemLabel. const double _kLabelItemMinSpacing = 4; diff --git a/packages/flutter/lib/src/material/navigation_bar.dart b/packages/flutter/lib/src/material/navigation_bar.dart index fd4a2d2665..f338a7cee0 100644 --- a/packages/flutter/lib/src/material/navigation_bar.dart +++ b/packages/flutter/lib/src/material/navigation_bar.dart @@ -595,7 +595,7 @@ class _NavigationDestinationInfo extends InheritedWidget { /// when label behavior is [NavigationDestinationLabelBehavior.onlyShowSelected]. final int selectedIndex; - /// How many total destinations are are in this navigation bar. + /// How many total destinations are in this navigation bar. /// /// This is required for semantics, so that each destination can have a label /// "Tab 1 of 4", for example. diff --git a/packages/flutter/lib/src/material/navigation_drawer.dart b/packages/flutter/lib/src/material/navigation_drawer.dart index 69994a01ad..6bcaa7bc50 100644 --- a/packages/flutter/lib/src/material/navigation_drawer.dart +++ b/packages/flutter/lib/src/material/navigation_drawer.dart @@ -488,7 +488,7 @@ class _NavigationDrawerDestinationInfo extends InheritedWidget { /// "Tab 1 of 3", for example. final int index; - /// How many total destinations are are in this navigation drawer. + /// How many total destinations are in this navigation drawer. /// /// This is required for semantics, so that each destination can have a label /// "Tab 1 of 4", for example. diff --git a/packages/flutter/lib/src/painting/borders.dart b/packages/flutter/lib/src/painting/borders.dart index 17f217c453..e1100cb547 100644 --- a/packages/flutter/lib/src/painting/borders.dart +++ b/packages/flutter/lib/src/painting/borders.dart @@ -130,7 +130,7 @@ class BorderSide with Diagnosticable { /// /// Values typically range from -1.0 ([strokeAlignInside], inside border, /// default) to 1.0 ([strokeAlignOutside], outside border), without any - /// bound constraints (e.g., a value of -2.0 is is not typical, but allowed). + /// bound constraints (e.g., a value of -2.0 is not typical, but allowed). /// A value of 0 ([strokeAlignCenter]) will center the border on the edge /// of the widget. /// diff --git a/packages/flutter/lib/src/services/debug.dart b/packages/flutter/lib/src/services/debug.dart index 68f667b570..b3581119f8 100644 --- a/packages/flutter/lib/src/services/debug.dart +++ b/packages/flutter/lib/src/services/debug.dart @@ -17,7 +17,7 @@ KeyDataTransitMode? debugKeyEventSimulatorTransitModeOverride; /// Profile and print statistics on Platform Channel usage. /// -/// When this is is true statistics about the usage of Platform Channels will be +/// When this is true statistics about the usage of Platform Channels will be /// printed out periodically to the console and Timeline events will show the /// time between sending and receiving a message (encoding and decoding time /// excluded). diff --git a/packages/flutter/lib/src/services/text_editing_delta.dart b/packages/flutter/lib/src/services/text_editing_delta.dart index 3357a7da34..4f4baac47f 100644 --- a/packages/flutter/lib/src/services/text_editing_delta.dart +++ b/packages/flutter/lib/src/services/text_editing_delta.dart @@ -93,7 +93,7 @@ abstract class TextEditingDelta with Diagnosticable { // 'world'{replacementDestinationEnd, replacementDestinationStart + replacementSourceEnd} // can be considered an insertion. In this case we inserted 'd'. // - // Similarly for a a deletion, say we are currently composing the word: 'worl'. + // Similarly for a deletion, say we are currently composing the word: 'worl'. // Our current state is 'world|' with the cursor at the end of 'd'. If we // press backspace to delete the character 'd', the platform will tell us 'world' // was replaced with 'worl' at range (0,5). Here we can check if the text found diff --git a/packages/flutter/lib/src/widgets/display_feature_sub_screen.dart b/packages/flutter/lib/src/widgets/display_feature_sub_screen.dart index be2465dfc8..c502a269f0 100644 --- a/packages/flutter/lib/src/widgets/display_feature_sub_screen.dart +++ b/packages/flutter/lib/src/widgets/display_feature_sub_screen.dart @@ -125,7 +125,7 @@ class DisplayFeatureSubScreen extends StatelessWidget { /// Returns the areas of the screen that are obstructed by display features. /// - /// A [DisplayFeature] obstructs the screen when the the area it occupies is + /// A [DisplayFeature] obstructs the screen when the area it occupies is /// not 0 or the `state` is [DisplayFeatureState.postureHalfOpened]. static Iterable avoidBounds(MediaQueryData mediaQuery) { return mediaQuery.displayFeatures diff --git a/packages/flutter/lib/src/widgets/selectable_region.dart b/packages/flutter/lib/src/widgets/selectable_region.dart index a12be125aa..3d68ba9372 100644 --- a/packages/flutter/lib/src/widgets/selectable_region.dart +++ b/packages/flutter/lib/src/widgets/selectable_region.dart @@ -506,7 +506,7 @@ class SelectableRegionState extends State with TextSelectionDe /// is not pending or users end their gestures. void _triggerSelectionEndEdgeUpdate() { // This method can be called when the drag is not in progress. This can - // happen if the the child scrollable returns SelectionResult.pending, and + // happen if the child scrollable returns SelectionResult.pending, and // the selection area scheduled a selection update for the next frame, but // the drag is lifted before the scheduled selection update is run. if (_scheduledSelectionEndEdgeUpdate || !_userDraggingSelectionEnd) { @@ -559,7 +559,7 @@ class SelectableRegionState extends State with TextSelectionDe /// is not pending or users end their gestures. void _triggerSelectionStartEdgeUpdate() { // This method can be called when the drag is not in progress. This can - // happen if the the child scrollable returns SelectionResult.pending, and + // happen if the child scrollable returns SelectionResult.pending, and // the selection area scheduled a selection update for the next frame, but // the drag is lifted before the scheduled selection update is run. if (_scheduledSelectionStartEdgeUpdate || !_userDraggingSelectionStart) { diff --git a/packages/flutter/lib/src/widgets/slotted_render_object_widget.dart b/packages/flutter/lib/src/widgets/slotted_render_object_widget.dart index 7a942aafb7..d3bd3391d9 100644 --- a/packages/flutter/lib/src/widgets/slotted_render_object_widget.dart +++ b/packages/flutter/lib/src/widgets/slotted_render_object_widget.dart @@ -116,7 +116,7 @@ mixin SlottedContainerRenderObjectMixin on RenderBox { /// currently occupied by a child to obtain a name for that slot for debug /// outputs. /// - /// The default implementation calls [EnumName.name] on `slot` it it is an + /// The default implementation calls [EnumName.name] on `slot` if it is an /// [Enum] value and `toString` if it is not. @protected String debugNameForSlot(S slot) { diff --git a/packages/flutter/test/material/text_selection_test.dart b/packages/flutter/test/material/text_selection_test.dart index 2bd8d97842..555fe8f082 100644 --- a/packages/flutter/test/material/text_selection_test.dart +++ b/packages/flutter/test/material/text_selection_test.dart @@ -459,7 +459,7 @@ void main() { expect(find.text('Select all'), findsOneWidget); expect(find.byType(IconButton), findsOneWidget); - // Tapping Select all changes the menu items so that there is no no longer + // Tapping Select all changes the menu items so that there is no longer // any overflow. await tester.tap(find.text('Select all')); await tester.pumpAndSettle(); diff --git a/packages/flutter/test/widgets/mouse_region_test.dart b/packages/flutter/test/widgets/mouse_region_test.dart index d22d5936bb..91e3b3e6e8 100644 --- a/packages/flutter/test/widgets/mouse_region_test.dart +++ b/packages/flutter/test/widgets/mouse_region_test.dart @@ -1088,7 +1088,7 @@ void main() { expect(paintCount, 1); }); - testWidgets('A MouseRegion mounted under the pointer should should take effect in the next postframe', (WidgetTester tester) async { + testWidgets('A MouseRegion mounted under the pointer should take effect in the next postframe', (WidgetTester tester) async { bool hovered = false; final TestGesture gesture = await tester.createGesture(kind: PointerDeviceKind.mouse); diff --git a/packages/flutter_test/lib/src/widget_tester.dart b/packages/flutter_test/lib/src/widget_tester.dart index d837c2752a..517a025647 100644 --- a/packages/flutter_test/lib/src/widget_tester.dart +++ b/packages/flutter_test/lib/src/widget_tester.dart @@ -1100,7 +1100,7 @@ class WidgetTester extends WidgetController implements HitTestDispatcher, Ticker /// /// To enter text into other widgets (e.g. a custom widget that maintains a /// TextInputConnection the way that a [EditableText] does), first ensure that - /// that widget has an open connection (e.g. by using [tap] to to focus it), + /// that widget has an open connection (e.g. by using [tap] to focus it), /// then call `testTextInput.enterText` directly (see /// [TestTextInput.enterText]). Future enterText(Finder finder, String text) async { diff --git a/packages/flutter_tools/lib/src/android/gradle.dart b/packages/flutter_tools/lib/src/android/gradle.dart index c94b29a7da..dbcfea4d0a 100644 --- a/packages/flutter_tools/lib/src/android/gradle.dart +++ b/packages/flutter_tools/lib/src/android/gradle.dart @@ -870,7 +870,7 @@ File findBundleFile(FlutterProject project, BuildInfo buildInfo, Logger logger, // The Android Gradle plugin 3.5.0 adds the flavor name to file name. // For example: In release mode, if the flavor name is `foo_bar`, then - // the file name name is `app-foo_bar-release.aab`. + // the file name is `app-foo_bar-release.aab`. fileCandidates.add( getBundleDirectory(project) .childDirectory('${buildInfo.lowerCasedFlavor}${camelCase('_${buildInfo.modeName}')}') diff --git a/packages/flutter_tools/templates/plugin_ffi/lib/projectName.dart.tmpl b/packages/flutter_tools/templates/plugin_ffi/lib/projectName.dart.tmpl index 43e49f988b..4a7cabc595 100644 --- a/packages/flutter_tools/templates/plugin_ffi/lib/projectName.dart.tmpl +++ b/packages/flutter_tools/templates/plugin_ffi/lib/projectName.dart.tmpl @@ -129,7 +129,7 @@ Future _helperIsolateSendPort = () async { throw UnsupportedError('Unsupported message type: ${data.runtimeType}'); }); - // Send the the port to the main isolate on which we can receive requests. + // Send the port to the main isolate on which we can receive requests. sendPort.send(helperReceivePort.sendPort); }, receivePort.sendPort); diff --git a/packages/flutter_tools/test/general.shard/web/devfs_web_test.dart b/packages/flutter_tools/test/general.shard/web/devfs_web_test.dart index 37ece5b8c4..163ac50f77 100644 --- a/packages/flutter_tools/test/general.shard/web/devfs_web_test.dart +++ b/packages/flutter_tools/test/general.shard/web/devfs_web_test.dart @@ -597,7 +597,7 @@ void main() { expect((await response.read().toList()).first, source.readAsBytesSync()); })); - test('serves asset files files from in filesystem with unknown mime type', () => testbed.run(() async { + test('serves asset files from in filesystem with unknown mime type', () => testbed.run(() async { final File source = globals.fs.file(globals.fs.path.join('build', 'flutter_assets', 'foo')) ..createSync(recursive: true) ..writeAsBytesSync(List.filled(100, 0));