Remove superfluous words. (#119008)
* Remove superfluous words. * Update packages/flutter/lib/src/widgets/slotted_render_object_widget.dart Co-authored-by: Michael Goderbauer <goderbauer@google.com>
This commit is contained in:
@@ -91,7 +91,7 @@ class FallbackFocusNode {
|
|||||||
///
|
///
|
||||||
/// A global registrar like [FallbackKeyEventRegistrar] is almost always needed
|
/// A global registrar like [FallbackKeyEventRegistrar] is almost always needed
|
||||||
/// when patching [KeyEventManager.keyMessageHandler]. This is because
|
/// 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
|
/// [KeyEventManager.keyMessageHandler] can only be patched once, and can not
|
||||||
/// be unpatched. Therefore [FallbackFocus] must not directly interact with
|
/// be unpatched. Therefore [FallbackFocus] must not directly interact with
|
||||||
/// [KeyEventManager.keyMessageHandler], but through a separate registrar that
|
/// [KeyEventManager.keyMessageHandler], but through a separate registrar that
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ class CupertinoSwitch extends StatefulWidget {
|
|||||||
|
|
||||||
/// The color to use for the focus highlight for keyboard interactions.
|
/// 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;
|
final Color? focusColor;
|
||||||
|
|
||||||
/// {@template flutter.cupertino.CupertinoSwitch.applyTheme}
|
/// {@template flutter.cupertino.CupertinoSwitch.applyTheme}
|
||||||
|
|||||||
@@ -44,11 +44,11 @@ const bool _kDebugMenus = false;
|
|||||||
// has a submenu.
|
// has a submenu.
|
||||||
const double _kDefaultSubmenuIconSize = 24;
|
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.
|
// shortcut label in a _MenuItemLabel.
|
||||||
const double _kLabelItemDefaultSpacing = 12;
|
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.
|
// shortcut label in a _MenuItemLabel.
|
||||||
const double _kLabelItemMinSpacing = 4;
|
const double _kLabelItemMinSpacing = 4;
|
||||||
|
|
||||||
|
|||||||
@@ -595,7 +595,7 @@ class _NavigationDestinationInfo extends InheritedWidget {
|
|||||||
/// when label behavior is [NavigationDestinationLabelBehavior.onlyShowSelected].
|
/// when label behavior is [NavigationDestinationLabelBehavior.onlyShowSelected].
|
||||||
final int selectedIndex;
|
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
|
/// This is required for semantics, so that each destination can have a label
|
||||||
/// "Tab 1 of 4", for example.
|
/// "Tab 1 of 4", for example.
|
||||||
|
|||||||
@@ -488,7 +488,7 @@ class _NavigationDrawerDestinationInfo extends InheritedWidget {
|
|||||||
/// "Tab 1 of 3", for example.
|
/// "Tab 1 of 3", for example.
|
||||||
final int index;
|
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
|
/// This is required for semantics, so that each destination can have a label
|
||||||
/// "Tab 1 of 4", for example.
|
/// "Tab 1 of 4", for example.
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ class BorderSide with Diagnosticable {
|
|||||||
///
|
///
|
||||||
/// Values typically range from -1.0 ([strokeAlignInside], inside border,
|
/// Values typically range from -1.0 ([strokeAlignInside], inside border,
|
||||||
/// default) to 1.0 ([strokeAlignOutside], outside border), without any
|
/// 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
|
/// A value of 0 ([strokeAlignCenter]) will center the border on the edge
|
||||||
/// of the widget.
|
/// of the widget.
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ KeyDataTransitMode? debugKeyEventSimulatorTransitModeOverride;
|
|||||||
|
|
||||||
/// Profile and print statistics on Platform Channel usage.
|
/// 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
|
/// printed out periodically to the console and Timeline events will show the
|
||||||
/// time between sending and receiving a message (encoding and decoding time
|
/// time between sending and receiving a message (encoding and decoding time
|
||||||
/// excluded).
|
/// excluded).
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ abstract class TextEditingDelta with Diagnosticable {
|
|||||||
// 'world'{replacementDestinationEnd, replacementDestinationStart + replacementSourceEnd}
|
// 'world'{replacementDestinationEnd, replacementDestinationStart + replacementSourceEnd}
|
||||||
// can be considered an insertion. In this case we inserted 'd'.
|
// 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
|
// 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'
|
// 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
|
// was replaced with 'worl' at range (0,5). Here we can check if the text found
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ class DisplayFeatureSubScreen extends StatelessWidget {
|
|||||||
|
|
||||||
/// Returns the areas of the screen that are obstructed by display features.
|
/// 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].
|
/// not 0 or the `state` is [DisplayFeatureState.postureHalfOpened].
|
||||||
static Iterable<Rect> avoidBounds(MediaQueryData mediaQuery) {
|
static Iterable<Rect> avoidBounds(MediaQueryData mediaQuery) {
|
||||||
return mediaQuery.displayFeatures
|
return mediaQuery.displayFeatures
|
||||||
|
|||||||
@@ -506,7 +506,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
|
|||||||
/// is not pending or users end their gestures.
|
/// is not pending or users end their gestures.
|
||||||
void _triggerSelectionEndEdgeUpdate() {
|
void _triggerSelectionEndEdgeUpdate() {
|
||||||
// This method can be called when the drag is not in progress. This can
|
// 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 selection area scheduled a selection update for the next frame, but
|
||||||
// the drag is lifted before the scheduled selection update is run.
|
// the drag is lifted before the scheduled selection update is run.
|
||||||
if (_scheduledSelectionEndEdgeUpdate || !_userDraggingSelectionEnd) {
|
if (_scheduledSelectionEndEdgeUpdate || !_userDraggingSelectionEnd) {
|
||||||
@@ -559,7 +559,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
|
|||||||
/// is not pending or users end their gestures.
|
/// is not pending or users end their gestures.
|
||||||
void _triggerSelectionStartEdgeUpdate() {
|
void _triggerSelectionStartEdgeUpdate() {
|
||||||
// This method can be called when the drag is not in progress. This can
|
// 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 selection area scheduled a selection update for the next frame, but
|
||||||
// the drag is lifted before the scheduled selection update is run.
|
// the drag is lifted before the scheduled selection update is run.
|
||||||
if (_scheduledSelectionStartEdgeUpdate || !_userDraggingSelectionStart) {
|
if (_scheduledSelectionStartEdgeUpdate || !_userDraggingSelectionStart) {
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ mixin SlottedContainerRenderObjectMixin<S> on RenderBox {
|
|||||||
/// currently occupied by a child to obtain a name for that slot for debug
|
/// currently occupied by a child to obtain a name for that slot for debug
|
||||||
/// outputs.
|
/// 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.
|
/// [Enum] value and `toString` if it is not.
|
||||||
@protected
|
@protected
|
||||||
String debugNameForSlot(S slot) {
|
String debugNameForSlot(S slot) {
|
||||||
|
|||||||
@@ -459,7 +459,7 @@ void main() {
|
|||||||
expect(find.text('Select all'), findsOneWidget);
|
expect(find.text('Select all'), findsOneWidget);
|
||||||
expect(find.byType(IconButton), 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.
|
// any overflow.
|
||||||
await tester.tap(find.text('Select all'));
|
await tester.tap(find.text('Select all'));
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
|
|||||||
@@ -1088,7 +1088,7 @@ void main() {
|
|||||||
expect(paintCount, 1);
|
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;
|
bool hovered = false;
|
||||||
|
|
||||||
final TestGesture gesture = await tester.createGesture(kind: PointerDeviceKind.mouse);
|
final TestGesture gesture = await tester.createGesture(kind: PointerDeviceKind.mouse);
|
||||||
|
|||||||
@@ -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
|
/// To enter text into other widgets (e.g. a custom widget that maintains a
|
||||||
/// TextInputConnection the way that a [EditableText] does), first ensure that
|
/// 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
|
/// then call `testTextInput.enterText` directly (see
|
||||||
/// [TestTextInput.enterText]).
|
/// [TestTextInput.enterText]).
|
||||||
Future<void> enterText(Finder finder, String text) async {
|
Future<void> enterText(Finder finder, String text) async {
|
||||||
|
|||||||
@@ -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.
|
// 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
|
// 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(
|
fileCandidates.add(
|
||||||
getBundleDirectory(project)
|
getBundleDirectory(project)
|
||||||
.childDirectory('${buildInfo.lowerCasedFlavor}${camelCase('_${buildInfo.modeName}')}')
|
.childDirectory('${buildInfo.lowerCasedFlavor}${camelCase('_${buildInfo.modeName}')}')
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ Future<SendPort> _helperIsolateSendPort = () async {
|
|||||||
throw UnsupportedError('Unsupported message type: ${data.runtimeType}');
|
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);
|
sendPort.send(helperReceivePort.sendPort);
|
||||||
}, receivePort.sendPort);
|
}, receivePort.sendPort);
|
||||||
|
|
||||||
|
|||||||
@@ -597,7 +597,7 @@ void main() {
|
|||||||
expect((await response.read().toList()).first, source.readAsBytesSync());
|
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'))
|
final File source = globals.fs.file(globals.fs.path.join('build', 'flutter_assets', 'foo'))
|
||||||
..createSync(recursive: true)
|
..createSync(recursive: true)
|
||||||
..writeAsBytesSync(List<int>.filled(100, 0));
|
..writeAsBytesSync(List<int>.filled(100, 0));
|
||||||
|
|||||||
Reference in New Issue
Block a user