Fixed few typos (#141543)

I continued [my mission](https://github.com/flutter/flutter/pull/141431) to find as many typos as I could. This time it's a smaller set than before.

There is no need for issues since it's a typo fix.
This commit is contained in:
Anis Alibegić 2024-01-16 22:40:08 +01:00 committed by GitHub
parent b9aba43b44
commit e063f56832
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 52 additions and 52 deletions

View file

@ -26,7 +26,7 @@ body:
label: PR Link
description: >-
Link to an open PR that cherrypick's this into the target release branch.
The current branches can be found under release-caniddate-branch.version for [beta](https://github.com/flutter/flutter/blob/beta/bin/internal/release-candidate-branch.version) and [stable](https://github.com/flutter/flutter/blob/stable/bin/internal/release-candidate-branch.version)
The current branches can be found under release-candidate-branch.version for [beta](https://github.com/flutter/flutter/blob/beta/bin/internal/release-candidate-branch.version) and [stable](https://github.com/flutter/flutter/blob/stable/bin/internal/release-candidate-branch.version)
validations:
required: true
- type: textarea

View file

@ -70,7 +70,7 @@ class _StopwatchVisitor extends RecursiveAstVisitor<void> {
final Map<ClassElement, bool> _isStopwatchClassElementCache = <ClassElement, bool>{};
bool _checkIfImplementsStopwatchRecurively(ClassElement classElement) {
bool _checkIfImplementsStopwatchRecursively(ClassElement classElement) {
if (classElement.library.isDartCore) {
return classElement.name == 'Stopwatch';
}
@ -80,11 +80,11 @@ class _StopwatchVisitor extends RecursiveAstVisitor<void> {
});
}
// The cached version, call this method instead of _checkIfImplementsStopwatchRecurively.
// The cached version, call this method instead of _checkIfImplementsStopwatchRecursively.
bool _implementsStopwatch(ClassElement classElement) {
return classElement.library.isDartCore
? classElement.name == 'Stopwatch'
:_isStopwatchClassElementCache.putIfAbsent(classElement, () => _checkIfImplementsStopwatchRecurively(classElement));
:_isStopwatchClassElementCache.putIfAbsent(classElement, () => _checkIfImplementsStopwatchRecursively(classElement));
}
bool _isInternal(LibraryElement libraryElement) {

View file

@ -8,7 +8,7 @@ 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.
/// run occasionally. It was created since iana.org was found to be flaky.
///
/// To execute: dart gen_subtag_registry.dart > language_subtag_registry.dart
Future<void> main() async {

View file

@ -393,7 +393,7 @@ class Checkbox extends StatefulWidget {
final bool isError;
/// {@template flutter.material.checkbox.semanticLabel}
/// The semantic label for the checkobox that will be announced by screen readers.
/// The semantic label for the checkbox that will be announced by screen readers.
///
/// This is announced in accessibility modes (e.g TalkBack/VoiceOver).
///

View file

@ -33,7 +33,7 @@ const double _kFinalLabelScale = 0.75;
// The default duration for hint fade in/out transitions.
//
// Animating hint is not mentioned in the Material specification.
// The animation is kept for backard compatibility and a short duration
// The animation is kept for backward compatibility and a short duration
// is used to mitigate the UX impact.
const Duration _kHintFadeTransitionDuration = Duration(milliseconds: 20);

View file

@ -1531,7 +1531,7 @@ mixin BaseSliderTrackShape {
final double trackTop = offset.dy + (parentBox.size.height - trackHeight) / 2;
final double trackRight = trackLeft + parentBox.size.width - math.max(thumbWidth, overlayWidth);
final double trackBottom = trackTop + trackHeight;
// If the parentBox'size less than slider's size the trackRight will be less than trackLeft, so switch them.
// If the parentBox's size less than slider's size the trackRight will be less than trackLeft, so switch them.
return Rect.fromLTRB(math.min(trackLeft, trackRight), trackTop, math.max(trackLeft, trackRight), trackBottom);
}
}
@ -1830,7 +1830,7 @@ mixin BaseRangeSliderTrackShape {
final double trackTop = offset.dy + (parentBox.size.height - trackHeight) / 2;
final double trackRight = trackLeft + parentBox.size.width - math.max(thumbWidth, overlayWidth);
final double trackBottom = trackTop + trackHeight;
// If the parentBox'size less than slider's size the trackRight will be less than trackLeft, so switch them.
// If the parentBox's size less than slider's size the trackRight will be less than trackLeft, so switch them.
return Rect.fromLTRB(math.min(trackLeft, trackRight), trackTop, math.max(trackLeft, trackRight), trackBottom);
}
}

View file

@ -116,7 +116,7 @@ class SnackBarAction extends StatefulWidget {
/// [SnackBarAction] is dismissed.
final Color? disabledTextColor;
/// The button diabled background color. This color is shown after the
/// The button disabled background color. This color is shown after the
/// [SnackBarAction] is dismissed.
///
/// If not provided, defaults to [SnackBarThemeData.disabledActionBackgroundColor].

View file

@ -808,7 +808,7 @@ enum ResizeImagePolicy {
/// If only one of `width` and `height` is non-null, then the output image
/// will be scaled to the associated width or height, and the other dimension
/// will take whatever value is needed to maintain the image's original aspect
/// ratio. These cases are simnilar to [BoxFit.fitWidth] and
/// ratio. These cases are similar to [BoxFit.fitWidth] and
/// [BoxFit.fitHeight], respectively.
///
/// If [ResizeImage.allowUpscaling] is false (the default), the width and the

View file

@ -276,7 +276,7 @@ class _TextLayout {
// color of the text is changed).
//
// The creator of this _TextLayout is also responsible for disposing this
// object when it's no logner needed.
// object when it's no longer needed.
ui.Paragraph _paragraph;
/// Whether this layout has been invalidated and disposed.

View file

@ -1063,19 +1063,19 @@ class RenderParagraph extends RenderBox with ContainerRenderObjectMixin<RenderBo
super.describeSemanticsConfiguration(config);
_semanticsInfo = text.getSemanticsInformation();
bool needsAssembleSemanticsNode = false;
bool needsChildConfigrationsDelegate = false;
bool needsChildConfigurationsDelegate = false;
for (final InlineSpanSemanticsInformation info in _semanticsInfo!) {
if (info.recognizer != null) {
needsAssembleSemanticsNode = true;
break;
}
needsChildConfigrationsDelegate = needsChildConfigrationsDelegate || info.isPlaceholder;
needsChildConfigurationsDelegate = needsChildConfigurationsDelegate || info.isPlaceholder;
}
if (needsAssembleSemanticsNode) {
config.explicitChildNodes = true;
config.isSemanticBoundary = true;
} else if (needsChildConfigrationsDelegate) {
} else if (needsChildConfigurationsDelegate) {
config.childConfigurationsDelegate = _childSemanticsConfigurationsDelegate;
} else {
if (_cachedAttributedLabels == null) {

View file

@ -1137,7 +1137,7 @@ class _RenderTheater extends RenderBox with ContainerRenderObjectMixin<RenderBox
// After adding `child` to the render tree, we want to make sure it will be
// laid out in the same frame. This is done by calling markNeedsLayout on the
// layout surrgate. This ensures `child` is reachable via tree walk (see
// layout surrogate. This ensures `child` is reachable via tree walk (see
// _RenderLayoutSurrogateProxyBox.performLayout).
child._layoutSurrogate.markNeedsLayout();
}
@ -2107,7 +2107,7 @@ class _OverlayPortalElement extends RenderObjectElement {
final Element? overlayChild = _overlayChild;
// Instead of just detaching the render objects, removing them from the
// render subtree entirely. This is a workaround for the
// !renderObject.attached assert in the `super.deactive()` method.
// !renderObject.attached assert in the `super.deactivate()` method.
if (overlayChild != null) {
final _RenderDeferredLayoutBox? box = overlayChild.renderObject as _RenderDeferredLayoutBox?;
if (box != null) {

View file

@ -2329,12 +2329,12 @@ abstract class MultiSelectableSelectionContainerDelegate extends SelectionContai
@override
SelectionResult dispatchSelectionEvent(SelectionEvent event) {
final bool selectionWillbeInProgress = event is! ClearSelectionEvent;
if (!_selectionInProgress && selectionWillbeInProgress) {
final bool selectionWillBeInProgress = event is! ClearSelectionEvent;
if (!_selectionInProgress && selectionWillBeInProgress) {
// Sort the selectable every time a selection start.
selectables.sort(compareOrder);
}
_selectionInProgress = selectionWillbeInProgress;
_selectionInProgress = selectionWillBeInProgress;
_isHandlingSelectionEvent = true;
late SelectionResult result;
switch (event.type) {

View file

@ -2796,7 +2796,7 @@ class TextSelectionGestureDetectorBuilder {
case PointerDeviceKind.invertedStylus:
case PointerDeviceKind.touch:
case PointerDeviceKind.unknown:
// For Android, Fucshia, and iOS platforms, a touch drag
// For Android, Fuchsia, and iOS platforms, a touch drag
// does not initiate unless the editable has focus.
if (renderEditable.hasFocus) {
renderEditable.selectPositionAt(

View file

@ -9965,7 +9965,7 @@ void main() {
expect(state.selectionOverlay!.handlesAreVisible, isTrue);
expect(state.renderEditable.selectionColor, defaultSelectionColor);
// Single tapping a non-misspelled word shows a collpased cursor.
// Single tapping a non-misspelled word shows a collapsed cursor.
await tester.tapAt(textOffsetToPosition(tester, 7));
await tester.pumpAndSettle();
expect(

View file

@ -877,8 +877,8 @@ void main() {
// Test vertical divider position.
final Finder divider = find.byType(VerticalDivider);
final Offset dividerTopLeft = tester.getTopLeft(divider);
final Offset headerTextTopRiught = tester.getTopRight(headerText);
expect(dividerTopLeft.dx, headerTextTopRiught.dx + 16.0);
final Offset headerTextTopRight = tester.getTopRight(headerText);
expect(dividerTopLeft.dx, headerTextTopRight.dx + 16.0);
expect(dividerTopLeft.dy, dialogTopLeft.dy);
// Test sub header text position.

View file

@ -6900,7 +6900,7 @@ testWidgets('OutlineInputBorder with BorderRadius.zero should draw a rectangular
expect(decoratorRight, lessThanOrEqualTo(prefixRight));
});
testWidgets('instrinic width with prefixIcon/suffixIcon', (WidgetTester tester) async {
testWidgets('intrinsic width with prefixIcon/suffixIcon', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/137937
for (final TextDirection direction in TextDirection.values) {
Future<Size> measureText(InputDecoration decoration) async {

View file

@ -7875,7 +7875,7 @@ void main() {
semantics.dispose();
});
testWidgets('TextField semantics alway include label and not hint when input value is not empty', (WidgetTester tester) async {
testWidgets('TextField semantics always include label and not hint when input value is not empty', (WidgetTester tester) async {
final SemanticsTester semantics = SemanticsTester(tester);
final TextEditingController controller = _textEditingController(text: 'value');
final Key key = UniqueKey();

View file

@ -1421,7 +1421,7 @@ void main() {
);
testWidgets(
'right-click mouse shows the context menu at position on Android, Fucshia, and Windows',
'right-click mouse shows the context menu at position on Android, Fuchsia, and Windows',
(WidgetTester tester) async {
Set<ContextMenuButtonType> buttonTypes = <ContextMenuButtonType>{};
final UniqueKey toolbarKey = UniqueKey();

View file

@ -10,7 +10,7 @@ import 'package:flutter_test/flutter_test.dart';
void main() {
group('TextStyle', () {
test('getTextSyle is backward compatible', () {
test('getTextStyle is backward compatible', () {
expect(
const TextStyle(fontSize: 14).getTextStyle(textScaleFactor: 2.0).toString(),
contains('fontSize: 28'),

View file

@ -744,7 +744,7 @@ void main() {
height: 25,
),
SizedBox(
key: ValueKey<String>('righttchild'),
key: ValueKey<String>('rightchild'),
width: 25,
height: 25,
),
@ -774,7 +774,7 @@ void main() {
await tester.pump(const Duration(seconds: 2));
expect(await result, null);
result = getAncestorTopLeft(of: 'leftchild', matching: 'righttchild');
result = getAncestorTopLeft(of: 'leftchild', matching: 'rightchild');
await tester.pump(const Duration(seconds: 2));
expect(await result, null);
});

View file

@ -833,7 +833,7 @@ class FlutterPlugin implements Plugin<Project> {
// Add a task that can be called on flutter projects that prints the Java version used in Gradle.
//
// Format of the output of this task can be used in debugging what version of Java Gradle is using.
// Not recomended for use in time sensitive commands like `flutter run` or `flutter build` as
// Not recommended for use in time sensitive commands like `flutter run` or `flutter build` as
// Gradle is slower than we want. Particularly in light of https://github.com/flutter/flutter/issues/119196.
private static void addTaskForJavaVersion(Project project) {
// Warning: the name of this task is used by other code. Change with caution.
@ -1043,7 +1043,7 @@ class FlutterPlugin implements Plugin<Project> {
*
* The AGP team said that this issue is fixed in Gradle 7.0, which isn't released at the
* time of adding this code. Once released, this can be removed. However, after updating to
* AGP/Gradle 7.2.0/7.5, removing this hack still causes build failures. Futher
* AGP/Gradle 7.2.0/7.5, removing this hack still causes build failures. Further
* investigation necessary to remove this.
*
* Tested cases:

View file

@ -570,7 +570,7 @@ bool validateJavaAndGradle(Logger logger,
/// Returns compatibility information for the valid range of Gradle versions for
/// the specified Java version.
///
/// Returns null when the tooling has not documented the compatibile Gradle
/// Returns null when the tooling has not documented the compatible Gradle
/// versions for the Java version (either the version is too old or too new). If
/// this seems like a mistake, the caller may need to update the
/// [_javaGradleCompatList] detailing Java/Gradle compatibility.

View file

@ -111,7 +111,7 @@ abstract class FlutterBaseDebugAdapter extends DartDebugAdapter<FlutterLaunchReq
// terminating, however for Flutter apps it may be running on a remote
// device so it's not valid to terminate a process with that pid locally.
// For attach, pids should never be collected as terminateRequest() should
// not terminate the debugee.
// not terminate the debugger.
}
/// Called by [disconnectRequest] to request that we forcefully shut down the app being run (or in the case of an attach, disconnect).

View file

@ -427,7 +427,7 @@ class Doctor {
final DoctorValidator subValidator = validator.subValidators[i];
// Ensure that all of the subvalidators in the group have
// a corresponding subresult incase a validator crashed
// a corresponding subresult in case a validator crashed
final ValidationResult subResult;
try {
subResult = validator.subResults[i];

View file

@ -77,7 +77,7 @@ class XCResultGenerator {
/// This is the result from an `xcrun xcresulttool get --path <resultPath> --format json` run.
/// The result contains useful information such as build errors and warnings.
class XCResult {
/// Parse the `resultJson` and stores useful informations in the returned `XCResult`.
/// Parse the `resultJson` and stores useful information in the returned `XCResult`.
factory XCResult({required Map<String, Object?> resultJson, List<XCResultIssueDiscarder> issueDiscarders = const <XCResultIssueDiscarder>[]}) {
final List<XCResultIssue> issues = <XCResultIssue>[];

View file

@ -322,7 +322,7 @@ Future<Uri?> dryRunNativeAssets({
required List<FlutterDevice> flutterDevices,
}) async {
if (flutterDevices.length != 1) {
return dryRunNativeAssetsMultipeOSes(
return dryRunNativeAssetsMultipleOSes(
projectUri: projectUri,
fileSystem: fileSystem,
targetPlatforms: flutterDevices.map((FlutterDevice d) => d.targetPlatform).nonNulls,
@ -412,7 +412,7 @@ Future<Uri?> dryRunNativeAssets({
/// Dry run the native builds for multiple OSes.
///
/// Needed for `flutter run -d all`.
Future<Uri?> dryRunNativeAssetsMultipeOSes({
Future<Uri?> dryRunNativeAssetsMultipleOSes({
required NativeAssetsBuildRunner buildRunner,
required Uri projectUri,
required FileSystem fileSystem,

View file

@ -35,7 +35,7 @@ android {
// Use the NDK version
// declared in /android/app/build.gradle file of the Flutter project.
// Replace it with a version number if this plugin requires a specfic NDK version.
// Replace it with a version number if this plugin requires a specific NDK version.
// (e.g. ndkVersion "23.1.7779620")
ndkVersion android.ndkVersion

View file

@ -1122,7 +1122,7 @@ void main() {
fileSystem = MemoryFileSystem.test(style: FileSystemStyle.windows);
});
testUsingContext('choses the install with the latest version', () {
testUsingContext('chooses the install with the latest version', () {
const List<String> versions = <String> [
'4.0',
'2022.0',
@ -1167,7 +1167,7 @@ void main() {
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('choses install with lexicographically greatest directory if no installs have known versions', () {
testUsingContext('chooses install with lexicographically greatest directory if no installs have known versions', () {
const List<String> versions = <String> [
'Apple',
'Zucchini',
@ -1190,7 +1190,7 @@ void main() {
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('choses install with lexicographically greatest directory if all installs have the same version', () {
testUsingContext('chooses install with lexicographically greatest directory if all installs have the same version', () {
fileSystem.file(r'C:\Users\Dash\AppData\Local\Google\AndroidStudioPreview4.0\.home')
..createSync(recursive: true)
..writeAsStringSync(r'C:\Program Files\AndroidStudioPreview4.0');

View file

@ -131,7 +131,7 @@ void main() {
});
testWithoutContext(
'injects the wrapper and the Gradle version is derivated from the AGP version',
'injects the wrapper and the Gradle version is derived from the AGP version',
() {
const Map<String, String> testCases = <String, String>{
// AGP version : Gradle version

View file

@ -97,7 +97,7 @@ void main() {
for (final bool isNativeAssetsEnabled in <bool>[true, false]) {
final String postFix = isNativeAssetsEnabled ? 'enabled' : 'disabled';
testUsingContext(
'Successfull native_assets.yaml and native_assets.d creation with feature $postFix',
'Successful native_assets.yaml and native_assets.d creation with feature $postFix',
overrides: <Type, Generator>{
FileSystem: () => fileSystem,
ProcessManager: () => processManager,

View file

@ -430,7 +430,7 @@ void main() {
);
});
testWithoutContext('selects user selected implementation despites default implementation', () async {
testWithoutContext('selects user selected implementation despite default implementation', () async {
final Set<String> directDependencies = <String>{
'user_selected_url_launcher_implementation',
'url_launcher',

View file

@ -531,7 +531,7 @@ void main() {
]);
});
testUsingContext('Unconnencted devices filtered out by default', () async {
testUsingContext('Unconnected devices filtered out by default', () async {
final List<Device> devices = <Device>[
unconnectedDevice,
];

View file

@ -683,7 +683,7 @@ void main() {
);
final OperationResult result = await hotRunner.restart(fullRestart: true);
expect(result.isOk, true);
// Hot restart does not require reruning anything for native assets.
// Hot restart does not require rerunning anything for native assets.
// The previous native assets mapping should be used.
expect(buildRunner.buildInvocations, 0);
expect(buildRunner.dryRunInvocations, 0);

View file

@ -335,7 +335,7 @@ void main() {
});
group('in release mode', () {
testUsingContext('suceeds when install and launch succeed', () async {
testUsingContext('succeeds when install and launch succeed', () async {
final IOSDevice iosDevice = setUpIOSDevice(
fileSystem: fileSystem,
processManager: FakeProcessManager.any(),

View file

@ -108,7 +108,7 @@ void main() {
testUsingContext('dry run for multiple OSes with no package config', overrides: <Type, Generator>{
ProcessManager: () => FakeProcessManager.empty(),
}, () async {
await dryRunNativeAssetsMultipeOSes(
await dryRunNativeAssetsMultipleOSes(
projectUri: projectUri,
fileSystem: fileSystem,
targetPlatforms: <TargetPlatform>[

View file

@ -89,7 +89,7 @@ void main() {
testUsingContext('dry run for multiple OSes with no package config', overrides: <Type, Generator>{
ProcessManager: () => FakeProcessManager.empty(),
}, () async {
await dryRunNativeAssetsMultipeOSes(
await dryRunNativeAssetsMultipleOSes(
projectUri: projectUri,
fileSystem: fileSystem,
targetPlatforms: <TargetPlatform>[

View file

@ -782,7 +782,7 @@ void main() {
});
group('deviceNameMatchesTargetName', () {
testWithoutContext('compares case insensitive and without spaces, hypthens, .local', () {
testWithoutContext('compares case insensitive and without spaces, hyphens, .local', () {
final MDnsVmServiceDiscovery portDiscovery = MDnsVmServiceDiscovery(
mdnsClient: FakeMDnsClient(
<PtrResourceRecord>[],

View file

@ -89,7 +89,7 @@ void main() {
testUsingContext('dry run for multiple OSes with no package config', overrides: <Type, Generator>{
ProcessManager: () => FakeProcessManager.empty(),
}, () async {
await dryRunNativeAssetsMultipeOSes(
await dryRunNativeAssetsMultipleOSes(
projectUri: projectUri,
fileSystem: fileSystem,
targetPlatforms: <TargetPlatform>[