* Fix typos

* lowercase animated & opacity

* Undo typo fix

---------

Co-authored-by: Michael Goderbauer <goderbauer@google.com>
This commit is contained in:
Lioness100 2023-02-23 14:43:21 -05:00 committed by GitHub
parent 3681b27a47
commit 26b6c1bedd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
175 changed files with 285 additions and 284 deletions

View File

@ -221,7 +221,7 @@ linter:
- unnecessary_string_interpolations
- unnecessary_this
- unnecessary_to_list_in_spreads
# - unreachable_from_main # Do not enable this rule until it is un-marked as "experimental" and carefully re-evaulated.
# - unreachable_from_main # Do not enable this rule until it is un-marked as "experimental" and carefully re-evaluated.
- unrelated_type_equality_checks
- unsafe_html
- use_build_context_synchronously

View File

@ -46,7 +46,7 @@ class WindowClassRegistrar {
public:
~WindowClassRegistrar() = default;
// Returns the singleton registar instance.
// Returns the singleton registrar instance.
static WindowClassRegistrar* GetInstance() {
if (!instance_) {
instance_ = new WindowClassRegistrar();

View File

@ -80,7 +80,7 @@ class Win32Window {
// OS callback called by message pump. Handles the WM_NCCREATE message which
// is passed when the non-client area is being created and enables automatic
// non-client DPI scaling so that the non-client area automatically
// responsponds to changes in DPI. All other messages are handled by
// responds to changes in DPI. All other messages are handled by
// MessageHandler.
static LRESULT CALLBACK WndProc(HWND const window,
UINT const message,

View File

@ -201,7 +201,7 @@ class HomePage extends StatelessWidget {
),
ElevatedButton(
key: const Key(kColorFilterWithUnstableChildName),
child: const Text('Color Filter with Ustable Child'),
child: const Text('Color Filter with Unstable Child'),
onPressed: () {
Navigator.pushNamed(context, kColorFilterWithUnstableChildName);
},

View File

@ -5,7 +5,7 @@
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
// Various tests to verify that Animated image filtered layers do not
// Various tests to verify that animated image filtered layers do not
// dirty children even without explicit repaint boundaries. These intentionally use
// text to ensure we don't measure the opacity peephole case.
class AnimatedComplexImageFiltered extends StatefulWidget {

View File

@ -4,7 +4,7 @@
import 'package:flutter/material.dart';
// Various tests to verify that Aniamted opacity layers (i.e. FadeTransition) do not
// Various tests to verify that animated opacity layers (i.e. FadeTransition) do not
// dirty children even without explicit repaint boundaries. These intentionally use
// text to ensure we don't measure the opacity peephole case.
class AnimatedComplexOpacity extends StatefulWidget {

View File

@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
import '../common.dart';
// Various tests to verify that the Opacity layer propagates the opacity to various
// Various tests to verify that the opacity layer propagates the opacity to various
// combinations of children that can apply it themselves.
// See https://github.com/flutter/flutter/issues/75697
class OpacityPeepholePage extends StatelessWidget {

View File

@ -1859,7 +1859,7 @@ Future<void> verifyTabooDocumentation(String workingDirectory, { int minimumMatc
if (errors.isNotEmpty) {
foundError(<String>[
'${bold}Avoid the word "simply" in documentation. See https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#use-the-passive-voice-recommend-do-not-require-never-say-things-are-simple for details.$reset',
'${bold}In many cases thes words can be omitted without loss of generality; in other cases it may require a bit of rewording to avoid implying that the task is simple.$reset',
'${bold}In many cases these words can be omitted without loss of generality; in other cases it may require a bit of rewording to avoid implying that the task is simple.$reset',
'${bold}Similarly, avoid using "note:" or the phrase "note that". See https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#avoid-empty-prose for details.$reset',
...errors,
]);

View File

@ -385,7 +385,7 @@ class _SnippetChecker {
/// A RegExp that matches the start of a code block within a regular comment.
/// Such blocks are not analyzed. They can be used to give sample code for
/// internal (private) APIs where visibilty would make analyzing the sample
/// internal (private) APIs where visibility would make analyzing the sample
/// code problematic.
static final RegExp _uncheckedCodeBlockStartRegex = RegExp(r'^ *// *```dart$');
@ -419,7 +419,7 @@ class _SnippetChecker {
/// A RegExp that matches a line that ends with a semicolon (and maybe a comment)
static final RegExp _trailingSemicolonRegExp = RegExp(r'^(.*);(| *//.*)$');
/// A RegExp that matches a line that ends with a closing blace (and maybe a comment)
/// A RegExp that matches a line that ends with a closing brace (and maybe a comment)
static final RegExp _trailingCloseBraceRegExp = RegExp(r'^(.*)}(| *//.*)$');
/// A RegExp that matches a line that only contains a commented-out ellipsis

View File

@ -287,7 +287,7 @@ class ArchiveCreator {
/// Used when an output filename is not given.
Future<String> get _archiveName async {
final String os = platform.operatingSystem.toLowerCase();
// Include the intended host archetecture in the file name for non-x64.
// Include the intended host architecture in the file name for non-x64.
final String arch = await _dartArch == 'x64' ? '' : '${await _dartArch}_';
// We don't use .tar.xz on Mac because although it can unpack them
// on the command line (with tar), the "Archive Utility" that runs
@ -330,7 +330,7 @@ class ArchiveCreator {
/// Validates the integrity of the release package.
///
/// Currently only checks that macOS binaries are codesigned. Will throw a
/// [PreparePackageException] if the test failes.
/// [PreparePackageException] if the test fails.
Future<void> _validate() async {
// Only validate in strict mode, which means `--publish`
if (!strict || !platform.isMacOS) {

View File

@ -18,7 +18,7 @@ import 'common.dart';
void expectExitCode(ProcessResult result, int expectedExitCode) {
if (result.exitCode != expectedExitCode) {
fail(
'Process ${result.pid} exitted with the wrong exit code.\n'
'Process ${result.pid} exited with the wrong exit code.\n'
'\n'
'EXPECTED: exit code $expectedExitCode\n'
'ACTUAL: exit code ${result.exitCode}\n'

View File

@ -26,7 +26,7 @@ abstract class Context {
/// Confirm an action with the user before proceeding.
///
/// The default implementation reads from STDIN. This can be overriden in UI
/// The default implementation reads from STDIN. This can be overridden in UI
/// implementations that capture user interaction differently.
Future<bool> prompt(String message) async {
stdio.write('${message.trim()} (y/n) ');

View File

@ -695,7 +695,7 @@ class FrameworkRepository extends Repository {
/// Create a release candidate branch version file.
///
/// This file allows for easily traversing what candidadate branch was used
/// This file allows for easily traversing what candidate branch was used
/// from a release channel.
///
/// Returns [true] if the version file was updated and a commit is needed.

View File

@ -6,7 +6,7 @@ import 'dart:async';
import 'dart:convert';
import 'dart:io';
/// Reades through the print commands from [process] waiting for the magic phase
/// Reads through the print commands from [process] waiting for the magic phase
/// that contains microbenchmarks results as defined in
/// `dev/benchmarks/microbenchmarks/lib/common.dart`.
Future<Map<String, double>> readJsonResults(Process process) {

View File

@ -33,7 +33,7 @@ Future<TaskResult> flutterToolStartupBenchmarkTask() async {
).run())
.asMap('flutter_tool_startup_test'),
// `flutter test -d foo_device` in dir woth no `test` folder.
// `flutter test -d foo_device` in dir with no `test` folder.
...(await _Benchmark(
projectDirectory,
'test startup with specified device',

View File

@ -82,8 +82,8 @@ public class MainActivity extends FlutterActivity implements MethodChannel.Metho
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
if (requestCode != STORAGE_PERMISSION_CODE || permissionResult == null)
return;
boolean permisisonGranted = grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED;
sendPermissionResult(permisisonGranted);
boolean permissionGranted = grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED;
sendPermissionResult(permissionGranted);
}

View File

@ -110,7 +110,7 @@ class Board extends IterableMixin<BoardPoint?> {
return distanceFromCenter <= boardRadius;
}
// Get the distance between two BoardPoins.
// Get the distance between two BoardPoints.
static int getDistance(BoardPoint a, BoardPoint b) {
final Vector3 a3 = a.cubeCoordinates;
final Vector3 b3 = b.cubeCoordinates;

View File

@ -64,7 +64,7 @@ class WindowClassRegistrar {
public:
~WindowClassRegistrar() = default;
// Returns the singleton registar instance.
// Returns the singleton registrar instance.
static WindowClassRegistrar* GetInstance() {
if (!instance_) {
instance_ = new WindowClassRegistrar();

View File

@ -81,7 +81,7 @@ class Win32Window {
// OS callback called by message pump. Handles the WM_NCCREATE message which
// is passed when the non-client area is being created and enables automatic
// non-client DPI scaling so that the non-client area automatically
// responsponds to changes in DPI. All other messages are handled by
// responds to changes in DPI. All other messages are handled by
// MessageHandler.
static LRESULT CALLBACK WndProc(HWND const window,
UINT const message,

View File

@ -143,8 +143,8 @@ public class MainActivity extends FlutterActivity implements MethodChannel.Metho
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
if (requestCode != STORAGE_PERMISSION_CODE || permissionResult == null)
return;
boolean permisisonGranted = grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED;
sendPermissionResult(permisisonGranted);
boolean permissionGranted = grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED;
sendPermissionResult(permissionGranted);
}
private void getExternalStoragePermissions() {

View File

@ -64,7 +64,7 @@ class WindowClassRegistrar {
public:
~WindowClassRegistrar() = default;
// Returns the singleton registar instance.
// Returns the singleton registrar instance.
static WindowClassRegistrar* GetInstance() {
if (!instance_) {
instance_ = new WindowClassRegistrar();

View File

@ -81,7 +81,7 @@ class Win32Window {
// OS callback called by message pump. Handles the WM_NCCREATE message which
// is passed when the non-client area is being created and enables automatic
// non-client DPI scaling so that the non-client area automatically
// responsponds to changes in DPI. All other messages are handled by
// responds to changes in DPI. All other messages are handled by
// MessageHandler.
static LRESULT CALLBACK WndProc(HWND const window,
UINT const message,

View File

@ -64,7 +64,7 @@ class WindowClassRegistrar {
public:
~WindowClassRegistrar() = default;
// Returns the singleton registar instance.
// Returns the singleton registrar instance.
static WindowClassRegistrar* GetInstance() {
if (!instance_) {
instance_ = new WindowClassRegistrar();

View File

@ -81,7 +81,7 @@ class Win32Window {
// OS callback called by message pump. Handles the WM_NCCREATE message which
// is passed when the non-client area is being created and enables automatic
// non-client DPI scaling so that the non-client area automatically
// responsponds to changes in DPI. All other messages are handled by
// responds to changes in DPI. All other messages are handled by
// MessageHandler.
static LRESULT CALLBACK WndProc(HWND const window,
UINT const message,

View File

@ -64,7 +64,7 @@ class WindowClassRegistrar {
public:
~WindowClassRegistrar() = default;
// Returns the singleton registar instance.
// Returns the singleton registrar instance.
static WindowClassRegistrar* GetInstance() {
if (!instance_) {
instance_ = new WindowClassRegistrar();

View File

@ -81,7 +81,7 @@ class Win32Window {
// OS callback called by message pump. Handles the WM_NCCREATE message which
// is passed when the non-client area is being created and enables automatic
// non-client DPI scaling so that the non-client area automatically
// responsponds to changes in DPI. All other messages are handled by
// responds to changes in DPI. All other messages are handled by
// MessageHandler.
static LRESULT CALLBACK WndProc(HWND const window,
UINT const message,

View File

@ -437,7 +437,7 @@ void sanityCheckDocs([Platform platform = const LocalPlatform()]) {
// Check a "dartpad" example, any one will do, and check for the correct URL
// arguments.
// Just use "master" for any branch other than the LUCH_BRANCH.
// Just use "master" for any branch other than the LUCI_BRANCH.
final String? luciBranch = platform.environment['LUCI_BRANCH']?.trim();
final String expectedBranch = luciBranch != null && luciBranch.isNotEmpty ? luciBranch : 'master';
final List<String> argumentRegExps = <String>[

View File

@ -9,8 +9,8 @@ import 'logical_key_data.dart';
import 'physical_key_data.dart';
import 'utils.dart';
String _toUpperCammel(String lowerCammel) {
return lowerCammel.substring(0, 1).toUpperCase() + lowerCammel.substring(1);
String _toUpperCamel(String lowerCamel) {
return lowerCamel.substring(0, 1).toUpperCase() + lowerCamel.substring(1);
}
/// Generates the common/testing/key_codes.h based on the information in the key
@ -23,7 +23,7 @@ class KeyCodesCcGenerator extends BaseCodeGenerator {
final OutputLines<int> lines = OutputLines<int>('Physical Key list');
for (final PhysicalKeyEntry entry in keyData.entries) {
lines.add(entry.usbHidCode, '''
constexpr uint64_t kPhysical${_toUpperCammel(entry.constantName)} = ${toHex(entry.usbHidCode)};''');
constexpr uint64_t kPhysical${_toUpperCamel(entry.constantName)} = ${toHex(entry.usbHidCode)};''');
}
return lines.sortedJoin().trimRight();
}
@ -33,7 +33,7 @@ constexpr uint64_t kPhysical${_toUpperCammel(entry.constantName)} = ${toHex(entr
final OutputLines<int> lines = OutputLines<int>('Logical Key list', behavior: DeduplicateBehavior.kSkip);
for (final LogicalKeyEntry entry in logicalData.entries) {
lines.add(entry.value, '''
constexpr uint64_t kLogical${_toUpperCammel(entry.constantName)} = ${toHex(entry.value, digits: 11)};''');
constexpr uint64_t kLogical${_toUpperCamel(entry.constantName)} = ${toHex(entry.value, digits: 11)};''');
}
return lines.sortedJoin().trimRight();
}

View File

@ -9,9 +9,9 @@ import 'logical_key_data.dart';
import 'physical_key_data.dart';
import 'utils.dart';
String _toUpperSnake(String lowerCammel) {
String _toUpperSnake(String lowerCamel) {
// Converts 'myTVFoo' to 'myTvFoo'.
final String trueUpperCammel = lowerCammel.replaceAllMapped(
final String trueUpperCamel = lowerCamel.replaceAllMapped(
RegExp(r'([A-Z]{3,})'),
(Match match) {
final String matched = match.group(1)!;
@ -20,7 +20,7 @@ String _toUpperSnake(String lowerCammel) {
+ matched.substring(matched.length - 2, matched.length - 1);
});
// Converts 'myTvFoo' to 'MY_TV_FOO'.
return trueUpperCammel.replaceAllMapped(
return trueUpperCamel.replaceAllMapped(
RegExp(r'([A-Z])'),
(Match match) => '_${match.group(1)!}').toUpperCase();
}

View File

@ -33,7 +33,7 @@ class ActionSheetExample extends StatelessWidget {
actions: <CupertinoActionSheetAction>[
CupertinoActionSheetAction(
/// This parameter indicates the action would be a default
/// defualt behavior, turns the action's text to bold text.
/// default behavior, turns the action's text to bold text.
isDefaultAction: true,
onPressed: () {
Navigator.pop(context);

View File

@ -82,7 +82,7 @@ class NextPage extends StatelessWidget {
),
// The middle widget is visible in both collapsed and expanded states.
middle: const Text('Contacts Group'),
// When the "middle" parameter is implemented, the larget title is only visible
// When the "middle" parameter is implemented, the largest title is only visible
// when the CupertinoSliverNavigationBar is fully expanded.
largeTitle: const Text('Family'),
),

View File

@ -78,7 +78,7 @@ class _MyAppState extends State<MyApp> {
},
// In this case this wraps a big open space in a GestureDetector in
// order to show the context menu, but it could also wrap a single
// wiget like an Image to give it a context menu.
// widget like an Image to give it a context menu.
child: ListView(
children: <Widget>[
Container(height: 20.0),

View File

@ -45,7 +45,7 @@ class _FilterChipExampleState extends State<FilterChipExample> {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text('Choose an execise', style: textTheme.labelLarge),
Text('Choose an exercise', style: textTheme.labelLarge),
const SizedBox(height: 5.0),
Wrap(
spacing: 5.0,

View File

@ -7,7 +7,7 @@
// Builds an adaptive navigation widget layout. When the screen width is less than
// 450, A [NavigationBar] will be displayed. Otherwise, a [NavigationRail] will be
// displayed on the left side, and also a button to open the [NavigationDrawer].
// All of these navigation widgets are built from an indentical list of data.
// All of these navigation widgets are built from an identical list of data.
import 'package:flutter/material.dart';

View File

@ -31,7 +31,7 @@ class _NavRailExampleState extends State<NavRailExample> {
NavigationRailLabelType labelType = NavigationRailLabelType.all;
bool showLeading = false;
bool showTrailing = false;
double groupAligment = -1.0;
double groupAlignment = -1.0;
@override
Widget build(BuildContext context) {
@ -40,7 +40,7 @@ class _NavRailExampleState extends State<NavRailExample> {
children: <Widget>[
NavigationRail(
selectedIndex: _selectedIndex,
groupAlignment: groupAligment,
groupAlignment: groupAlignment,
onDestinationSelected: (int index) {
setState(() {
_selectedIndex = index;
@ -118,7 +118,7 @@ class _NavRailExampleState extends State<NavRailExample> {
],
),
const SizedBox(height: 20),
Text('Group alignment: $groupAligment'),
Text('Group alignment: $groupAlignment'),
const SizedBox(height: 10),
OverflowBar(
spacing: 10.0,
@ -126,7 +126,7 @@ class _NavRailExampleState extends State<NavRailExample> {
ElevatedButton(
onPressed: () {
setState(() {
groupAligment = -1.0;
groupAlignment = -1.0;
});
},
child: const Text('Top'),
@ -134,7 +134,7 @@ class _NavRailExampleState extends State<NavRailExample> {
ElevatedButton(
onPressed: () {
setState(() {
groupAligment = 0.0;
groupAlignment = 0.0;
});
},
child: const Text('Center'),
@ -142,7 +142,7 @@ class _NavRailExampleState extends State<NavRailExample> {
ElevatedButton(
onPressed: () {
setState(() {
groupAligment = 1.0;
groupAlignment = 1.0;
});
},
child: const Text('Bottom'),

View File

@ -32,7 +32,7 @@ class _NavRailExampleState extends State<NavRailExample> {
NavigationRailLabelType labelType = NavigationRailLabelType.all;
bool showLeading = false;
bool showTrailing = false;
double groupAligment = -1.0;
double groupAlignment = -1.0;
@override
Widget build(BuildContext context) {
@ -42,7 +42,7 @@ class _NavRailExampleState extends State<NavRailExample> {
children: <Widget>[
NavigationRail(
selectedIndex: _selectedIndex,
groupAlignment: groupAligment,
groupAlignment: groupAlignment,
onDestinationSelected: (int index) {
setState(() {
_selectedIndex = index;
@ -120,7 +120,7 @@ class _NavRailExampleState extends State<NavRailExample> {
],
),
const SizedBox(height: 20),
Text('Group alignment: $groupAligment'),
Text('Group alignment: $groupAlignment'),
const SizedBox(height: 10),
OverflowBar(
spacing: 10.0,
@ -128,7 +128,7 @@ class _NavRailExampleState extends State<NavRailExample> {
ElevatedButton(
onPressed: () {
setState(() {
groupAligment = -1.0;
groupAlignment = -1.0;
});
},
child: const Text('Top'),
@ -136,7 +136,7 @@ class _NavRailExampleState extends State<NavRailExample> {
ElevatedButton(
onPressed: () {
setState(() {
groupAligment = 0.0;
groupAlignment = 0.0;
});
},
child: const Text('Center'),
@ -144,7 +144,7 @@ class _NavRailExampleState extends State<NavRailExample> {
ElevatedButton(
onPressed: () {
setState(() {
groupAligment = 1.0;
groupAlignment = 1.0;
});
},
child: const Text('Bottom'),

View File

@ -93,7 +93,7 @@ class _HomeState extends State<Home> {
// side parameter. The side can also be specified as a
// LinearBorder parameter and if both are specified then the
// ButtonStyle's side is used. This set up makes it possible
// for a button theme to specify the shape and for indidividual
// for a button theme to specify the shape and for individual
// buttons to specify the shape border's color and width.
SampleCard(
title: 'LinearBorder.bottom()',

View File

@ -15,7 +15,7 @@ class MyApp extends StatefulWidget {
}
class _MyAppState extends State<MyApp> {
Offset dragGesturePositon = Offset.zero;
Offset dragGesturePosition = Offset.zero;
@override
Widget build(BuildContext context) {
@ -32,14 +32,14 @@ class _MyAppState extends State<MyApp> {
GestureDetector(
onPanUpdate: (DragUpdateDetails details) => setState(
() {
dragGesturePositon = details.localPosition;
dragGesturePosition = details.localPosition;
},
),
child: const FlutterLogo(size: 200),
),
Positioned(
left: dragGesturePositon.dx,
top: dragGesturePositon.dy,
left: dragGesturePosition.dx,
top: dragGesturePosition.dy,
child: const RawMagnifier(
decoration: MagnifierDecoration(
shape: CircleBorder(

View File

@ -46,7 +46,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
body: CustomScrollView(
slivers: <Widget>[
const SliverToBoxAdapter(
child: ListTile(title: Text('Press on the button to toggle the list visibilty.')),
child: ListTile(title: Text('Press on the button to toggle the list visibility.')),
),
const SliverToBoxAdapter(
child: ListTile(title: Text('Before the list...')),

View File

@ -82,7 +82,7 @@ class CustomMagnifier extends StatelessWidget {
),
);
// Finally, align the magnifier to the bottom center. The inital anchor is
// Finally, align the magnifier to the bottom center. The initial anchor is
// the top left, so subtract bottom center alignment.
magnifierPosition -= Alignment.bottomCenter.alongSize(magnifierSize);

View File

@ -12,13 +12,13 @@ void main() {
const example.ChipApp(),
);
ChoiceChip choosenChip = tester.widget(find.byType(ChoiceChip).at(1));
expect(choosenChip.selected, true);
ChoiceChip chosenChip = tester.widget(find.byType(ChoiceChip).at(1));
expect(chosenChip.selected, true);
await tester.tap(find.byType(ChoiceChip).at(0));
await tester.pumpAndSettle();
choosenChip = tester.widget(find.byType(ChoiceChip).at(0));
expect(choosenChip.selected, true);
chosenChip = tester.widget(find.byType(ChoiceChip).at(0));
expect(chosenChip.selected, true);
});
}

View File

@ -18,7 +18,7 @@ void main() {
expect(find.byType(VerticalDivider), findsOneWidget);
// Divider is positioned horizintally.
// Divider is positioned horizontally.
Offset expanded = tester.getTopRight(find.byType(Expanded).first);
expect(expanded.dx, tester.getTopLeft(find.byType(VerticalDivider)).dx);

View File

@ -7,7 +7,7 @@ import 'package:flutter_api_samples/material/list_tile/list_tile.4.dart' as exam
import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('Can choose different title aligments from popup menu', (WidgetTester tester) async {
testWidgets('Can choose different title alignments from popup menu', (WidgetTester tester) async {
await tester.pumpWidget(
const example.ListTileApp(),
);

View File

@ -43,7 +43,7 @@ Offset _textOffsetToPosition<T extends State<StatefulWidget>>(WidgetTester teste
}
void main() {
const Duration durationBetweenActons = Duration(milliseconds: 20);
const Duration durationBetweenActions = Duration(milliseconds: 20);
const String defaultText = 'I am a magnifier, fear me!';
Future<void> showMagnifier(WidgetTester tester, String characterToTapOn) async {
@ -51,11 +51,11 @@ void main() {
// Double tap 'Magnifier' word to show the selection handles.
final TestGesture testGesture = await tester.startGesture(tapOffset);
await tester.pump(durationBetweenActons);
await tester.pump(durationBetweenActions);
await testGesture.up();
await tester.pump(durationBetweenActons);
await tester.pump(durationBetweenActions);
await testGesture.down(tapOffset);
await tester.pump(durationBetweenActons);
await tester.pump(durationBetweenActions);
await testGesture.up();
await tester.pumpAndSettle();

View File

@ -46,7 +46,7 @@ class WindowClassRegistrar {
public:
~WindowClassRegistrar() = default;
// Returns the singleton registar instance.
// Returns the singleton registrar instance.
static WindowClassRegistrar* GetInstance() {
if (!instance_) {
instance_ = new WindowClassRegistrar();

View File

@ -80,7 +80,7 @@ class Win32Window {
// OS callback called by message pump. Handles the WM_NCCREATE message which
// is passed when the non-client area is being created and enables automatic
// non-client DPI scaling so that the non-client area automatically
// responsponds to changes in DPI. All other messages are handled by
// responds to changes in DPI. All other messages are handled by
// MessageHandler.
static LRESULT CALLBACK WndProc(HWND const window,
UINT const message,

View File

@ -46,7 +46,7 @@ class WindowClassRegistrar {
public:
~WindowClassRegistrar() = default;
// Returns the singleton registar instance.
// Returns the singleton registrar instance.
static WindowClassRegistrar* GetInstance() {
if (!instance_) {
instance_ = new WindowClassRegistrar();

View File

@ -81,7 +81,7 @@ class Win32Window {
// OS callback called by message pump. Handles the WM_NCCREATE message which
// is passed when the non-client area is being created and enables automatic
// non-client DPI scaling so that the non-client area automatically
// responsponds to changes in DPI. All other messages are handled by
// responds to changes in DPI. All other messages are handled by
// MessageHandler.
static LRESULT CALLBACK WndProc(HWND const window,
UINT const message,

View File

@ -64,7 +64,7 @@ class WindowClassRegistrar {
public:
~WindowClassRegistrar() = default;
// Returns the singleton registar instance.
// Returns the singleton registrar instance.
static WindowClassRegistrar* GetInstance() {
if (!instance_) {
instance_ = new WindowClassRegistrar();

View File

@ -81,7 +81,7 @@ class Win32Window {
// OS callback called by message pump. Handles the WM_NCCREATE message which
// is passed when the non-client area is being created and enables automatic
// non-client DPI scaling so that the non-client area automatically
// responsponds to changes in DPI. All other messages are handled by
// responds to changes in DPI. All other messages are handled by
// MessageHandler.
static LRESULT CALLBACK WndProc(HWND const window,
UINT const message,

View File

@ -64,7 +64,7 @@ class WindowClassRegistrar {
public:
~WindowClassRegistrar() = default;
// Returns the singleton registar instance.
// Returns the singleton registrar instance.
static WindowClassRegistrar* GetInstance() {
if (!instance_) {
instance_ = new WindowClassRegistrar();

View File

@ -81,7 +81,7 @@ class Win32Window {
// OS callback called by message pump. Handles the WM_NCCREATE message which
// is passed when the non-client area is being created and enables automatic
// non-client DPI scaling so that the non-client area automatically
// responsponds to changes in DPI. All other messages are handled by
// responds to changes in DPI. All other messages are handled by
// MessageHandler.
static LRESULT CALLBACK WndProc(HWND const window,
UINT const message,

View File

@ -46,7 +46,7 @@ class WindowClassRegistrar {
public:
~WindowClassRegistrar() = default;
// Returns the singleton registar instance.
// Returns the singleton registrar instance.
static WindowClassRegistrar* GetInstance() {
if (!instance_) {
instance_ = new WindowClassRegistrar();

View File

@ -80,7 +80,7 @@ class Win32Window {
// OS callback called by message pump. Handles the WM_NCCREATE message which
// is passed when the non-client area is being created and enables automatic
// non-client DPI scaling so that the non-client area automatically
// responsponds to changes in DPI. All other messages are handled by
// responds to changes in DPI. All other messages are handled by
// MessageHandler.
static LRESULT CALLBACK WndProc(HWND const window,
UINT const message,

View File

@ -277,7 +277,7 @@ class CupertinoContextMenu extends StatefulWidget {
/// opened in the default way to match a native iOS 16.0 app. The behavior
/// will match what will happen if the simple child image was passed as just
/// the [child] parameter, instead of [builder]. This can be manipulated to
/// add more custamizability to the widget's animation.
/// add more customizability to the widget's animation.
///
/// ```dart
/// CupertinoContextMenu.builder(

View File

@ -77,7 +77,7 @@ class CupertinoTextMagnifier extends StatefulWidget {
class _CupertinoTextMagnifierState extends State<CupertinoTextMagnifier>
with SingleTickerProviderStateMixin {
// Initalize to dummy values for the event that the inital call to
// Initialize to dummy values for the event that the initial call to
// _determineMagnifierPositionAndFocalPoint calls hide, and thus does not
// set these values.
Offset _currentAdjustedMagnifierPosition = Offset.zero;

View File

@ -967,8 +967,8 @@ class _RenderLargeTitle extends RenderShiftedBox {
return;
}
final BoxConstraints childConstriants = constraints.widthConstraints().loosen();
child.layout(childConstriants, parentUsesSize: true);
final BoxConstraints childConstraints = constraints.widthConstraints().loosen();
child.layout(childConstraints, parentUsesSize: true);
final double maxScale = child.size.width != 0.0
? clampDouble(constraints.maxWidth / child.size.width, 1.0, 1.1)

View File

@ -364,7 +364,7 @@ class _CupertinoSwitchState extends State<CupertinoSwitch> with TickerProviderSt
activeColor: activeColor,
trackColor: CupertinoDynamicColor.resolve(widget.trackColor ?? CupertinoColors.secondarySystemFill, context),
thumbColor: CupertinoDynamicColor.resolve(widget.thumbColor ?? CupertinoColors.white, context),
// Opacity, lightness, and saturation values were aproximated with
// Opacity, lightness, and saturation values were approximated with
// color pickers on the switches in the macOS settings.
focusColor: CupertinoDynamicColor.resolve(
widget.focusColor ??

View File

@ -39,7 +39,7 @@ abstract class ObjectEvent{
/// long living place as it will prevent garbage collection.
final Object object;
/// The representation of the event in a form, acceptible by a
/// The representation of the event in a form, acceptable by a
/// pure dart library, that cannot depend on Flutter.
///
/// The method enables code like:

View File

@ -467,7 +467,7 @@ class _DatePickerDialogState extends State<DatePickerDialog> with RestorationMix
color: headerForegroundColor,
)
// Material2 has support for landscape and the current M3 spec doesn't
// address this layout, so handling it seperately here.
// address this layout, so handling it separately here.
: (orientation == Orientation.landscape
? textTheme.headlineSmall?.copyWith(color: headerForegroundColor)
: textTheme.headlineMedium?.copyWith(color: headerForegroundColor));

View File

@ -152,7 +152,7 @@ class DatePickerThemeData with Diagnosticable {
/// day labels in the grid of the date picker.
final MaterialStateProperty<Color?>? dayBackgroundColor;
/// Overriddes the default highlight color that's typically used to
/// Overrides the default highlight color that's typically used to
/// indicate that a day in the grid is focused, hovered, or pressed.
final MaterialStateProperty<Color?>? dayOverlayColor;

View File

@ -139,7 +139,7 @@ class ExpansionPanelRadio extends ExpansionPanel {
/// expansions.
///
/// The [expansionCallback] is called when the expansion state changes. For
/// normal [ExpansionPanelList] widgets, it is the responsibilty of the parent
/// normal [ExpansionPanelList] widgets, it is the responsibility of the parent
/// widget to rebuild the [ExpansionPanelList] with updated values for
/// [ExpansionPanel.isExpanded]. For [ExpansionPanelList.radio] widgets, the
/// open state is tracked internally and the callback is invoked both for the

View File

@ -203,7 +203,7 @@ class InkSparkle extends InteractiveInkFeature {
],
).animate(_animationController);
// Creates an element of randomness so that ink eminating from the same
// Creates an element of randomness so that ink emanating from the same
// pixel have slightly different rings and sparkles.
_turbulenceSeed = turbulenceSeed ?? math.Random().nextDouble() * 1000.0;
}

View File

@ -86,7 +86,7 @@ class _TextMagnifierState extends State<TextMagnifier> {
// Should _only_ be null on construction. This is because of the animation logic.
//
// Animations are added when `last_build_y != current_build_y`. This condition
// is true on the inital render, which would mean that the inital
// is true on the initial render, which would mean that the initial
// build would be animated - this is undesired. Thus, this is null for the
// first frame and the condition becomes `magnifierPosition != null && last_build_y != this_build_y`.
Offset? _magnifierPosition;

View File

@ -169,7 +169,7 @@ class NavigationBar extends StatelessWidget {
/// is used. Otherwise, [ColorScheme.secondary] with an opacity of 0.24 is used.
final Color? indicatorColor;
/// The shape of the selected inidicator.
/// The shape of the selected indicator.
///
/// If null, [NavigationBarThemeData.indicatorShape] is used. If that
/// is also null and [ThemeData.useMaterial3] is true, [StadiumBorder] is used.

View File

@ -98,7 +98,7 @@ class NavigationDrawer extends StatelessWidget {
/// If that is also null, defaults to [ColorScheme.secondaryContainer].
final Color? indicatorColor;
/// The shape of the selected inidicator.
/// The shape of the selected indicator.
///
/// If this is null, [NavigationDrawerThemeData.indicatorShape] is used.
/// If that is also null, defaults to [StadiumBorder].
@ -114,7 +114,7 @@ class NavigationDrawer extends StatelessWidget {
/// [NavigationDrawerDestination] or null if no destination is selected.
///
/// A valid [selectedIndex] satisfies 0 <= [selectedIndex] < number of [NavigationDrawerDestination].
/// For an invalid [selectedIndex] like `-1`, all desitinations will appear unselected.
/// For an invalid [selectedIndex] like `-1`, all destinations will appear unselected.
final int? selectedIndex;
/// Called when one of the [NavigationDrawerDestination] children is selected.

View File

@ -578,7 +578,7 @@ class _RailDestination extends StatelessWidget {
);
final bool material3 = Theme.of(context).useMaterial3;
final EdgeInsets destionationPadding = (padding ?? EdgeInsets.zero).resolve(Directionality.of(context));
final EdgeInsets destinationPadding = (padding ?? EdgeInsets.zero).resolve(Directionality.of(context));
Offset indicatorOffset;
final Widget themedIcon = IconTheme(
@ -597,8 +597,8 @@ class _RailDestination extends StatelessWidget {
// Split the destination spacing across the top and bottom to keep the icon centered.
final Widget? spacing = material3 ? const SizedBox(height: _verticalDestinationSpacingM3 / 2) : null;
indicatorOffset = Offset(
minWidth / 2 + destionationPadding.left,
_verticalDestinationSpacingM3 / 2 + destionationPadding.top,
minWidth / 2 + destinationPadding.left,
_verticalDestinationSpacingM3 / 2 + destinationPadding.top,
);
final Widget iconPart = Column(
children: <Widget>[
@ -675,8 +675,8 @@ class _RailDestination extends StatelessWidget {
final Widget topSpacing = SizedBox(height: material3 ? 0 : verticalPadding);
final Widget labelSpacing = SizedBox(height: material3 ? lerpDouble(0, _verticalIconLabelSpacingM3, appearingAnimationValue)! : 0);
final Widget bottomSpacing = SizedBox(height: material3 ? _verticalDestinationSpacingM3 : verticalPadding);
final double indicatorHorizontalPadding = (destionationPadding.left / 2) - (destionationPadding.right / 2);
final double indicatorVerticalPadding = destionationPadding.top;
final double indicatorHorizontalPadding = (destinationPadding.left / 2) - (destinationPadding.right / 2);
final double indicatorVerticalPadding = destinationPadding.top;
indicatorOffset = Offset(minWidth / 2 + indicatorHorizontalPadding, indicatorVerticalPadding);
if (minWidth < _NavigationRailDefaultsM2(context).minWidth!) {
indicatorOffset = Offset(minWidth / 2 + _horizontalDestinationSpacingM3, indicatorVerticalPadding);
@ -723,8 +723,8 @@ class _RailDestination extends StatelessWidget {
final Widget topSpacing = SizedBox(height: material3 ? 0 : _verticalDestinationPaddingWithLabel);
final Widget labelSpacing = SizedBox(height: material3 ? _verticalIconLabelSpacingM3 : 0);
final Widget bottomSpacing = SizedBox(height: material3 ? _verticalDestinationSpacingM3 : _verticalDestinationPaddingWithLabel);
final double indicatorHorizontalPadding = (destionationPadding.left / 2) - (destionationPadding.right / 2);
final double indicatorVerticalPadding = destionationPadding.top;
final double indicatorHorizontalPadding = (destinationPadding.left / 2) - (destinationPadding.right / 2);
final double indicatorVerticalPadding = destinationPadding.top;
indicatorOffset = Offset(minWidth / 2 + indicatorHorizontalPadding, indicatorVerticalPadding);
if (minWidth < _NavigationRailDefaultsM2(context).minWidth!) {
indicatorOffset = Offset(minWidth / 2 + _horizontalDestinationSpacingM3, indicatorVerticalPadding);
@ -944,7 +944,7 @@ class NavigationRailDestination {
/// The color of the [indicatorShape] when this destination is selected.
final Color? indicatorColor;
/// The shape of the selection inidicator.
/// The shape of the selection indicator.
final ShapeBorder? indicatorShape;
/// The label for the destination.

View File

@ -1158,9 +1158,9 @@ class _ScaffoldLayout extends MultiChildLayoutDelegate {
positionChild(_ScaffoldSlot.snackBar, Offset(xOffset, snackBarYOffsetBase - snackBarSize.height));
assert((){
// Whether a floating SnackBar has been offsetted too high.
// Whether a floating SnackBar has been offset too high.
//
// To improve the developper experience, this assert is done after the call to positionChild.
// To improve the developer experience, this assert is done after the call to positionChild.
// if we assert sooner the SnackBar is visible because its defaults position is (0,0) and
// it can cause confusion to the user as the error message states that the SnackBar is off screen.
if (isSnackBarFloating) {

View File

@ -100,7 +100,7 @@ class SegmentedButton<T> extends StatelessWidget {
/// more than five options, consider using [FilterChip] or [ChoiceChip]
/// widgets.
///
/// If [onSelectionChanged] is null, then the entire segemented button will
/// If [onSelectionChanged] is null, then the entire segmented button will
/// be disabled.
///
/// By default [selected] must only contain one entry. However, if
@ -163,7 +163,7 @@ class SegmentedButton<T> extends StatelessWidget {
/// Determines if having no selected segments is allowed.
///
/// If true, then it is acceptable for none of the segements to be selected.
/// If true, then it is acceptable for none of the segments to be selected.
/// This means that [selected] can be empty. If the user taps on a
/// selected segment, it will be removed from the selection set passed into
/// [onSelectionChanged].
@ -183,7 +183,7 @@ class SegmentedButton<T> extends StatelessWidget {
/// dividers between segments.
/// * [ButtonStyle.shape]
///
/// The following style properties are applied to each of the invidual
/// The following style properties are applied to each of the individual
/// button segments. For properties that are a [MaterialStateProperty],
/// they will be resolved with the current state of the segment:
///

View File

@ -516,7 +516,7 @@ class _SnackBarState extends State<SnackBar> {
// the surrounding theme.
final Brightness brightness = isThemeDark ? Brightness.light : Brightness.dark;
// Invert the theme values for Material 2. Material 3 values are tokenzied to pre-inverted values.
// Invert the theme values for Material 2. Material 3 values are tokenized to pre-inverted values.
final ThemeData effectiveTheme = theme.useMaterial3
? theme
: theme.copyWith(

View File

@ -1077,7 +1077,7 @@ class TextStyle with Diagnosticable {
/// implementation uses the non-null value throughout the transition for
/// lerpable fields such as colors (for example, if one [TextStyle] specified
/// `fontSize` but the other didn't, the returned [TextStyle] will use the
/// `fontSize` from the [TextStyle] that specified it, regarless of the `t`
/// `fontSize` from the [TextStyle] that specified it, regardless of the `t`
/// value).
///
/// This method throws when the given [TextStyle]s don't have the same

View File

@ -729,7 +729,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin,
// Check if the selection is visible with an approximation because a
// difference between rounded and unrounded values causes the caret to be
// reported as having a slightly (< 0.5) negative y offset. This rounding
// happens in paragraph.cc's layout and TextPainer's
// happens in paragraph.cc's layout and TextPainter's
// _applyFloatingPointHack. Ideally, the rounding mismatch will be fixed and
// this can be changed to be a strict check instead of an approximation.
const double visibleRegionSlop = 0.5;
@ -775,7 +775,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin,
@override
void markNeedsPaint() {
super.markNeedsPaint();
// Tell the painers to repaint since text layout may have changed.
// Tell the painters to repaint since text layout may have changed.
_foregroundRenderObject?.markNeedsPaint();
_backgroundRenderObject?.markNeedsPaint();
}

View File

@ -2370,7 +2370,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
/// needing to paint and needing a composited layer update, this method is only
/// called once.
// TODO(jonahwilliams): https://github.com/flutter/flutter/issues/102102 revisit the
// contraint that the instance/type of layer cannot be changed at runtime.
// constraint that the instance/type of layer cannot be changed at runtime.
OffsetLayer updateCompositedLayer({required covariant OffsetLayer? oldLayer}) {
assert(isRepaintBoundary);
return oldLayer ?? OffsetLayer();

View File

@ -189,7 +189,7 @@ enum SchedulerPhase {
/// See also:
///
/// * [PerformanceModeRequestHandle] for more information on the lifecycle of the handle.
typedef _PerformanceModeCleaupCallback = VoidCallback;
typedef _PerformanceModeCleanupCallback = VoidCallback;
/// An opaque handle that keeps a request for [DartPerformanceMode] active until
/// disposed.
@ -197,9 +197,9 @@ typedef _PerformanceModeCleaupCallback = VoidCallback;
/// To create a [PerformanceModeRequestHandle], use [SchedulerBinding.requestPerformanceMode].
/// The component that makes the request is responsible for disposing the handle.
class PerformanceModeRequestHandle {
PerformanceModeRequestHandle._(_PerformanceModeCleaupCallback this._cleanup);
PerformanceModeRequestHandle._(_PerformanceModeCleanupCallback this._cleanup);
_PerformanceModeCleaupCallback? _cleanup;
_PerformanceModeCleanupCallback? _cleanup;
/// Call this method to signal to [SchedulerBinding] that a request for a [DartPerformanceMode]
/// is no longer needed.

View File

@ -115,7 +115,7 @@ typedef DomEventListener = void Function(DomEvent event);
@staticInterop
class DomEvent {}
/// [DomEvent] reqiured extension.
/// [DomEvent] required extension.
extension DomEventExtension on DomEvent {
/// Get the event type.
external String get type;
@ -134,7 +134,7 @@ extension DomEventExtension on DomEvent {
@staticInterop
class DomProgressEvent extends DomEvent {}
/// [DomProgressEvent] reqiured extension.
/// [DomProgressEvent] required extension.
extension DomProgressEventExtension on DomProgressEvent {
/// Amount of work done.
external int? get loaded;
@ -182,7 +182,7 @@ extension DomDocumentExtension on DomDocument {
@JS('window.document')
external DomDocument get domDocument;
/// Cretaes a new DOM event.
/// Creates a new DOM event.
DomEvent createDomEvent(String type, String name) {
final DomEvent event = domDocument.createEvent(type);
event.initEvent(name, true, true);

View File

@ -864,7 +864,7 @@ class KeyEventManager {
return false;
case KeyDataTransitMode.keyDataThenRawKeyData:
// Having 0 as the physical and logical ID indicates an empty key data
// (the only occassion either field can be 0,) transmitted to ensure
// (the only occasion either field can be 0,) transmitted to ensure
// that the transit mode is correctly inferred. These events should be
// ignored.
if (data.physical == 0 && data.logical == 0) {

View File

@ -864,7 +864,7 @@ class RawKeyboard {
// exist in the modifier list. Enforce the pressing state.
if (event is RawKeyDownEvent && thisKeyModifier != null
&& !_keysPressed.containsKey(event.physicalKey)) {
// This inconsistancy is found on Linux GTK for AltRight:
// This inconsistency is found on Linux GTK for AltRight:
// https://github.com/flutter/flutter/issues/93278
// And also on Android and iOS:
// https://github.com/flutter/flutter/issues/101090

View File

@ -531,9 +531,9 @@ class SystemChrome {
/// to configure the system styles when an app bar is not used. When an app
/// bar is used, apps should not enclose the app bar in an annotated region
/// because one is automatically created. If an app bar is used and the app
/// bar is enclosed in an annotated region, the app bar overlay style supercedes
/// bar is enclosed in an annotated region, the app bar overlay style supersedes
/// the status bar properties defined in the enclosing annotated region overlay
/// style and the enclosing annotated region overlay style supercedes the app bar
/// style and the enclosing annotated region overlay style supersedes the app bar
/// overlay style navigation bar properties.
///
/// {@tool sample}

View File

@ -59,7 +59,7 @@ abstract class TextBoundary {
}
}
/// A [TextBoundary] subclass for retriving the range of the grapheme the given
/// A [TextBoundary] subclass for retrieving the range of the grapheme the given
/// `position` is in.
///
/// The class is implemented using the

View File

@ -277,7 +277,7 @@ class TextEditingDeltaInsertion extends TextEditingDelta {
@override
TextEditingValue apply(TextEditingValue value) {
// To stay inline with the plain text model we should follow a last write wins
// policy and apply the delta to the oldText. This is due to the asyncronous
// policy and apply the delta to the oldText. This is due to the asynchronous
// nature of the connection between the framework and platform text input plugins.
String newText = oldText;
assert(_debugTextRangeIsValid(TextRange.collapsed(insertionOffset), newText), 'Applying TextEditingDeltaInsertion failed, the insertionOffset: $insertionOffset is not within the bounds of $newText of length: ${newText.length}');
@ -323,7 +323,7 @@ class TextEditingDeltaDeletion extends TextEditingDelta {
@override
TextEditingValue apply(TextEditingValue value) {
// To stay inline with the plain text model we should follow a last write wins
// policy and apply the delta to the oldText. This is due to the asyncronous
// policy and apply the delta to the oldText. This is due to the asynchronous
// nature of the connection between the framework and platform text input plugins.
String newText = oldText;
assert(_debugTextRangeIsValid(deletedRange, newText), 'Applying TextEditingDeltaDeletion failed, the deletedRange: $deletedRange is not within the bounds of $newText of length: ${newText.length}');
@ -379,7 +379,7 @@ class TextEditingDeltaReplacement extends TextEditingDelta {
@override
TextEditingValue apply(TextEditingValue value) {
// To stay inline with the plain text model we should follow a last write wins
// policy and apply the delta to the oldText. This is due to the asyncronous
// policy and apply the delta to the oldText. This is due to the asynchronous
// nature of the connection between the framework and platform text input plugins.
String newText = oldText;
assert(_debugTextRangeIsValid(replacedRange, newText), 'Applying TextEditingDeltaReplacement failed, the replacedRange: $replacedRange is not within the bounds of $newText of length: ${newText.length}');
@ -425,7 +425,7 @@ class TextEditingDeltaNonTextUpdate extends TextEditingDelta {
@override
TextEditingValue apply(TextEditingValue value) {
// To stay inline with the plain text model we should follow a last write wins
// policy and apply the delta to the oldText. This is due to the asyncronous
// policy and apply the delta to the oldText. This is due to the asynchronous
// nature of the connection between the framework and platform text input plugins.
assert(_debugTextRangeIsValid(selection, oldText), 'Applying TextEditingDeltaNonTextUpdate failed, the selection range: $selection is not within the bounds of $oldText of length: ${oldText.length}');
assert(_debugTextRangeIsValid(composing, oldText), 'Applying TextEditingDeltaNonTextUpdate failed, the composing region: $composing is not within the bounds of $oldText of length: ${oldText.length}');

View File

@ -6811,7 +6811,7 @@ class MetaData extends SingleChildRenderObjectWidget {
/// A widget that annotates the widget tree with a description of the meaning of
/// the widgets.
///
/// Used by assitive technologies, search engines, and other semantic analysis
/// Used by assistive technologies, search engines, and other semantic analysis
/// software to determine the meaning of the application.
///
/// {@youtube 560 315 https://www.youtube.com/watch?v=NvtMt_DtFrQ}

View File

@ -34,7 +34,7 @@ import 'text_editing_intents.dart';
/// ```dart
/// @override
/// Widget build(BuildContext context) {
/// // If using WidgetsApp or its descendents MaterialApp or CupertinoApp,
/// // If using WidgetsApp or its descendants MaterialApp or CupertinoApp,
/// // then DefaultTextEditingShortcuts is already being inserted into the
/// // widget tree.
/// return const DefaultTextEditingShortcuts(
@ -89,7 +89,7 @@ import 'text_editing_intents.dart';
///
/// @override
/// Widget build(BuildContext context) {
/// // If using WidgetsApp or its descendents MaterialApp or CupertinoApp,
/// // If using WidgetsApp or its descendants MaterialApp or CupertinoApp,
/// // then DefaultTextEditingShortcuts is already being inserted into the
/// // widget tree.
/// return DefaultTextEditingShortcuts(

View File

@ -2368,7 +2368,7 @@ class EditableTextState extends State<EditableText> with AutomaticKeepAliveClien
SuggestionSpan? findSuggestionSpanAtCursorIndex(int cursorIndex) {
if (!_spellCheckResultsReceived
|| spellCheckResults!.suggestionSpans.last.range.end < cursorIndex) {
// No spell check results have been recieved or the cursor index is out
// No spell check results have been received or the cursor index is out
// of range that suggestionSpans covers.
return null;
}
@ -2533,7 +2533,7 @@ class EditableTextState extends State<EditableText> with AutomaticKeepAliveClien
///
/// * [EditableText.getEditableButtonItems], which performs a similar role,
/// but for any editable field, not just specifically EditableText.
/// * [SelectableRegionState.contextMenuButtonItems], which peforms a similar
/// * [SelectableRegionState.contextMenuButtonItems], which performs a similar
/// role but for content that is selectable but not editable.
/// * [contextMenuAnchors], which provides the anchor points for the default
/// context menu.
@ -2789,7 +2789,7 @@ class EditableTextState extends State<EditableText> with AutomaticKeepAliveClien
}
// Wherever the value is changed by the user, schedule a showCaretOnScreen
// to make sure the user can see the changes they just made. Programmatical
// to make sure the user can see the changes they just made. Programmatic
// changes to `textEditingValue` do not trigger the behavior even if the
// text field is focused.
_scheduleShowCaretOnScreen(withAnimation: true);
@ -4565,14 +4565,14 @@ class EditableTextState extends State<EditableText> with AutomaticKeepAliveClien
String text = _value.text;
text = widget.obscuringCharacter * text.length;
// Reveal the latest character in an obscured field only on mobile.
// Newer verions of iOS (iOS 15+) no longer reveal the most recently
// Newer versions of iOS (iOS 15+) no longer reveal the most recently
// entered character.
const Set<TargetPlatform> mobilePlatforms = <TargetPlatform> {
TargetPlatform.android, TargetPlatform.fuchsia,
};
final bool breiflyShowPassword = WidgetsBinding.instance.platformDispatcher.brieflyShowPassword
final bool brieflyShowPassword = WidgetsBinding.instance.platformDispatcher.brieflyShowPassword
&& mobilePlatforms.contains(defaultTargetPlatform);
if (breiflyShowPassword) {
if (brieflyShowPassword) {
final int? o = _obscureShowCharTicksPending > 0 ? _obscureLatestCharIndex : null;
if (o != null && o >= 0 && o < text.length) {
text = text.replaceRange(o, o + 1, _value.text.substring(o, o + 1));

View File

@ -319,7 +319,7 @@ class Focus extends StatefulWidget {
/// {@template flutter.widgets.Focus.descendantsAreTraversable}
/// If false, will make this widget's descendants untraversable.
///
/// Defaults to true. Does not affect traversablility of this node (just its
/// Defaults to true. Does not affect traversability of this node (just its
/// descendants): for that, use [FocusNode.skipTraversal].
///
/// Does not affect the value of [FocusNode.skipTraversal] on the

View File

@ -114,7 +114,7 @@ enum TraversalEdgeBehavior {
/// current [FlutterView]. For example, [NextFocusAction] invoked via keyboard
/// (typically the TAB key) would receive [KeyEventResult.skipRemainingHandlers]
/// allowing the embedder handle the shortcut. On the web, typically the
/// control is transfered to the browser, allowing the user to reach the
/// control is transferred to the browser, allowing the user to reach the
/// address bar, escape an `iframe`, or focus on HTML elements other than
/// those managed by Flutter.
leaveFlutterView,

View File

@ -185,7 +185,7 @@ class Matrix4Tween extends Tween<Matrix4> {
end!.decompose(endTranslation, endRotation, endScale);
final Vector3 lerpTranslation =
beginTranslation * (1.0 - t) + endTranslation * t;
// TODO(alangardner): Implement slerp for constant rotation
// TODO(alangardner): Implement lerp for constant rotation
final Quaternion lerpRotation =
(beginRotation.scaled(1.0 - t) + endRotation.scaled(t)).normalized();
final Vector3 lerpScale = beginScale * (1.0 - t) + endScale * t;

View File

@ -53,7 +53,7 @@ class _SemanticsClipper extends SingleChildRenderObjectWidget{
/// Updates the [SemanticsNode.rect] of its child based on the value inside
/// provided [ValueNotifier].
class _RenderSemanticsClipper extends RenderProxyBox {
/// Creats a [RenderProxyBox] that Updates the [SemanticsNode.rect] of its child
/// Creates a [RenderProxyBox] that Updates the [SemanticsNode.rect] of its child
/// based on the value inside provided [ValueNotifier].
_RenderSemanticsClipper({
required ValueNotifier<EdgeInsets> clipDetailsNotifier,

View File

@ -1088,7 +1088,7 @@ class _AndroidViewSurfaceState extends State<AndroidViewSurface> {
void initState() {
super.initState();
if (!widget.controller.isCreated) {
// Schedule a rebuild once creation is complete and the final dislay
// Schedule a rebuild once creation is complete and the final display
// type is known.
widget.controller.addOnPlatformViewCreatedListener(_onPlatformViewCreated);
}

View File

@ -396,7 +396,7 @@ class ScrollbarPainter extends ChangeNotifier implements CustomPainter {
Rect? _thumbRect;
// The current scroll position + _leadingThumbMainAxisOffset
late double _thumbOffset;
// The fraction visible in relation to the trversable length of the track.
// The fraction visible in relation to the traversable length of the track.
late double _thumbExtent;
// Thumb Offsets
// The thumb is offset by padding and margins.

View File

@ -973,7 +973,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
///
/// * [SelectableRegion.getSelectableButtonItems], which performs a similar role,
/// but for any selectable text, not just specifically SelectableRegion.
/// * [EditableTextState.contextMenuButtonItems], which peforms a similar role
/// * [EditableTextState.contextMenuButtonItems], which performs a similar role
/// but for content that is not just selectable but also editable.
/// * [contextMenuAnchors], which provides the anchor points for the default
/// context menu.

View File

@ -75,7 +75,7 @@ class SpellCheckConfiguration {
spell check enabled : $_spellCheckEnabled
spell check service : $spellCheckService
misspelled text style : $misspelledTextStyle
spell check suggesstions toolbar builder: $spellCheckSuggestionsToolbarBuilder
spell check suggestions toolbar builder: $spellCheckSuggestionsToolbarBuilder
'''
.trim();
}

View File

@ -335,7 +335,7 @@ class TapDragUpdateDetails with Diagnosticable {
/// coordinates (the present [globalPosition]) when this callback is triggered.
///
/// When considering a [GestureRecognizer] that tracks the number of consecutive taps,
/// this offset is associated with the most recent [PointerDownEvent] that occured.
/// this offset is associated with the most recent [PointerDownEvent] that occurred.
final Offset offsetFromOrigin;
/// A local delta offset from the point where the drag initially contacted
@ -343,7 +343,7 @@ class TapDragUpdateDetails with Diagnosticable {
/// coordinates (the present [localPosition]) when this callback is triggered.
///
/// When considering a [GestureRecognizer] that tracks the number of consecutive taps,
/// this offset is associated with the most recent [PointerDownEvent] that occured.
/// this offset is associated with the most recent [PointerDownEvent] that occurred.
final Offset localOffsetFromOrigin;
/// If this tap is in a series of taps, then this value represents
@ -678,7 +678,7 @@ mixin _TapStatusTrackerMixin on OneSequenceGestureRecognizer {
/// ### When competing with `TapGestureRecognizer` and `DragGestureRecognizer`
///
/// Similar to [TapGestureRecognizer] and [DragGestureRecognizer],
/// [TapAndDragGestureRecognizer] will not aggresively declare victory when it detects
/// [TapAndDragGestureRecognizer] will not aggressively declare victory when it detects
/// a tap, so when it is competing with those gesture recognizers and others it has a chance
/// of losing.
///

View File

@ -983,13 +983,13 @@ class SelectionOverlay {
/// since magnifiers may hide themselves. If this info is needed, check
/// [MagnifierController.shown].
/// {@endtemplate}
void showMagnifier(MagnifierInfo initalMagnifierInfo) {
void showMagnifier(MagnifierInfo initialMagnifierInfo) {
if (_toolbar != null || _contextMenuControllerIsShown) {
hideToolbar();
}
// Start from empty, so we don't utilize any rememnant values.
_magnifierInfo.value = initalMagnifierInfo;
// Start from empty, so we don't utilize any remnant values.
_magnifierInfo.value = initialMagnifierInfo;
// Pre-build the magnifiers so we can tell if we've built something
// or not. If we don't build a magnifiers, then we should not
@ -3076,7 +3076,7 @@ enum ClipboardStatus {
/// waiting to receive the clipboard contents for the first time.
unknown,
/// The content on the clipboard is not pastable, such as when it is empty.
/// The content on the clipboard is not pasteable, such as when it is empty.
notPasteable,
}

View File

@ -3587,7 +3587,7 @@ class InspectorSerializationDelegate implements DiagnosticsSerializationDelegate
/// Whether the tree should only include nodes created by the local project.
final bool summaryTree;
/// Maximum descendents of [DiagnosticsNode] before truncating.
/// Maximum descendants of [DiagnosticsNode] before truncating.
final int maxDescendantsTruncatableNode;
@override

View File

@ -189,7 +189,7 @@ void main() {
),
);
// Show the magnifier initally, so that we get it in a not hidden state.
// Show the magnifier initially, so that we get it in a not hidden state.
await showCupertinoMagnifier(context, tester, magnifierinfo);
// Move the gesture to one that should hide it.
@ -228,7 +228,7 @@ void main() {
),
);
// Show the magnifier initally, so that we get it in a not hidden state.
// Show the magnifier initially, so that we get it in a not hidden state.
await showCupertinoMagnifier(context, tester, magnifierInfo);
// Move the gesture to one that should hide it.

View File

@ -188,7 +188,7 @@ void main() {
}
// Regression test for https://github.com/flutter/flutter/issues/119270
testWidgets('System navigation bar properties are not overriden', (WidgetTester tester) async {
testWidgets('System navigation bar properties are not overridden', (WidgetTester tester) async {
await tester.pumpWidget(
const CupertinoApp(
home: CupertinoNavigationBar(

View File

@ -465,7 +465,7 @@ void main() {
mode = SchedulerBinding.instance.debugGetRequestedPerformanceMode();
expect(mode, equals(DartPerformanceMode.latency));
// end of transitio, go back to no requests active.
// end of transition, go back to no requests active.
await tester.pump(const Duration(milliseconds: 500));
mode = SchedulerBinding.instance.debugGetRequestedPerformanceMode();
expect(mode, isNull);

View File

@ -650,7 +650,7 @@ void main() {
);
testWidgets(
'decoration can be overrriden',
'decoration can be overridden',
(WidgetTester tester) async {
await tester.pumpWidget(
const CupertinoApp(

View File

@ -38,20 +38,20 @@ void main() {
test('addListener and removeListener add and remove listeners.', () {
final ObjectEvent event = ObjectDisposed(object: 'object');
ObjectEvent? recievedEvent;
void listener(ObjectEvent event) => recievedEvent = event;
ObjectEvent? receivedEvent;
void listener(ObjectEvent event) => receivedEvent = event;
expect(ma.hasListeners, isFalse);
ma.addListener(listener);
_checkSdkHandlersSet();
ma.dispatchObjectEvent(event);
expect(recievedEvent, equals(event));
expect(receivedEvent, equals(event));
expect(ma.hasListeners, isTrue);
recievedEvent = null;
receivedEvent = null;
ma.removeListener(listener);
ma.dispatchObjectEvent(event);
expect(recievedEvent, isNull);
expect(receivedEvent, isNull);
expect(ma.hasListeners, isFalse);
_checkSdkHandlersNotSet();
});

View File

@ -50,8 +50,8 @@ class NestedScrollableCase extends StatelessWidget {
}
}
class NestedDragableCase extends StatelessWidget {
const NestedDragableCase({super.key, required this.testResult});
class NestedDraggableCase extends StatelessWidget {
const NestedDraggableCase({super.key, required this.testResult});
final TestResult testResult;
@ -120,7 +120,7 @@ void main() {
await tester.pumpWidget(MaterialApp(
title: 'Scroll Bug',
home: NestedDragableCase(testResult: result),
home: NestedDraggableCase(testResult: result),
));
// By dragging the scroll view more than the configured touch slop above but less than

Some files were not shown because too many files have changed in this diff Show More