Skip to content

Commit b30eb6c

Browse files
authored
Updated useMaterial3 documentation to include missing M3 components. (#116234)
* Updated `useMaterial3` documentation to include missing M3 components. * Fixed typo
1 parent 31ea315 commit b30eb6c

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

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

+23-10
Original file line numberDiff line numberDiff line change
@@ -1293,43 +1293,56 @@ class ThemeData with Diagnosticable {
12931293
///
12941294
/// <style>table,td,th { border-collapse: collapse; padding: 0.45em; } td { border: 1px solid }</style>
12951295
///
1296-
/// | Property | Material 3 default | Material 2 default |
1297-
/// | :-------------- | :--------------------------- | :------------------------ |
1298-
/// | [typography] | [Typography.material2021] | [Typography.material2014] |
1299-
/// | [splashFactory] | [InkSparkle]* or [InkRipple] | [InkSplash] |
1296+
/// | Property | Material 3 default | Material 2 default |
1297+
/// | :-------------- | :----------------------------- | :----------------------------- |
1298+
/// | [colorScheme] | M3 baseline light color scheme | M2 baseline light color scheme |
1299+
/// | [typography] | [Typography.material2021] | [Typography.material2014] |
1300+
/// | [splashFactory] | [InkSparkle]* or [InkRipple] | [InkSplash] |
13001301
///
13011302
/// \* if the target platform is Android and the app is not
13021303
/// running on the web, otherwise it will fallback to [InkRipple].
13031304
///
1305+
/// If [brightness] is [Brightness.dark] then the default color scheme will
1306+
/// be either the M3 baseline dark color scheme or the M2 baseline dark color
1307+
/// scheme depending on [useMaterial3].
1308+
///
13041309
/// ## Affected widgets
13051310
///
13061311
/// This flag affects styles and components.
13071312
///
13081313
/// ### Styles
1309-
/// * Color: [ColorScheme], [Material]
1314+
/// * Color: [ColorScheme], [Material] (see table above)
13101315
/// * Shape: (see components below)
1311-
/// * Typography: `typography` (see table above)
1316+
/// * Typography: [Typography] (see table above)
13121317
///
13131318
/// ### Components
1319+
/// * Badges: [Badge]
13141320
/// * Bottom app bar: [BottomAppBar]
1321+
/// * Bottom sheets: [BottomSheet]
13151322
/// * Buttons
1316-
/// - Common buttons: [ElevatedButton], [FilledButton], [OutlinedButton], [TextButton], [IconButton]
1323+
/// - Common buttons: [ElevatedButton], [FilledButton], [OutlinedButton], [TextButton]
13171324
/// - FAB: [FloatingActionButton], [FloatingActionButton.extended]
1325+
/// - Icon buttons: [IconButton]
13181326
/// - Segmented buttons: [SegmentedButton]
13191327
/// * Cards: [Card]
1320-
/// * TextFields: [TextField] together with its [InputDecoration]
1328+
/// * Checkbox: [Checkbox]
13211329
/// * Chips:
13221330
/// - [ActionChip] (used for Assist and Suggestion chips),
13231331
/// - [FilterChip], [ChoiceChip] (used for single selection filter chips),
13241332
/// - [InputChip]
1325-
/// * Checkbox: [Checkbox]
13261333
/// * Dialogs: [Dialog], [AlertDialog]
1334+
/// * Divider: [Divider]
13271335
/// * Lists: [ListTile]
1336+
/// * Menus: [MenuBar], [DropdownMenu]
13281337
/// * Navigation bar: [NavigationBar] (new, replacing [BottomNavigationBar])
1329-
/// * [Navigation rail](https://m3.material.io/components/navigation-rail): [NavigationRail]
1338+
/// * Navigation drawer: [NavigationDrawer]
1339+
/// * Navigation rail: [NavigationRail]
13301340
/// * Progress indicators: [CircularProgressIndicator], [LinearProgressIndicator]
13311341
/// * Radio button: [Radio]
1342+
/// * Slider: [Slider]
13321343
/// * Switch: [Switch]
1344+
/// * Tabs: [TabBar]
1345+
/// * TextFields: [TextField] together with its [InputDecoration]
13331346
/// * Top app bar: [AppBar]
13341347
///
13351348
/// In addition, this flag enables features introduced in Android 12.

0 commit comments

Comments
 (0)