Skip to content

Commit

Permalink
Fixed few typos (flutter#147087)
Browse files Browse the repository at this point in the history
Here's another PR with a couple of typos fixed. As you can see there was a typo in _fileReferenceI**n**dentifiers_, in class _ParsedProjectInfo._ Maybe we should do some check on that since I'm not sure if that property is used somewhere outside Flutter?
  • Loading branch information
anisalibegic authored Apr 22, 2024
1 parent d737b7b commit 140edb9
Show file tree
Hide file tree
Showing 25 changed files with 64 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class WaterfallNotchedRectangle extends NotchedShape {
// A detailed explanation and the derivation of the formulas below is
// available at: https://goo.gl/Ufzrqn

// s1, s2 are the two knobs controlling the behavior of the bezzier curve.
// s1, s2 are the two knobs controlling the behavior of the bezier curve.
const double s1 = 21.0;
const double s2 = 6.0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ void main([List<String> args = const <String>[]]) {
await driver.requestData('isTestingReplyOnly') == 'true';

if (args.contains('--with_semantics')) {
stdout.writeln('Enabeling semantics...');
stdout.writeln('Enabling semantics...');
await driver.setSemantics(true);
}

Expand Down
2 changes: 1 addition & 1 deletion examples/api/lib/material/text_button/text_button.0.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class _TextButtonExampleState extends State<TextButtonExample> {

// This gradient's appearance reflects the button's state.
// Always return a gradient decoration so that AnimatedContainer
// can interpolorate in between. Used by TextButton #7.
// can interpolate in between. Used by TextButton #7.
Decoration? statesToDecoration(Set<MaterialState> states) {
if (states.contains(MaterialState.pressed)) {
return BoxDecoration(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:flutter_api_samples/material/dropdown_menu/dropdown_menu.2.dart'
import 'package:flutter_test/flutter_test.dart';

void main() {
testWidgets('DropdownMenu cursor behavoir', (WidgetTester tester) async {
testWidgets('DropdownMenu cursor behavior', (WidgetTester tester) async {
await tester.pumpWidget(
const example.DropdownMenuApp(),
);
Expand Down
6 changes: 3 additions & 3 deletions packages/flutter/lib/src/material/material_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import 'input_border.dart';
/// See also:
///
/// * [WidgetState], a general non-Material version that can be used
/// interchangebly with `MaterialState`. They functionally work the same,
/// interchangeably with `MaterialState`. They functionally work the same,
/// except [WidgetState] can be used outside of Material.
/// * [MaterialStateProperty], an interface for objects that "resolve" to
/// different values depending on a widget's material state.
Expand Down Expand Up @@ -59,7 +59,7 @@ typedef MaterialState = WidgetState;
/// See also:
///
/// * [WidgetPropertyResolver], the non-Material form of `MaterialPropertyResolver`
/// that can be used interchangably with `MaterialPropertyResolver.
/// that can be used interchangeably with `MaterialPropertyResolver.
@Deprecated(
'Use WidgetPropertyResolver instead. '
'Moved to the Widgets layer to make code available outside of Material. '
Expand Down Expand Up @@ -118,7 +118,7 @@ typedef MaterialPropertyResolver<T> = WidgetPropertyResolver<T>;
/// See also
///
/// * [WidgetStateColor], the non-Material version that can be used
/// interchangably with `MaterialStateColor`.
/// interchangeably with `MaterialStateColor`.
@Deprecated(
'Use WidgetStateColor instead. '
'Moved to the Widgets layer to make code available outside of Material. '
Expand Down
6 changes: 3 additions & 3 deletions packages/flutter/lib/src/painting/text_painter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1470,13 +1470,13 @@ class TextPainter {
.getBoxesForRange(graphemeRange.start, graphemeRange.end, boxHeightStyle: ui.BoxHeightStyle.strut);

if (boxes.isNotEmpty) {
final bool ahchorToLeft = switch (glyphInfo.writingDirection) {
final bool anchorToLeft = switch (glyphInfo.writingDirection) {
TextDirection.ltr => anchorToLeadingEdge,
TextDirection.rtl => !anchorToLeadingEdge,
};
final TextBox box = ahchorToLeft ? boxes.first : boxes.last;
final TextBox box = anchorToLeft ? boxes.first : boxes.last;
metrics = _LineCaretMetrics(
offset: Offset(ahchorToLeft ? box.left : box.right, box.top),
offset: Offset(anchorToLeft ? box.left : box.right, box.top),
writingDirection: box.direction,
);
} else {
Expand Down
6 changes: 3 additions & 3 deletions packages/flutter/lib/src/rendering/box.dart
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ extension type const BaselineOffset(double? offset) {
///
/// Subclasses do not own their own cache storage. Rather, their [memoize]
/// implementation takes a `cacheStorage`. If a prior computation with the same
/// input valus has already been memoized in `cacheStorage`, it returns the
/// input values has already been memoized in `cacheStorage`, it returns the
/// memoized value without running `computer`. Otherwise the method runs the
/// `computer` to compute the return value, and caches the result to
/// `cacheStorage`.
Expand Down Expand Up @@ -2046,7 +2046,7 @@ abstract class RenderBox extends RenderObject {
final double? baselineOffset = _computeIntrinsics(_CachedLayoutCalculation.baseline, (constraints, baseline), _computeDryBaseline).offset;
// This assert makes sure computeDryBaseline always gets called in debug mode,
// in case the computeDryBaseline implementation invokes debugCannotComputeDryLayout.
// This check should be skipped when debugCheckintIntrinsics is true to avoid
// This check should be skipped when debugCheckingIntrinsics is true to avoid
// slowing down the app significantly.
assert(RenderObject.debugCheckingIntrinsics || baselineOffset == computeDryBaseline(constraints, baseline));
return baselineOffset;
Expand Down Expand Up @@ -2194,7 +2194,7 @@ abstract class RenderBox extends RenderObject {
'${objectRuntimeType(renderBoxDoingDryBaseline, 'RenderBox')}.computeDryBaseline.'
'The computeDryBaseline method must not access '
'${renderBoxDoingDryBaseline == this ? "the RenderBox's own size" : "the size of its child"},'
"because it's established in peformLayout or peformResize using different BoxConstraints."
"because it's established in performLayout or performResize using different BoxConstraints."
);
assert(size == _size);
}
Expand Down
6 changes: 3 additions & 3 deletions packages/flutter/lib/src/rendering/flex.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ extension type const _AxisSize._(Size _size) {
// The ascent and descent of a baseline-aligned child.
//
// Baseline-aligned children contributes to the cross axis extent of a [RenderFlex]
// differently from chidren with other [CrossAxisAlignment]s.
// differently from children with other [CrossAxisAlignment]s.
extension type const _AscentDescent._((double ascent, double descent)? ascentDescent) {
factory _AscentDescent({ required double? baselineOffset, required double crossSize }) {
return baselineOffset == null ? none : _AscentDescent._((baselineOffset, crossSize - baselineOffset));
Expand Down Expand Up @@ -76,7 +76,7 @@ class _LayoutSizes {
final _AxisSize axisSize;

// The free space along the main axis. If the value is positive, the free space
// will be distributed according to the [MainAxisAliggnment] specified. A
// will be distributed according to the [MainAxisAlignment] specified. A
// negative value indicates the RenderFlex overflows along the main axis.
final double mainAxisFreeSpace;

Expand Down Expand Up @@ -1060,7 +1060,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
final double? baselineOffset = sizes.baselineOffset;
assert(baselineOffset == null || (crossAxisAlignment == CrossAxisAlignment.baseline && direction == Axis.horizontal));

// Position all chilren in visual order: starting from the top-left child and
// Position all children in visual order: starting from the top-left child and
// work towards the child that's farthest away from the origin.
double childMainPosition = leadingSpace;
for (RenderBox? child = topLeftChild; child != null; child = nextChild(child)) {
Expand Down
4 changes: 2 additions & 2 deletions packages/flutter/lib/src/rendering/paragraph.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2045,7 +2045,7 @@ class _SelectableFragment with Selectable, Diagnosticable, ChangeNotifier implem
// [WidgetSpan]s.
//
// This method differs from [_updateSelectionStartEdgeByMultiSelectableBoundary]
// in that to mantain the origin text boundary selected at a placeholder,
// in that to maintain the origin text boundary selected at a placeholder,
// this selectable fragment must be aware of the [RenderParagraph] that closely
// encompasses the complete origin text boundary.
//
Expand Down Expand Up @@ -2229,7 +2229,7 @@ class _SelectableFragment with Selectable, Diagnosticable, ChangeNotifier implem
// [WidgetSpan]s.
//
// This method differs from [_updateSelectionEndEdgeByMultiSelectableBoundary]
// in that to mantain the origin text boundary selected at a placeholder, this
// in that to maintain the origin text boundary selected at a placeholder, this
// selectable fragment must be aware of the [RenderParagraph] that closely
// encompasses the complete origin text boundary.
//
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/widgets/overlay.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1929,7 +1929,7 @@ final class _OverlayEntryLocation extends LinkedListEntry<_OverlayEntryLocation>
//
// Generally, `assert(_debugIsLocationValid())` should be used to prevent
// invalid accesses to an invalid `_OverlayEntryLocation` object. Exceptions
// to this rule are _removeChild, _deactive, which will be called when the
// to this rule are _removeChild, _deactivate, which will be called when the
// OverlayPortal is being removed from the widget tree and may use the
// location information to perform cleanup tasks.
//
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/widgets/routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ abstract interface class PredictiveBackRoute {
/// Handles a predictive back gesture ending successfully.
void handleCommitBackGesture();

/// Handles a predictive back gesture ending in cancelation.
/// Handles a predictive back gesture ending in cancellation.
void handleCancelBackGesture();
}

Expand Down
4 changes: 2 additions & 2 deletions packages/flutter/test/material/filter_chip_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ void main() {
expect(chipTopLeft.dx, avatarCenter.dx - (labelSize.width / 2) - padding - border);
expect(chipTopLeft.dy, avatarCenter.dy - (labelSize.width / 2) - padding - border);

// Calculate the distnance between avatar and label.
// Calculate the distance between avatar and label.
Offset labelTopLeft = tester.getTopLeft(find.byType(Container));
expect(labelTopLeft.dx, avatarCenter.dx + (labelSize.width / 2) + labelPadding);

Expand All @@ -1227,7 +1227,7 @@ void main() {
expect(chipTopLeft.dx, avatarCenter.dx - (iconSize / 2) - padding - border);
expect(chipTopLeft.dy, avatarCenter.dy - (labelSize.width / 2) - padding - border);

// Calculate the distnance between avatar and label.
// Calculate the distance between avatar and label.
labelTopLeft = tester.getTopLeft(find.byType(Container));
expect(labelTopLeft.dx, avatarCenter.dx + (iconSize / 2) + labelPadding);
});
Expand Down
4 changes: 2 additions & 2 deletions packages/flutter/test/material/input_chip_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ void main() {
expect(chipTopLeft.dx, avatarCenter.dx - (labelSize.width / 2) - padding - border);
expect(chipTopLeft.dy, avatarCenter.dy - (labelSize.width / 2) - padding - border);

// Calculate the distnance between avatar and label.
// Calculate the distance between avatar and label.
Offset labelTopLeft = tester.getTopLeft(find.byType(Container));
expect(labelTopLeft.dx, avatarCenter.dx + (labelSize.width / 2) + labelPadding);

Expand All @@ -541,7 +541,7 @@ void main() {
expect(chipTopLeft.dx, avatarCenter.dx - (iconSize / 2) - padding - border);
expect(chipTopLeft.dy, avatarCenter.dy - (labelSize.width / 2) - padding - border);

// Calculate the distnance between avatar and label.
// Calculate the distance between avatar and label.
labelTopLeft = tester.getTopLeft(find.byType(Container));
expect(labelTopLeft.dx, avatarCenter.dx + (iconSize / 2) + labelPadding);
});
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/test/material/input_decorator_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3263,7 +3263,7 @@ void main() {
);

// Label and input are horizontally aligned despite `alignLabelWithHint` being false (default value).
// The reason is that `alignLabelWithHint` was initially intended for vertical alignement only.
// The reason is that `alignLabelWithHint` was initially intended for vertical alignment only.
// See https://github.com/flutter/flutter/pull/24993 which introduced `alignLabelWithHint` parameter.
// See https://github.com/flutter/flutter/pull/115409 which used `alignLabelWithHint` for
// horizontal alignment in outlined text field.
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/test/material/scaffold_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2867,7 +2867,7 @@ void main() {
expect(tester.takeException(), isNull);
});

testWidgets('ScaffoldMessenger showSnackBar default animatiom', (WidgetTester tester) async {
testWidgets('ScaffoldMessenger showSnackBar default animation', (WidgetTester tester) async {
await tester.pumpWidget(MaterialApp(
home: Scaffold(
body: Builder(
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/test/painting/text_painter_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1680,7 +1680,7 @@ void main() {
..layout();
expect(painter.height, 100);
});
}, skip: kIsWeb && !isSkiaWeb); // [intended] strut spport for HTML renderer https://github.com/flutter/flutter/issues/32243.
}, skip: kIsWeb && !isSkiaWeb); // [intended] strut support for HTML renderer https://github.com/flutter/flutter/issues/32243.

test('getOffsetForCaret does not crash on decomposed characters', () {
final TextPainter painter = TextPainter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void main() {
);
});

test('Cactches inconsistencies between computeDryBaseline and computeDistanceToActualBaseline', () {
test('Catches inconsistencies between computeDryBaseline and computeDistanceToActualBaseline', () {
final RenderDryBaselineTestBox test = RenderDryBaselineTestBox();
layout(test, phase: EnginePhase.composite);

Expand Down
4 changes: 2 additions & 2 deletions packages/flutter/test/rendering/flex_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ void main() {

test('cross axis intrinsics, with ascending flex flow layout', () {
const BoxConstraints square = BoxConstraints.tightFor(width: 5.0, height: 5.0);
// 3 'A's separated by zero-width spaces. Max instrinsic width = 30, min intrinsic width = 10
// 3 'A's separated by zero-width spaces. Max intrinsic width = 30, min intrinsic width = 10
final TextSpan textSpan = TextSpan(text: List<String>.filled(3, 'A').join('\u200B') , style: const TextStyle(fontSize: 10));
final RenderConstrainedBox box1 = RenderConstrainedBox(additionalConstraints: square);
final RenderParagraph box2 = RenderParagraph(textSpan, textDirection: TextDirection.ltr);
Expand Down Expand Up @@ -711,7 +711,7 @@ void main() {

test('cross axis intrinsics, with descending flex flow layout', () {
const BoxConstraints square = BoxConstraints.tightFor(width: 5.0, height: 5.0);
// 3 'A's separated by zero-width spaces. Max instrinsic width = 30, min intrinsic width = 10
// 3 'A's separated by zero-width spaces. Max intrinsic width = 30, min intrinsic width = 10
final TextSpan textSpan = TextSpan(text: List<String>.filled(3, 'A').join('\u200B') , style: const TextStyle(fontSize: 10));
final RenderConstrainedBox box1 = RenderConstrainedBox(additionalConstraints: square);
final RenderParagraph box2 = RenderParagraph(textSpan, textDirection: TextDirection.ltr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,5 @@ void main() {

paragraph.strutStyle = const StrutStyle(fontSize: 100, forceStrutHeight: true);
expect(paragraph.getMaxIntrinsicHeight(double.infinity), 100);
}, skip: kIsWeb && !isSkiaWeb); // [intended] strut spport for HTML renderer https://github.com/flutter/flutter/issues/32243.
}, skip: kIsWeb && !isSkiaWeb); // [intended] strut support for HTML renderer https://github.com/flutter/flutter/issues/32243.
}
2 changes: 1 addition & 1 deletion packages/flutter_goldens/lib/flutter_goldens.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export 'skia_client.dart';
// titled "Inconsequential golden test" in this file:
// /packages/flutter/test/widgets/basic_test.dart

// TODO(ianh): sort the parameters and arguments in this file so they use a consistent order througout.
// TODO(ianh): sort the parameters and arguments in this file so they use a consistent order throughout.

const String _kFlutterRootKey = 'FLUTTER_ROOT';

Expand Down
6 changes: 3 additions & 3 deletions packages/flutter_tools/gradle/src/main/groovy/flutter.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -1148,9 +1148,9 @@ class FlutterPlugin implements Plugin<Project> {
bundleSkSLPathValue = project.property(propBundleSkslPath)
}
String performanceMeasurementFileValue
final String propPerformanceMesaurementFile = "performance-measurement-file"
if (project.hasProperty(propPerformanceMesaurementFile)) {
performanceMeasurementFileValue = project.property(propPerformanceMesaurementFile)
final String propPerformanceMeasurementFile = "performance-measurement-file"
if (project.hasProperty(propPerformanceMeasurementFile)) {
performanceMeasurementFileValue = project.property(propPerformanceMeasurementFile)
}
String codeSizeDirectoryValue
final String propCodeSizeDirectory = "code-size-directory"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,31 @@ class SwiftPackageManagerIntegrationMigration extends ProjectMigrator {
final File _xcodeProjectInfoFile;
final PlistParser _plistParser;

/// New identifer for FlutterGeneratedPluginSwiftPackage PBXBuildFile.
/// New identifier for FlutterGeneratedPluginSwiftPackage PBXBuildFile.
static const String _flutterPluginsSwiftPackageBuildFileIdentifier = '78A318202AECB46A00862997';

/// New identifer for FlutterGeneratedPluginSwiftPackage XCLocalSwiftPackageReference.
/// New identifier for FlutterGeneratedPluginSwiftPackage XCLocalSwiftPackageReference.
static const String _localFlutterPluginsSwiftPackageReferenceIdentifer = '781AD8BC2B33823900A9FFBB';

/// New identifer for FlutterGeneratedPluginSwiftPackage XCSwiftPackageProductDependency.
/// New identifier for FlutterGeneratedPluginSwiftPackage XCSwiftPackageProductDependency.
static const String _flutterPluginsSwiftPackageProductDependencyIdentifer = '78A3181F2AECB46A00862997';

/// Existing iOS identifer for Runner PBXFrameworksBuildPhase.
/// Existing iOS identifier for Runner PBXFrameworksBuildPhase.
static const String _iosRunnerFrameworksBuildPhaseIdentifer = '97C146EB1CF9000F007C117D';

/// Existing macOS identifer for Runner PBXFrameworksBuildPhase.
/// Existing macOS identifier for Runner PBXFrameworksBuildPhase.
static const String _macosRunnerFrameworksBuildPhaseIdentifer = '33CC10EA2044A3C60003C045';

/// Existing iOS identifer for Runner PBXNativeTarget.
/// Existing iOS identifier for Runner PBXNativeTarget.
static const String _iosRunnerNativeTargetIdentifer = '97C146ED1CF9000F007C117D';

/// Existing macOS identifer for Runner PBXNativeTarget.
/// Existing macOS identifier for Runner PBXNativeTarget.
static const String _macosRunnerNativeTargetIdentifer = '33CC10EC2044A3C60003C045';

/// Existing iOS identifer for Runner PBXProject.
/// Existing iOS identifier for Runner PBXProject.
static const String _iosProjectIdentifier = '97C146E61CF9000F007C117D';

/// Existing macOS identifer for Runner PBXProject.
/// Existing macOS identifier for Runner PBXProject.
static const String _macosProjectIdentifier = '33CC10E52044A3C60003C045';

File get backupProjectSettings => _fileSystem
Expand Down Expand Up @@ -160,7 +160,7 @@ class SwiftPackageManagerIntegrationMigration extends ProjectMigrator {
// TODO(vashworth): Add link to instructions on how to manually integrate
// once available on website.
throwToolExit(
'An error occured when adding Swift Package Manager integration:\n'
'An error occurred when adding Swift Package Manager integration:\n'
' $e\n\n'
'Swift Package Manager is currently an experimental feature, please file a bug at\n'
' https://github.com/flutter/flutter/issues/new?template=1_activation.yml \n'
Expand Down Expand Up @@ -842,7 +842,7 @@ class SchemeInfo {
class ParsedProjectInfo {
ParsedProjectInfo._({
required this.buildFileIdentifiers,
required this.fileReferenceIndentifiers,
required this.fileReferenceIdentifiers,
required this.parsedGroups,
required this.frameworksBuildPhases,
required this.nativeTargets,
Expand Down Expand Up @@ -896,7 +896,7 @@ class ParsedProjectInfo {

return ParsedProjectInfo._(
buildFileIdentifiers: buildFiles,
fileReferenceIndentifiers: references,
fileReferenceIdentifiers: references,
parsedGroups: groups,
frameworksBuildPhases: buildPhases,
nativeTargets: native,
Expand All @@ -911,7 +911,7 @@ class ParsedProjectInfo {
List<String> buildFileIdentifiers;

/// List of identifiers under PBXFileReference section.
List<String> fileReferenceIndentifiers;
List<String> fileReferenceIdentifiers;

/// List of [ParsedProjectGroup] items under PBXGroup section.
List<ParsedProjectGroup> parsedGroups;
Expand Down
Loading

0 comments on commit 140edb9

Please sign in to comment.