Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 9644aa8

Browse files
authored
Fixes documentation inconsistencies around 'material' and 'material design' (#102632)
1 parent bca0718 commit 9644aa8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+191
-191
lines changed

dev/benchmarks/test_apps/stocks/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Stocks
22

3-
Demo app for the material design widgets and other features provided by Flutter.
3+
Demo app for the Material Design widgets and other features provided by Flutter.
44

55
## Building
66

dev/integration_tests/flutter_gallery/web/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<head>
77
<meta charset="UTF-8">
88
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
9-
<meta name="description" content="A demo app for Flutter's material design and cupertino widgets, as well as many other features of the Flutter SDK.">
9+
<meta name="description" content="A demo app for Flutter's material and cupertino widgets, as well as many other features of the Flutter SDK.">
1010

1111
<!-- iOS meta tags & icons -->
1212
<meta name="apple-mobile-web-app-capable" content="yes">

packages/flutter/lib/src/cupertino/colors.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class CupertinoColors {
4646
///
4747
/// See also:
4848
///
49-
/// * [material.Colors.white], the same color, in the material design palette.
49+
/// * [material.Colors.white], the same color, in the Material Design palette.
5050
/// * [black], opaque black in the [CupertinoColors] palette.
5151
static const Color white = Color(0xFFFFFFFF);
5252

@@ -56,7 +56,7 @@ class CupertinoColors {
5656
///
5757
/// See also:
5858
///
59-
/// * [material.Colors.black], the same color, in the material design palette.
59+
/// * [material.Colors.black], the same color, in the Material Design palette.
6060
/// * [white], opaque white in the [CupertinoColors] palette.
6161
static const Color black = Color(0xFF000000);
6262

packages/flutter/lib/src/cupertino/switch.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import 'thumb_painter.dart';
4848
///
4949
/// See also:
5050
///
51-
/// * [Switch], the material design equivalent.
51+
/// * [Switch], the Material Design equivalent.
5252
/// * <https://developer.apple.com/ios/human-interface-guidelines/controls/switches/>
5353
class CupertinoSwitch extends StatefulWidget {
5454
/// Creates an iOS-style switch.

packages/flutter/lib/src/material/animated_icons/animated_icons_data.dart

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,51 +10,51 @@
1010

1111
part of material_animated_icons;
1212

13-
/// Identifier for the supported material design animated icons.
13+
/// Identifier for the supported Material Design animated icons.
1414
///
1515
/// Use with [AnimatedIcon] class to show specific animated icons.
1616
abstract class AnimatedIcons {
1717

18-
/// The material design add to event icon animation.
18+
/// The Material Design add to event icon animation.
1919
static const AnimatedIconData add_event = _$add_event;
2020

21-
/// The material design arrow to menu icon animation.
21+
/// The Material Design arrow to menu icon animation.
2222
static const AnimatedIconData arrow_menu = _$arrow_menu;
2323

24-
/// The material design close to menu icon animation.
24+
/// The Material Design close to menu icon animation.
2525
static const AnimatedIconData close_menu = _$close_menu;
2626

27-
/// The material design ellipsis to search icon animation.
27+
/// The Material Design ellipsis to search icon animation.
2828
static const AnimatedIconData ellipsis_search = _$ellipsis_search;
2929

30-
/// The material design event to add icon animation.
30+
/// The Material Design event to add icon animation.
3131
static const AnimatedIconData event_add = _$event_add;
3232

33-
/// The material design home to menu icon animation.
33+
/// The Material Design home to menu icon animation.
3434
static const AnimatedIconData home_menu = _$home_menu;
3535

36-
/// The material design list to view icon animation.
36+
/// The Material Design list to view icon animation.
3737
static const AnimatedIconData list_view = _$list_view;
3838

39-
/// The material design menu to arrow icon animation.
39+
/// The Material Design menu to arrow icon animation.
4040
static const AnimatedIconData menu_arrow = _$menu_arrow;
4141

42-
/// The material design menu to close icon animation.
42+
/// The Material Design menu to close icon animation.
4343
static const AnimatedIconData menu_close = _$menu_close;
4444

45-
/// The material design menu to home icon animation.
45+
/// The Material Design menu to home icon animation.
4646
static const AnimatedIconData menu_home = _$menu_home;
4747

48-
/// The material design pause to play icon animation.
48+
/// The Material Design pause to play icon animation.
4949
static const AnimatedIconData pause_play = _$pause_play;
5050

51-
/// The material design play to pause icon animation.
51+
/// The Material Design play to pause icon animation.
5252
static const AnimatedIconData play_pause = _$play_pause;
5353

54-
/// The material design search to ellipsis icon animation.
54+
/// The Material Design search to ellipsis icon animation.
5555
static const AnimatedIconData search_ellipsis = _$search_ellipsis;
5656

57-
/// The material design view to list icon animation.
57+
/// The Material Design view to list icon animation.
5858
static const AnimatedIconData view_list = _$view_list;
5959
}
6060

packages/flutter/lib/src/material/app.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ enum ThemeMode {
5050
dark,
5151
}
5252

53-
/// An application that uses material design.
53+
/// An application that uses Material Design.
5454
///
5555
/// A convenience widget that wraps a number of widgets that are commonly
56-
/// required for material design applications. It builds upon a [WidgetsApp] by
56+
/// required for Material Design applications. It builds upon a [WidgetsApp] by
5757
/// adding material-design specific functionality, such as [AnimatedTheme] and
5858
/// [GridPaper].
5959
///

packages/flutter/lib/src/material/app_bar.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class _PreferredAppBarSize extends Size {
6262
final double? bottomHeight;
6363
}
6464

65-
/// A material design app bar.
65+
/// A Material Design app bar.
6666
///
6767
/// An app bar consists of a toolbar and potentially other widgets, such as a
6868
/// [TabBar] and a [FlexibleSpaceBar]. App bars typically expose one or more
@@ -144,7 +144,7 @@ class _PreferredAppBarSize extends Size {
144144
/// * <https://material.io/design/components/app-bars-top.html>
145145
/// * Cookbook: [Place a floating app bar above a list](https://flutter.dev/docs/cookbook/lists/floating-app-bar)
146146
class AppBar extends StatefulWidget implements PreferredSizeWidget {
147-
/// Creates a material design app bar.
147+
/// Creates a Material Design app bar.
148148
///
149149
/// The arguments [primary], [toolbarOpacity], [bottomOpacity],
150150
/// [backwardsCompatibility], and [automaticallyImplyLeading] must
@@ -1269,7 +1269,7 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
12691269
}
12701270
}
12711271

1272-
/// A material design app bar that integrates with a [CustomScrollView].
1272+
/// A Material Design app bar that integrates with a [CustomScrollView].
12731273
///
12741274
/// An app bar consists of a toolbar and potentially other widgets, such as a
12751275
/// [TabBar] and a [FlexibleSpaceBar]. App bars typically expose one or more
@@ -1355,7 +1355,7 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
13551355
/// can expand and collapse.
13561356
/// * <https://material.io/design/components/app-bars-top.html>
13571357
class SliverAppBar extends StatefulWidget {
1358-
/// Creates a material design app bar that can be placed in a [CustomScrollView].
1358+
/// Creates a Material Design app bar that can be placed in a [CustomScrollView].
13591359
///
13601360
/// The arguments [forceElevated], [primary], [floating], [pinned], [snap]
13611361
/// and [automaticallyImplyLeading] must not be null.

packages/flutter/lib/src/material/arc.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const double _kOnAxisDelta = 2.0;
1717
///
1818
/// This class specializes the interpolation of [Tween<Offset>] so that instead
1919
/// of a straight line, the intermediate points follow the arc of a circle in a
20-
/// manner consistent with material design principles.
20+
/// manner consistent with Material Design principles.
2121
///
2222
/// The arc's radius is related to the bounding box that contains the [begin]
2323
/// and [end] points. If the bounding box is taller than it is wide, then the
@@ -218,7 +218,7 @@ T _maxBy<T>(Iterable<T> input, _KeyFunc<T> keyFunc) {
218218
///
219219
/// This class specializes the interpolation of [Tween<Rect>] so that instead of
220220
/// growing or shrinking linearly, opposite corners of the rectangle follow arcs
221-
/// in a manner consistent with material design principles.
221+
/// in a manner consistent with Material Design principles.
222222
///
223223
/// Specifically, the rectangle corners whose diagonals are closest to the overall
224224
/// direction of the animation follow arcs defined with [MaterialPointArcTween].

packages/flutter/lib/src/material/back_button.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import 'theme.dart';
2020
/// [Navigator.maybePop] to return to the previous route.
2121
/// * [IconButton], which is a more general widget for creating buttons
2222
/// with icons.
23-
/// * [Icon], a material design icon.
23+
/// * [Icon], a Material Design icon.
2424
/// * [ThemeData.platform], which specifies the current platform.
2525
class BackButtonIcon extends StatelessWidget {
2626
/// Creates an icon that shows the appropriate "back" image for
@@ -45,7 +45,7 @@ class BackButtonIcon extends StatelessWidget {
4545
Widget build(BuildContext context) => Icon(_getIconData(Theme.of(context).platform));
4646
}
4747

48-
/// A material design back button.
48+
/// A Material Design back button.
4949
///
5050
/// A [BackButton] is an [IconButton] with a "back" icon appropriate for the
5151
/// current [TargetPlatform]. When pressed, the back button calls
@@ -110,7 +110,7 @@ class BackButton extends StatelessWidget {
110110
}
111111
}
112112

113-
/// A material design close button.
113+
/// A Material Design close button.
114114
///
115115
/// A [CloseButton] is an [IconButton] with a "close" icon. When pressed, the
116116
/// close button calls [Navigator.maybePop] to return to the previous route.
@@ -125,7 +125,7 @@ class BackButton extends StatelessWidget {
125125
/// * [BackButton], which is more appropriate for middle nodes in the
126126
/// navigation tree or where pages can be popped instantaneously with
127127
/// no user data consequence.
128-
/// * [IconButton], to create other material design icon buttons.
128+
/// * [IconButton], to create other Material Design icon buttons.
129129
class CloseButton extends StatelessWidget {
130130
/// Creates a Material Design close button.
131131
const CloseButton({ super.key, this.color, this.onPressed });

packages/flutter/lib/src/material/banner.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const Curve _materialBannerHeightCurve = Curves.fastOutSlowIn;
1818
/// The [ScaffoldMessengerState.showMaterialBanner] function returns a
1919
/// [ScaffoldFeatureController]. The value of the controller's closed property
2020
/// is a Future that resolves to a MaterialBannerClosedReason. Applications that need
21-
/// to know how a material banner was closed can use this value.
21+
/// to know how a [MaterialBanner] was closed can use this value.
2222
///
2323
/// Example:
2424
///
@@ -183,7 +183,7 @@ class MaterialBanner extends StatefulWidget {
183183

184184
// API for ScaffoldMessengerState.showMaterialBanner():
185185

186-
/// Creates an animation controller useful for driving a material banner's entrance and exit animation.
186+
/// Creates an animation controller useful for driving a [MaterialBanner]'s entrance and exit animation.
187187
static AnimationController createAnimationController({ required TickerProvider vsync }) {
188188
return AnimationController(
189189
duration: _materialBannerTransitionDuration,

packages/flutter/lib/src/material/bottom_sheet.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ typedef BottomSheetDragEndHandler = void Function(
3535
required bool isClosing,
3636
});
3737

38-
/// A material design bottom sheet.
38+
/// A Material Design bottom sheet.
3939
///
40-
/// There are two kinds of bottom sheets in material design:
40+
/// There are two kinds of bottom sheets in Material Design:
4141
///
4242
/// * _Persistent_. A persistent bottom sheet shows information that
4343
/// supplements the primary content of the app. A persistent bottom sheet
@@ -600,7 +600,7 @@ class _BottomSheetSuspendedCurve extends ParametricCurve<double> {
600600
}
601601
}
602602

603-
/// Shows a modal material design bottom sheet.
603+
/// Shows a modal Material Design bottom sheet.
604604
///
605605
/// A modal bottom sheet is an alternative to a menu or a dialog and prevents
606606
/// the user from interacting with the rest of the app.
@@ -718,7 +718,7 @@ Future<T?> showModalBottomSheet<T>({
718718
));
719719
}
720720

721-
/// Shows a material design bottom sheet in the nearest [Scaffold] ancestor. If
721+
/// Shows a Material Design bottom sheet in the nearest [Scaffold] ancestor. If
722722
/// you wish to show a persistent bottom sheet, use [Scaffold.bottomSheet].
723723
///
724724
/// Returns a controller that can be used to close and otherwise manipulate the

packages/flutter/lib/src/material/button_theme.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ enum ButtonBarLayoutBehavior {
3333
/// Button bars will be constrained to a minimum height of 52.
3434
///
3535
/// This setting is require to create button bars which conform to the
36-
/// material specification.
36+
/// Material Design specification.
3737
constrained,
3838

3939
/// Button bars will calculate their padding from the button theme padding.

packages/flutter/lib/src/material/calendar_date_picker.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const double _monthNavButtonsWidth = 108.0;
5252
/// * [showDatePicker], which creates a Dialog that contains a
5353
/// [CalendarDatePicker] and provides an optional compact view where the
5454
/// user can enter a date as a line of text.
55-
/// * [showTimePicker], which shows a dialog that contains a material design
55+
/// * [showTimePicker], which shows a dialog that contains a Material Design
5656
/// time picker.
5757
///
5858
class CalendarDatePicker extends StatefulWidget {

packages/flutter/lib/src/material/card.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import 'card_theme.dart';
88
import 'material.dart';
99
import 'theme.dart';
1010

11-
/// A material design card: a panel with slightly rounded corners and an
11+
/// A Material Design card: a panel with slightly rounded corners and an
1212
/// elevation shadow.
1313
///
1414
/// A card is a sheet of [Material] used to represent some related information,
@@ -54,7 +54,7 @@ import 'theme.dart';
5454
/// * [showDialog], to display a modal card.
5555
/// * <https://material.io/design/components/cards.html>
5656
class Card extends StatelessWidget {
57-
/// Creates a material design card.
57+
/// Creates a Material Design card.
5858
///
5959
/// The [elevation] must be null or non-negative. The [borderOnForeground]
6060
/// must not be null.

packages/flutter/lib/src/material/checkbox.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import 'theme.dart';
1212
import 'theme_data.dart';
1313
import 'toggleable.dart';
1414

15-
/// A material design checkbox.
15+
/// A Material Design checkbox.
1616
///
1717
/// The checkbox itself does not maintain any state. Instead, when the state of
1818
/// the checkbox changes, the widget calls the [onChanged] callback. Most
@@ -46,7 +46,7 @@ import 'toggleable.dart';
4646
/// * <https://material.io/design/components/selection-controls.html#checkboxes>
4747
/// * <https://material.io/design/components/lists.html#types>
4848
class Checkbox extends StatefulWidget {
49-
/// Creates a material design checkbox.
49+
/// Creates a Material Design checkbox.
5050
///
5151
/// The checkbox itself does not maintain any state. Instead, when the state of
5252
/// the checkbox changes, the widget calls the [onChanged] callback. Most

packages/flutter/lib/src/material/chip.dart

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const Duration _kDisableDuration = Duration(milliseconds: 75);
3939
const Color _kSelectScrimColor = Color(0x60191919);
4040
const Icon _kDefaultDeleteIcon = Icon(Icons.cancel, size: _kDeleteIconSize);
4141

42-
/// An interface defining the base attributes for a material design chip.
42+
/// An interface defining the base attributes for a Material Design chip.
4343
///
4444
/// Chips are compact elements that represent an attribute, text, entity, or
4545
/// action.
@@ -187,7 +187,7 @@ abstract class ChipAttributes {
187187
Color? get shadowColor;
188188
}
189189

190-
/// An interface for material design chips that can be deleted.
190+
/// An interface for Material Design chips that can be deleted.
191191
///
192192
/// The defaults mentioned in the documentation for each attribute are what
193193
/// the implementing classes typically use for defaults (but this class doesn't
@@ -257,7 +257,7 @@ abstract class DeletableChipAttributes {
257257
bool get useDeleteButtonTooltip;
258258
}
259259

260-
/// An interface for material design chips that can have check marks.
260+
/// An interface for Material Design chips that can have check marks.
261261
///
262262
/// The defaults mentioned in the documentation for each attribute are what
263263
/// the implementing classes typically use for defaults (but this class doesn't
@@ -290,7 +290,7 @@ abstract class CheckmarkableChipAttributes {
290290
Color? get checkmarkColor;
291291
}
292292

293-
/// An interface for material design chips that can be selected.
293+
/// An interface for Material Design chips that can be selected.
294294
///
295295
/// The defaults mentioned in the documentation for each attribute are what
296296
/// the implementing classes typically use for defaults (but this class doesn't
@@ -400,7 +400,7 @@ abstract class SelectableChipAttributes {
400400
ShapeBorder get avatarBorder;
401401
}
402402

403-
/// An interface for material design chips that can be enabled and disabled.
403+
/// An interface for Material Design chips that can be enabled and disabled.
404404
///
405405
/// The defaults mentioned in the documentation for each attribute are what
406406
/// the implementing classes typically use for defaults (but this class doesn't
@@ -447,7 +447,7 @@ abstract class DisabledChipAttributes {
447447
Color? get disabledColor;
448448
}
449449

450-
/// An interface for material design chips that can be tapped.
450+
/// An interface for Material Design chips that can be tapped.
451451
///
452452
/// The defaults mentioned in the documentation for each attribute are what
453453
/// the implementing classes typically use for defaults (but this class doesn't
@@ -509,7 +509,7 @@ abstract class TappableChipAttributes {
509509
String? get tooltip;
510510
}
511511

512-
/// A material design chip.
512+
/// A Material Design chip.
513513
///
514514
/// Chips are compact elements that represent an attribute, text, entity, or
515515
/// action.
@@ -549,7 +549,7 @@ abstract class TappableChipAttributes {
549549
/// vertical runs.
550550
/// * <https://material.io/design/components/chips.html>
551551
class Chip extends StatelessWidget implements ChipAttributes, DeletableChipAttributes {
552-
/// Creates a material design chip.
552+
/// Creates a Material Design chip.
553553
///
554554
/// The [label], [autofocus], and [clipBehavior] arguments must not be null.
555555
/// The [elevation] must be null or non-negative.
@@ -658,7 +658,7 @@ class Chip extends StatelessWidget implements ChipAttributes, DeletableChipAttri
658658
}
659659
}
660660

661-
/// A raw material design chip.
661+
/// A raw Material Design chip.
662662
///
663663
/// This serves as the basis for all of the chip widget types to aggregate.
664664
/// It is typically not created directly, one of the other chip types

0 commit comments

Comments
 (0)