chore: fix some comments (#145397)

fix some comments
This commit is contained in:
goodmost 2024-03-20 01:00:24 +08:00 committed by GitHub
parent 28498fe18a
commit 3236957f02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 19 additions and 19 deletions

View file

@ -28,7 +28,7 @@ Future<void> main() async {
// to be verified.
final Future<String> inputEventWasVerified = driver.requestData('input_was_verified');
// Keep issueing taps until we get the requested data. The actual setup
// Keep issuing taps until we get the requested data. The actual setup
// of the platform view is asynchronous so we might have to tap more than
// once to get a response.
bool stop = false;

View file

@ -24,7 +24,7 @@ subtle translation issues.
## How it works
- Each `lib/*_main.dart` file is a Flutter app instrumenting a test case.
- There is a cooresponding `test_driver/*_test.dart` that runs assertions.
- There is a corresponding `test_driver/*_test.dart` that runs assertions.
To run the test cases locally, use `flutter drive`[^2]:

View file

@ -7,7 +7,7 @@ import 'package:flutter_api_samples/widgets/editable_text/text_editing_controlle
import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('Initial selection is collasped at offset 0', (WidgetTester tester) async {
testWidgets('Initial selection is collapsed at offset 0', (WidgetTester tester) async {
await tester.pumpWidget(
const example.TextEditingControllerExampleApp(),
);

View file

@ -405,7 +405,7 @@ class CupertinoDatePicker extends StatefulWidget {
/// Defaults to null, which disables background painting entirely.
final Color? backgroundColor;
/// Whether to to show day of week alongside day. Defaults to false.
/// Whether to show day of week alongside day. Defaults to false.
final bool showDayOfWeek;
/// {@macro flutter.cupertino.picker.itemExtent}

View file

@ -333,7 +333,7 @@ class DatePickerThemeData with Diagnosticable {
final MaterialStateProperty<Color?>? rangeSelectionOverlayColor;
/// Overrides the default color used to paint the horizontal divider
/// below the header text when dialog is in in portrait orientation
/// below the header text when dialog is in portrait orientation
/// and vertical divider when the dialog is in landscape orientation.
final Color? dividerColor;

View file

@ -35,7 +35,7 @@ enum _RadioType { material, adaptive }
///
/// The [selected] property on this widget is similar to the [ListTile.selected]
/// property. The [fillColor] in the selected state is used for the selected item's
/// text color. It it is null, the [activeColor] is used.
/// text color. If it is null, the [activeColor] is used.
///
/// This widget does not coordinate the [selected] state and the
/// [checked] state; to have the list tile appear selected when the

View file

@ -271,7 +271,7 @@ class TimePickerThemeData with Diagnosticable {
/// `RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4.0)))`.
final ShapeBorder? shape;
/// The color of the time selector seperator between the hour and minute controls.
/// The color of the time selector separator between the hour and minute controls.
///
/// if this is null, the time picker defaults to the overall theme's
/// [ColorScheme.onSurface].
@ -280,7 +280,7 @@ class TimePickerThemeData with Diagnosticable {
/// [hourMinuteTextColor].
final MaterialStateProperty<Color?>? timeSelectorSeparatorColor;
/// Used to configure the text style for the time selector seperator between the hour
/// Used to configure the text style for the time selector separator between the hour
/// and minute controls.
///
/// If this is null, the time picker defaults to the overall theme's

View file

@ -2074,11 +2074,11 @@ abstract class RenderBox extends RenderObject {
/// would results in UI changes when [paint] is called, or hit-testing behavior
/// changes when [hitTest] is called. Moreover, accessing the current layout
/// of this [RenderBox] or child [RenderBox]es (including accessing [size], or
/// `child.size`) usually indicates a bug in the implementaion, as the current
/// `child.size`) usually indicates a bug in the implementation, as the current
/// layout is typically calculated using a set of [BoxConstraints] that's
/// different from the `constraints` given as the first parameter. To get the
/// size of this [RenderBox] or a child [RenderBox] in this method's
/// implementatin, use the [getDryLayout] method instead.
/// implementation, use the [getDryLayout] method instead.
///
/// The implementation must return a value that represents the distance from
/// the top of the box to the first baseline of the box's contents, for the

View file

@ -173,7 +173,7 @@ void main() {
expect(tester.state<_DidChangeDependencySpyState>(find.byType(DidChangeDependencySpy)).didChangeDependenciesCount, 3);
});
testWidgets('causes didChangeDependencies to be called on move even if dependency was non-existant', (WidgetTester tester) async {
testWidgets('causes didChangeDependencies to be called on move even if dependency was non-existent', (WidgetTester tester) async {
MyInheritedWidget? inheritedWidget;
final Key globalKey = GlobalKey();

View file

@ -2522,10 +2522,10 @@ NumberFormat.decimalPatternDigits(
testWithoutContext('dollar signs are escaped properly when there is a select clause', () {
const String dollarSignWithSelect = r'''
{
"dollarSignWithSelect": "$nice_bug\nHello Bug! Manifistation #1 {selectPlaceholder, select, case{message} other{messageOther}}"
"dollarSignWithSelect": "$nice_bug\nHello Bug! Manifestation #1 {selectPlaceholder, select, case{message} other{messageOther}}"
}''';
setupLocalizations(<String, String>{ 'en': dollarSignWithSelect });
expect(getGeneratedFileContent(locale: 'en'), contains(r'\$nice_bug\nHello Bug! Manifistation #1 $_temp0'));
expect(getGeneratedFileContent(locale: 'en'), contains(r'\$nice_bug\nHello Bug! Manifestation #1 $_temp0'));
});
testWithoutContext('can generate method with named parameter', () {

View file

@ -275,13 +275,13 @@ void main() {
'open',
<String>[
'-a',
'/non_existant_path',
'/non_existent_path',
'-g',
'-j',
'-F',
xcworkspace.path,
],
'The application /non_existant_path cannot be opened for an unexpected reason',
'The application /non_existent_path cannot be opened for an unexpected reason',
),
),
]);
@ -304,7 +304,7 @@ void main() {
expect(
logger.errorText,
contains('The application /non_existant_path cannot be opened for an unexpected reason'),
contains('The application /non_existent_path cannot be opened for an unexpected reason'),
);
expect(fakeProcessManager, hasNoRemainingExpectations);
expect(status, false);
@ -807,7 +807,7 @@ void main() {
expect(status, isTrue);
});
testWithoutContext('prints error message when deleting temporary directory that is nonexistant', () async {
testWithoutContext('prints error message when deleting temporary directory that is nonexistent', () async {
final Xcode xcode = setupXcode(
fakeProcessManager: fakeProcessManager,
fileSystem: fileSystem,
@ -914,7 +914,7 @@ void main() {
expect(exitStatus, isTrue);
});
testWithoutContext('does not crash when deleting temporary directory that is nonexistant when force exiting', () async {
testWithoutContext('does not crash when deleting temporary directory that is nonexistent when force exiting', () async {
final Xcode xcode = setupXcode(
fakeProcessManager: FakeProcessManager.any(),
fileSystem: fileSystem,

View file

@ -38,7 +38,7 @@ void main() {
);
});
test('framework name name confilicts', () {
test('framework name conflicts', () {
final Set<String> alreadyTakenNames = <String>{};
expect(
frameworkUri('libfoo.dylib', alreadyTakenNames),