From b30eb6c54d51300c36f65c84e7d56ccc8a6c1d8b Mon Sep 17 00:00:00 2001 From: Darren Austin Date: Tue, 29 Nov 2022 19:07:12 -0800 Subject: [PATCH] Updated `useMaterial3` documentation to include missing M3 components. (#116234) * Updated `useMaterial3` documentation to include missing M3 components. * Fixed typo --- .../flutter/lib/src/material/theme_data.dart | 33 +++++++++++++------ 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/packages/flutter/lib/src/material/theme_data.dart b/packages/flutter/lib/src/material/theme_data.dart index 02da234fac0..445222bf599 100644 --- a/packages/flutter/lib/src/material/theme_data.dart +++ b/packages/flutter/lib/src/material/theme_data.dart @@ -1293,43 +1293,56 @@ class ThemeData with Diagnosticable { /// /// /// - /// | Property | Material 3 default | Material 2 default | - /// | :-------------- | :--------------------------- | :------------------------ | - /// | [typography] | [Typography.material2021] | [Typography.material2014] | - /// | [splashFactory] | [InkSparkle]* or [InkRipple] | [InkSplash] | + /// | Property | Material 3 default | Material 2 default | + /// | :-------------- | :----------------------------- | :----------------------------- | + /// | [colorScheme] | M3 baseline light color scheme | M2 baseline light color scheme | + /// | [typography] | [Typography.material2021] | [Typography.material2014] | + /// | [splashFactory] | [InkSparkle]* or [InkRipple] | [InkSplash] | /// /// \* if the target platform is Android and the app is not /// running on the web, otherwise it will fallback to [InkRipple]. /// + /// If [brightness] is [Brightness.dark] then the default color scheme will + /// be either the M3 baseline dark color scheme or the M2 baseline dark color + /// scheme depending on [useMaterial3]. + /// /// ## Affected widgets /// /// This flag affects styles and components. /// /// ### Styles - /// * Color: [ColorScheme], [Material] + /// * Color: [ColorScheme], [Material] (see table above) /// * Shape: (see components below) - /// * Typography: `typography` (see table above) + /// * Typography: [Typography] (see table above) /// /// ### Components + /// * Badges: [Badge] /// * Bottom app bar: [BottomAppBar] + /// * Bottom sheets: [BottomSheet] /// * Buttons - /// - Common buttons: [ElevatedButton], [FilledButton], [OutlinedButton], [TextButton], [IconButton] + /// - Common buttons: [ElevatedButton], [FilledButton], [OutlinedButton], [TextButton] /// - FAB: [FloatingActionButton], [FloatingActionButton.extended] + /// - Icon buttons: [IconButton] /// - Segmented buttons: [SegmentedButton] /// * Cards: [Card] - /// * TextFields: [TextField] together with its [InputDecoration] + /// * Checkbox: [Checkbox] /// * Chips: /// - [ActionChip] (used for Assist and Suggestion chips), /// - [FilterChip], [ChoiceChip] (used for single selection filter chips), /// - [InputChip] - /// * Checkbox: [Checkbox] /// * Dialogs: [Dialog], [AlertDialog] + /// * Divider: [Divider] /// * Lists: [ListTile] + /// * Menus: [MenuBar], [DropdownMenu] /// * Navigation bar: [NavigationBar] (new, replacing [BottomNavigationBar]) - /// * [Navigation rail](https://m3.material.io/components/navigation-rail): [NavigationRail] + /// * Navigation drawer: [NavigationDrawer] + /// * Navigation rail: [NavigationRail] /// * Progress indicators: [CircularProgressIndicator], [LinearProgressIndicator] /// * Radio button: [Radio] + /// * Slider: [Slider] /// * Switch: [Switch] + /// * Tabs: [TabBar] + /// * TextFields: [TextField] together with its [InputDecoration] /// * Top app bar: [AppBar] /// /// In addition, this flag enables features introduced in Android 12.