diff --git a/packages/material_ui/README.md b/packages/material_ui/README.md index 2d558ae72c85..044e0a866ad4 100644 --- a/packages/material_ui/README.md +++ b/packages/material_ui/README.md @@ -106,7 +106,7 @@ Scaffold( ## Features -The `material_ui` packcage contains everything you need to create a +The `material_ui` package contains everything you need to create a fully-featured Material app, such as: * **App Structure & Navigation**: `MaterialApp`, `Scaffold`, `AppBar`, diff --git a/packages/material_ui/example/test/navigation_rail/navigation_rail.0_test.dart b/packages/material_ui/example/test/navigation_rail/navigation_rail.0_test.dart index ea7d66666399..9800254a5a9e 100644 --- a/packages/material_ui/example/test/navigation_rail/navigation_rail.0_test.dart +++ b/packages/material_ui/example/test/navigation_rail/navigation_rail.0_test.dart @@ -57,7 +57,7 @@ void main() { ) async { await tester.pumpWidget(const example.NavigationRailExampleApp()); - // initial group alignment set top top. + // initial group alignment set to top. expect(find.text('Group alignment: -1.0'), findsOneWidget); // switch to center alignment diff --git a/packages/material_ui/lib/src/date_picker_theme.dart b/packages/material_ui/lib/src/date_picker_theme.dart index b12203b7bc72..32e447fa2e53 100644 --- a/packages/material_ui/lib/src/date_picker_theme.dart +++ b/packages/material_ui/lib/src/date_picker_theme.dart @@ -1004,7 +1004,7 @@ class DatePickerThemeData with Diagnosticable { /// given an explicit non-null value. class DatePickerTheme extends InheritedTheme { /// Creates a [DatePickerTheme] that controls visual parameters for - /// descendent [DatePickerDialog]s. + /// descendant [DatePickerDialog]s. const DatePickerTheme({super.key, required this.data, required super.child}); /// Specifies the visual properties used by descendant [DatePickerDialog] diff --git a/packages/material_ui/lib/src/dialog.dart b/packages/material_ui/lib/src/dialog.dart index 4d68231347d5..63f144562a9f 100644 --- a/packages/material_ui/lib/src/dialog.dart +++ b/packages/material_ui/lib/src/dialog.dart @@ -50,7 +50,7 @@ const EdgeInsets _defaultInsetPadding = EdgeInsets.symmetric(horizontal: 40.0, v /// /// /// -/// ## Contraints +/// ## Constraints /// The Material 3 guideline recommends that a dialog should have a maximal width of 560dp. /// For historical reasons, Flutter's [Dialog] widget does not come with this constraint by default. /// For applications targeting large screens such as desktop or Web, it is recommended to diff --git a/packages/material_ui/lib/src/dropdown.dart b/packages/material_ui/lib/src/dropdown.dart index 59f784647438..748167b634e0 100644 --- a/packages/material_ui/lib/src/dropdown.dart +++ b/packages/material_ui/lib/src/dropdown.dart @@ -1718,12 +1718,12 @@ class _DropdownButtonState extends State> with WidgetsBindi if (widget._inputDecoration != null) { final bool filled = widget._inputDecoration?.filled ?? InputDecorationTheme.of(context).filled; - final bool oulined = + final bool outlined = widget._inputDecoration?.border?.isOutline ?? InputDecorationTheme.of(context).border?.isOutline ?? false; - final suffixIconEndMargin = (filled || oulined) ? 12.0 : 0.0; + final suffixIconEndMargin = (filled || outlined) ? 12.0 : 0.0; InputDecoration effectiveDecoration = widget._inputDecoration!.copyWith( // Override the suffix icon constraints to allow the // icon alignment to match the regular dropdown button. diff --git a/packages/material_ui/lib/src/dropdown_menu.dart b/packages/material_ui/lib/src/dropdown_menu.dart index 21798bcc31de..bb1ad621c3a5 100644 --- a/packages/material_ui/lib/src/dropdown_menu.dart +++ b/packages/material_ui/lib/src/dropdown_menu.dart @@ -1287,7 +1287,7 @@ class _DropdownMenuState extends State> { final MaterialLocalizations localizations = MaterialLocalizations.of(context); final Widget textField = Semantics( button: isButton, - // This is set specificly for iOS because iOS does not have any native + // This is set specifically for iOS because iOS does not have any native // APIs to show whether the menu is expanded or collapsed. hint: Theme.of(context).platform == TargetPlatform.iOS ? _controller.isOpen diff --git a/packages/material_ui/lib/src/menu_anchor.dart b/packages/material_ui/lib/src/menu_anchor.dart index 14fa9e6b15e1..bcc1a17befce 100644 --- a/packages/material_ui/lib/src/menu_anchor.dart +++ b/packages/material_ui/lib/src/menu_anchor.dart @@ -1064,7 +1064,7 @@ class MenuItemButton extends StatefulWidget { /// The direction in which the menu item expands. /// - /// If the menu item button is a descendent of [MenuAnchor] or [MenuBar], then + /// If the menu item button is a descendant of [MenuAnchor] or [MenuBar], then /// this property is ignored. /// /// If [overflowAxis] is [Axis.vertical], the menu will be expanded vertically. diff --git a/packages/material_ui/lib/src/search.dart b/packages/material_ui/lib/src/search.dart index 1c6721dfdb2b..6ab750784a42 100644 --- a/packages/material_ui/lib/src/search.dart +++ b/packages/material_ui/lib/src/search.dart @@ -351,7 +351,7 @@ abstract class SearchDelegate { ..pop(result); } - /// Closes the search page and returns to the underlying route whitout result. + /// Closes the search page and returns to the underlying route without result. void _pop(BuildContext context) { _currentBody = null; _focusNode?.unfocus(); diff --git a/packages/material_ui/lib/src/segmented_button_theme.dart b/packages/material_ui/lib/src/segmented_button_theme.dart index e5e1a18ea8c8..08dccba6af48 100644 --- a/packages/material_ui/lib/src/segmented_button_theme.dart +++ b/packages/material_ui/lib/src/segmented_button_theme.dart @@ -110,7 +110,7 @@ class SegmentedButtonThemeData with Diagnosticable { /// given an explicit non-null value. class SegmentedButtonTheme extends InheritedTheme { /// Creates a [SegmentedButtonTheme] that controls visual parameters for - /// descendent [SegmentedButton]s. + /// descendant [SegmentedButton]s. const SegmentedButtonTheme({super.key, required this.data, required super.child}); /// Specifies the visual properties used by descendant [SegmentedButton] diff --git a/packages/material_ui/lib/src/stepper.dart b/packages/material_ui/lib/src/stepper.dart index ff82c20cd05a..136f4e55b547 100644 --- a/packages/material_ui/lib/src/stepper.dart +++ b/packages/material_ui/lib/src/stepper.dart @@ -403,7 +403,7 @@ class Stepper extends StatefulWidget { /// The padding around the header row in both [StepperType.vertical] and /// [StepperType.horizontal] steppers. /// - /// Defaults to to `EdgeInsets.symmetric(horizontal: 24.0)`. + /// Defaults to `EdgeInsets.symmetric(horizontal: 24.0)`. final EdgeInsetsGeometry? headerPadding; /// The padding around the content area in both [StepperType.vertical] and diff --git a/packages/material_ui/lib/src/theme_data.dart b/packages/material_ui/lib/src/theme_data.dart index 9835f202f047..3f21a84d69f0 100644 --- a/packages/material_ui/lib/src/theme_data.dart +++ b/packages/material_ui/lib/src/theme_data.dart @@ -272,7 +272,7 @@ class ThemeData with Diagnosticable { /// When [useSystemColors] is true and the platform supports system colors, then the system colors /// will be used to override certain theme colors. The [colorScheme], [textTheme], /// [elevatedButtonTheme], [outlinedButtonTheme], [textButtonTheme], [filledButtonTheme], and - /// [floatingActionButtonTheme] are overriden by the system colors. + /// [floatingActionButtonTheme] are overridden by the system colors. /// /// See also: /// diff --git a/packages/material_ui/pending_changelogs/change_2026_08_18_1787089293872.yaml b/packages/material_ui/pending_changelogs/change_2026_08_18_1787089293872.yaml new file mode 100644 index 000000000000..bb10d9c376a6 --- /dev/null +++ b/packages/material_ui/pending_changelogs/change_2026_08_18_1787089293872.yaml @@ -0,0 +1,3 @@ +changelog: | + - Fixes typos in library code and tests. +version: patch diff --git a/packages/material_ui/pubspec.yaml b/packages/material_ui/pubspec.yaml index 74627a0b025a..262ee102bcf8 100644 --- a/packages/material_ui/pubspec.yaml +++ b/packages/material_ui/pubspec.yaml @@ -2,7 +2,7 @@ name: material_ui description: The official Flutter Material UI Library, implementing Google's Material Design design system. version: 1.0.0 repository: https://github.com/flutter/packages/tree/main/packages/material_ui -issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A%20material%20design%22 +issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A%20material%20design%22 environment: sdk: ^3.12.0 diff --git a/packages/material_ui/test/carousel_test.dart b/packages/material_ui/test/carousel_test.dart index 4218b2f78eae..5838b876f89b 100644 --- a/packages/material_ui/test/carousel_test.dart +++ b/packages/material_ui/test/carousel_test.dart @@ -1638,7 +1638,7 @@ void main() { }); // Regression test for https://github.com/flutter/flutter/issues/167621. - testWidgets('CarouselView.weigted weigths are applied when viewport dimension is updated', ( + testWidgets('CarouselView.weighted weights are applied when viewport dimension is updated', ( WidgetTester tester, ) async { addTearDown(() => tester.binding.setSurfaceSize(null)); diff --git a/packages/material_ui/test/checkbox_test.dart b/packages/material_ui/test/checkbox_test.dart index 3e19060c1887..ba1dd7808dff 100644 --- a/packages/material_ui/test/checkbox_test.dart +++ b/packages/material_ui/test/checkbox_test.dart @@ -1065,10 +1065,10 @@ void main() { }); testWidgets( - 'Material3 - Checkbox visual density cannot be overriden by ThemeData.visualDensity', + 'Material3 - Checkbox visual density cannot be overridden by ThemeData.visualDensity', (WidgetTester tester) async { const key = Key('test'); - Widget buldCheckbox() { + Widget buildCheckbox() { return MaterialApp( theme: theme.copyWith(visualDensity: VisualDensity.compact), home: Material( @@ -1079,7 +1079,7 @@ void main() { ); } - await tester.pumpWidget(buldCheckbox()); + await tester.pumpWidget(buildCheckbox()); await tester.pumpAndSettle(); final RenderBox box = tester.renderObject(find.byKey(key)); expect(box.size, equals(const Size(48, 48))); diff --git a/packages/material_ui/test/date_picker_test.dart b/packages/material_ui/test/date_picker_test.dart index 57d0e0c66abd..cf2329dc3c79 100644 --- a/packages/material_ui/test/date_picker_test.dart +++ b/packages/material_ui/test/date_picker_test.dart @@ -1675,7 +1675,7 @@ void main() { expect(find.text('Select date'), findsOne); }); - // Simulate the portait mode on a device with a small display when the virtual + // Simulate the portrait mode on a device with a small display when the virtual // keyboard is visible. tester.view.viewInsets = const FakeViewPadding(bottom: 1000); await tester.pumpAndSettle(); diff --git a/packages/material_ui/test/date_range_picker_test.dart b/packages/material_ui/test/date_range_picker_test.dart index baecbf8613a5..f4bf3e2eaad4 100644 --- a/packages/material_ui/test/date_range_picker_test.dart +++ b/packages/material_ui/test/date_range_picker_test.dart @@ -1263,7 +1263,7 @@ void main() { expect(find.text('Select range'), findsOne); }); - // Simulate the portait mode on a device with a small display when the virtual + // Simulate the portrait mode on a device with a small display when the virtual // keyboard is visible. tester.view.viewInsets = const FakeViewPadding(bottom: 1000); await tester.pumpAndSettle(); diff --git a/packages/material_ui/test/dropdown_menu_test.dart b/packages/material_ui/test/dropdown_menu_test.dart index 32350b2f7939..e0e253e93e32 100644 --- a/packages/material_ui/test/dropdown_menu_test.dart +++ b/packages/material_ui/test/dropdown_menu_test.dart @@ -4260,7 +4260,7 @@ void main() { }, ); - testWidgets('items can be constrainted to be smaller than the text field with menuStyle', ( + testWidgets('items can be constrained to be smaller than the text field with menuStyle', ( WidgetTester tester, ) async { const longLabel = 'This is a long text that it can overflow.'; diff --git a/packages/material_ui/test/filled_button_theme_test.dart b/packages/material_ui/test/filled_button_theme_test.dart index b99eb89e620e..b5c7fc1cd079 100644 --- a/packages/material_ui/test/filled_button_theme_test.dart +++ b/packages/material_ui/test/filled_button_theme_test.dart @@ -230,7 +230,7 @@ void main() { ); }); - testWidgets('FilledButton repsects Theme shadowColor', (WidgetTester tester) async { + testWidgets('FilledButton respects Theme shadowColor', (WidgetTester tester) async { const colorScheme = ColorScheme.light(); const shadowColor = Color(0xff000001); const overriddenColor = Color(0xff000002); diff --git a/packages/material_ui/test/outlined_button_theme_test.dart b/packages/material_ui/test/outlined_button_theme_test.dart index 393b985ebd02..ef9cdefbd826 100644 --- a/packages/material_ui/test/outlined_button_theme_test.dart +++ b/packages/material_ui/test/outlined_button_theme_test.dart @@ -276,7 +276,7 @@ void main() { ); }); - testWidgets('Material3 - OutlinedButton repsects Theme shadowColor', (WidgetTester tester) async { + testWidgets('Material3 - OutlinedButton respects Theme shadowColor', (WidgetTester tester) async { const colorScheme = ColorScheme.light(); const shadowColor = Color(0xff000001); const overriddenColor = Color(0xff000002); @@ -344,7 +344,7 @@ void main() { expect(material.shadowColor, shadowColor); }); - testWidgets('Material2 - OutlinedButton repsects Theme shadowColor', (WidgetTester tester) async { + testWidgets('Material2 - OutlinedButton respects Theme shadowColor', (WidgetTester tester) async { const colorScheme = ColorScheme.light(); const shadowColor = Color(0xff000001); const overriddenColor = Color(0xff000002); diff --git a/packages/material_ui/test/page_transitions_theme_test.dart b/packages/material_ui/test/page_transitions_theme_test.dart index 5b729e1d5f7e..952ba5cdd8b0 100644 --- a/packages/material_ui/test/page_transitions_theme_test.dart +++ b/packages/material_ui/test/page_transitions_theme_test.dart @@ -959,7 +959,7 @@ void main() { switch (defaultTargetPlatform) { case TargetPlatform.android: - // Shows both pages while doing the "peek" predicitve back transition. + // Shows both pages while doing the "peek" predictive back transition. expect(find.text('push'), findsOneWidget); case TargetPlatform.iOS: case TargetPlatform.macOS: diff --git a/packages/material_ui/test/popup_menu_theme_test.dart b/packages/material_ui/test/popup_menu_theme_test.dart index e7d4df5c567f..aa46762f2700 100644 --- a/packages/material_ui/test/popup_menu_theme_test.dart +++ b/packages/material_ui/test/popup_menu_theme_test.dart @@ -182,7 +182,7 @@ void main() { await tester.pumpAndSettle(); /// The last Material widget under popupButtonApp is the [PopupMenuButton] - /// specified above, so by finding the last descendent of popupButtonApp + /// specified above, so by finding the last descendant of popupButtonApp /// that is of type Material, this code retrieves the built /// [PopupMenuButton]. final Material button = tester.widget( @@ -198,7 +198,7 @@ void main() { expect(button.elevation, 3.0); /// The last DefaultTextStyle widget under popupItemKey is the - /// [PopupMenuItem] specified above, so by finding the last descendent of + /// [PopupMenuItem] specified above, so by finding the last descendant of /// popupItemKey that is of type DefaultTextStyle, this code retrieves the /// built [PopupMenuItem]. DefaultTextStyle popupMenuItemLabel = tester.widget( @@ -306,7 +306,7 @@ void main() { await tester.pumpAndSettle(); /// The last Material widget under popupButtonApp is the [PopupMenuButton] - /// specified above, so by finding the last descendent of popupButtonApp + /// specified above, so by finding the last descendant of popupButtonApp /// that is of type Material, this code retrieves the built /// [PopupMenuButton]. final Material button = tester.widget( @@ -432,7 +432,7 @@ void main() { await tester.pumpAndSettle(); /// The last Material widget under popupButtonApp is the [PopupMenuButton] - /// specified above, so by finding the last descendent of popupButtonApp + /// specified above, so by finding the last descendant of popupButtonApp /// that is of type Material, this code retrieves the built /// [PopupMenuButton]. final Material button = tester.widget( @@ -445,7 +445,7 @@ void main() { expect(button.surfaceTintColor, surfaceTintColor); /// The last DefaultTextStyle widget under popupItemKey is the - /// [PopupMenuItem] specified above, so by finding the last descendent of + /// [PopupMenuItem] specified above, so by finding the last descendant of /// popupItemKey that is of type DefaultTextStyle, this code retrieves the /// built [PopupMenuItem]. final DefaultTextStyle text = tester.widget( @@ -522,7 +522,7 @@ void main() { await tester.pumpAndSettle(); /// The last Material widget under popupButtonApp is the [PopupMenuButton] - /// specified above, so by finding the last descendent of popupButtonApp + /// specified above, so by finding the last descendant of popupButtonApp /// that is of type Material, this code retrieves the built /// [PopupMenuButton]. final Material button = tester.widget( @@ -533,7 +533,7 @@ void main() { expect(button.elevation, 8.0); /// The last DefaultTextStyle widget under popupItemKey is the - /// [PopupMenuItem] specified above, so by finding the last descendent of + /// [PopupMenuItem] specified above, so by finding the last descendant of /// popupItemKey that is of type DefaultTextStyle, this code retrieves the /// built [PopupMenuItem]. final DefaultTextStyle enabledText = tester.widget( @@ -631,7 +631,7 @@ void main() { await tester.pumpAndSettle(); /// The last Material widget under popupButtonApp is the [PopupMenuButton] - /// specified above, so by finding the last descendent of popupButtonApp + /// specified above, so by finding the last descendant of popupButtonApp /// that is of type Material, this code retrieves the built /// [PopupMenuButton]. final Material button = tester.widget( @@ -642,7 +642,7 @@ void main() { expect(button.elevation, popupMenuTheme.elevation); /// The last DefaultTextStyle widget under popupItemKey is the - /// [PopupMenuItem] specified above, so by finding the last descendent of + /// [PopupMenuItem] specified above, so by finding the last descendant of /// popupItemKey that is of type DefaultTextStyle, this code retrieves the /// built [PopupMenuItem]. final DefaultTextStyle text = tester.widget( @@ -725,7 +725,7 @@ void main() { await tester.pumpAndSettle(); /// The last Material widget under popupButtonApp is the [PopupMenuButton] - /// specified above, so by finding the last descendent of popupButtonApp + /// specified above, so by finding the last descendant of popupButtonApp /// that is of type Material, this code retrieves the built /// [PopupMenuButton]. final Material button = tester.widget( @@ -738,7 +738,7 @@ void main() { expect(button.surfaceTintColor, surfaceTintColor); /// The last DefaultTextStyle widget under popupItemKey is the - /// [PopupMenuItem] specified above, so by finding the last descendent of + /// [PopupMenuItem] specified above, so by finding the last descendant of /// popupItemKey that is of type DefaultTextStyle, this code retrieves the /// built [PopupMenuItem]. final DefaultTextStyle text = tester.widget( diff --git a/packages/material_ui/test/range_slider_test.dart b/packages/material_ui/test/range_slider_test.dart index bce8581e9088..026c518eac15 100644 --- a/packages/material_ui/test/range_slider_test.dart +++ b/packages/material_ui/test/range_slider_test.dart @@ -1629,7 +1629,7 @@ void main() { expect( valueIndicatorBox, paints - // Represents the raised button wth next text. + // Represents the raised button with next text. ..path(color: Colors.black) ..paragraph() // Represents the range slider. @@ -3537,7 +3537,7 @@ void main() { ); }); - // Regression test for hhttps://github.com/flutter/flutter/issues/161805 + // Regression test for https://github.com/flutter/flutter/issues/161805 testWidgets('Discrete RangeSlider does not apply thumb padding in a non-rounded track shape', ( WidgetTester tester, ) async { diff --git a/packages/material_ui/test/slider_test.dart b/packages/material_ui/test/slider_test.dart index 44f5d6c6043c..59c8572ab69a 100644 --- a/packages/material_ui/test/slider_test.dart +++ b/packages/material_ui/test/slider_test.dart @@ -3999,7 +3999,7 @@ void main() { ), ), ); - // Initially, the slider does not have focus whe enabled and not tapped. + // Initially, the slider does not have focus when enabled and not tapped. await tester.pumpAndSettle(); expect(value, equals(0.5)); // Get FocusNode from the state of the slider to include auto-generated FocusNode. @@ -5619,7 +5619,7 @@ void main() { expect(log.last, const Offset(400.0, 300.0)); }); - // Regression test for hhttps://github.com/flutter/flutter/issues/161805 + // Regression test for https://github.com/flutter/flutter/issues/161805 testWidgets('Discrete Slider does not apply thumb padding in a non-rounded track shape', ( WidgetTester tester, ) async { diff --git a/packages/material_ui/test/text_button_theme_test.dart b/packages/material_ui/test/text_button_theme_test.dart index 83be109a5e4d..993e7783cb69 100644 --- a/packages/material_ui/test/text_button_theme_test.dart +++ b/packages/material_ui/test/text_button_theme_test.dart @@ -287,7 +287,7 @@ void main() { ); }); - testWidgets('Material3 - TextButton repsects Theme shadowColor', (WidgetTester tester) async { + testWidgets('Material3 - TextButton respects Theme shadowColor', (WidgetTester tester) async { const colorScheme = ColorScheme.light(); const shadowColor = Color(0xff000001); const overriddenColor = Color(0xff000002); @@ -353,7 +353,7 @@ void main() { expect(material.shadowColor, shadowColor); }); - testWidgets('Material2 - TextButton repsects Theme shadowColor', (WidgetTester tester) async { + testWidgets('Material2 - TextButton respects Theme shadowColor', (WidgetTester tester) async { const colorScheme = ColorScheme.light(); const shadowColor = Color(0xff000001); const overriddenColor = Color(0xff000002); diff --git a/packages/material_ui/test/text_field_test.dart b/packages/material_ui/test/text_field_test.dart index b180e0b74c09..4e1996aa8659 100644 --- a/packages/material_ui/test/text_field_test.dart +++ b/packages/material_ui/test/text_field_test.dart @@ -17749,7 +17749,7 @@ void main() { expect(magnifierController, isNotNull); expect(magnifierController!.shown, false); - // Keep draging to select 'one two three four five' while the position continues to + // Keep dragging to select 'one two three four five' while the position continues to // exceed the `hideBelowThreshold` keeping the magnifier hidden. await gesture.moveTo(textOffsetToPosition(tester, 20) + const Offset(0.0, 50.0)); await tester.pumpAndSettle();