Skip to content

Commit

Permalink
Updated useMaterial3 documentation to include missing M3 components…
Browse files Browse the repository at this point in the history
…. (#116234)

* Updated `useMaterial3` documentation to include missing M3 components.

* Fixed typo
  • Loading branch information
darrenaustin authored Nov 30, 2022
1 parent 31ea315 commit b30eb6c
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions packages/flutter/lib/src/material/theme_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1293,43 +1293,56 @@ class ThemeData with Diagnosticable {
///
/// <style>table,td,th { border-collapse: collapse; padding: 0.45em; } td { border: 1px solid }</style>
///
/// | 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.
Expand Down

0 comments on commit b30eb6c

Please sign in to comment.