Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/material_ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/material_ui/lib/src/date_picker_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion packages/material_ui/lib/src/dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const EdgeInsets _defaultInsetPadding = EdgeInsets.symmetric(horizontal: 40.0, v
///
/// </callout-box>
///
/// ## 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
Expand Down
4 changes: 2 additions & 2 deletions packages/material_ui/lib/src/dropdown.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1718,12 +1718,12 @@ class _DropdownButtonState<T> extends State<DropdownButton<T>> 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.
Expand Down
2 changes: 1 addition & 1 deletion packages/material_ui/lib/src/dropdown_menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@ class _DropdownMenuState<T> extends State<DropdownMenu<T>> {
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
Expand Down
2 changes: 1 addition & 1 deletion packages/material_ui/lib/src/menu_anchor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion packages/material_ui/lib/src/search.dart
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ abstract class SearchDelegate<T> {
..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();
Expand Down
2 changes: 1 addition & 1 deletion packages/material_ui/lib/src/segmented_button_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion packages/material_ui/lib/src/stepper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/material_ui/lib/src/theme_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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:
///
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
changelog: |
- Fixes typos in library code and tests.
version: patch
2 changes: 1 addition & 1 deletion packages/material_ui/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/material_ui/test/carousel_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
6 changes: 3 additions & 3 deletions packages/material_ui/test/checkbox_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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)));
Expand Down
2 changes: 1 addition & 1 deletion packages/material_ui/test/date_picker_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion packages/material_ui/test/date_range_picker_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion packages/material_ui/test/dropdown_menu_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.';
Expand Down
2 changes: 1 addition & 1 deletion packages/material_ui/test/filled_button_theme_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions packages/material_ui/test/outlined_button_theme_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion packages/material_ui/test/page_transitions_theme_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
22 changes: 11 additions & 11 deletions packages/material_ui/test/popup_menu_theme_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<Material>(
Expand All @@ -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<DefaultTextStyle>(
Expand Down Expand Up @@ -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<Material>(
Expand Down Expand Up @@ -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<Material>(
Expand All @@ -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<DefaultTextStyle>(
Expand Down Expand Up @@ -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<Material>(
Expand All @@ -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<DefaultTextStyle>(
Expand Down Expand Up @@ -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<Material>(
Expand All @@ -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<DefaultTextStyle>(
Expand Down Expand Up @@ -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<Material>(
Expand All @@ -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<DefaultTextStyle>(
Expand Down
4 changes: 2 additions & 2 deletions packages/material_ui/test/range_slider_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions packages/material_ui/test/slider_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions packages/material_ui/test/text_button_theme_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion packages/material_ui/test/text_field_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Loading