Unverified Commit 433f9356 authored by Hans Muller's avatar Hans Muller Committed by GitHub

Updated `ThemeData.useMaterial3` API doc, default is `true` (#130764)

Fixes https://github.com/flutter/flutter/issues/130761
parent ab14a5c3
...@@ -1083,21 +1083,16 @@ class ThemeData with Diagnosticable { ...@@ -1083,21 +1083,16 @@ class ThemeData with Diagnosticable {
/// splash with sparkle effects. /// splash with sparkle effects.
final InteractiveInkFeatureFactory splashFactory; final InteractiveInkFeatureFactory splashFactory;
/// A temporary flag used to opt-in to Material 3 features. /// A temporary flag that can be used to opt-out of Material 3 features.
/// ///
/// If true, then widgets that have been migrated to Material 3 will /// This flag is _true_ by default. If false, then components will
/// use new colors, typography and other features of Material 3. If false, /// continue to use the colors, typography and other features of
/// they will use the Material 2 look and feel. /// Material 2.
/// ///
/// During the migration to Material 3, turning this on may yield /// In the long run this flag will be deprecated and eventually
/// inconsistent look and feel in your app as some widgets are migrated /// only Material 3 will be supported. We recommend that applications
/// while others have yet to be. /// migrate to Material 3 as soon as that's practical. Until that migration
/// /// is complete, this flag can be set to false.
/// Defaults to false. When the Material 3 specification is complete
/// and all widgets are migrated on stable, we will change this flag to be
/// true by default. After that change has landed on stable, we will deprecate
/// this flag and remove all uses of it. At that point, the `material` library
/// will aim to only support Material 3.
/// ///
/// ## Defaults /// ## Defaults
/// ///
...@@ -1131,14 +1126,13 @@ class ThemeData with Diagnosticable { ...@@ -1131,14 +1126,13 @@ class ThemeData with Diagnosticable {
/// * Typography: [Typography] (see table above) /// * Typography: [Typography] (see table above)
/// ///
/// ### Components /// ### Components
/// \* *new* means the new widgets/methods created since the last stable release.
/// * Badges: [Badge] /// * Badges: [Badge]
/// * Bottom app bar: [BottomAppBar] /// * Bottom app bar: [BottomAppBar]
/// * Bottom sheets: [BottomSheet] /// * Bottom sheets: [BottomSheet]
/// * Buttons /// * Buttons
/// - Common buttons: [ElevatedButton], [FilledButton], [FilledButton.tonal], [OutlinedButton], [TextButton] /// - Common buttons: [ElevatedButton], [FilledButton], [FilledButton.tonal], [OutlinedButton], [TextButton]
/// - FAB: [FloatingActionButton], [FloatingActionButton.extended] /// - FAB: [FloatingActionButton], [FloatingActionButton.extended]
/// - Icon buttons: [IconButton], [IconButton.filled] (*new*), [IconButton.filledTonal] (*new*), [IconButton.outlined] (*new*) /// - Icon buttons: [IconButton], [IconButton.filled] (*new*), [IconButton.filledTonal], [IconButton.outlined]
/// - Segmented buttons: [SegmentedButton] (replacing [ToggleButtons]) /// - Segmented buttons: [SegmentedButton] (replacing [ToggleButtons])
/// * Cards: [Card] /// * Cards: [Card]
/// * Checkbox: [Checkbox], [CheckboxListTile] /// * Checkbox: [Checkbox], [CheckboxListTile]
...@@ -1156,11 +1150,11 @@ class ThemeData with Diagnosticable { ...@@ -1156,11 +1150,11 @@ class ThemeData with Diagnosticable {
/// * Navigation rail: [NavigationRail] /// * Navigation rail: [NavigationRail]
/// * Progress indicators: [CircularProgressIndicator], [LinearProgressIndicator] /// * Progress indicators: [CircularProgressIndicator], [LinearProgressIndicator]
/// * Radio button: [Radio], [RadioListTile] /// * Radio button: [Radio], [RadioListTile]
/// * Search: [SearchBar] (*new*), [SearchAnchor] (*new*), /// * Search: [SearchBar], [SearchAnchor],
/// * Snack bar: [SnackBar] /// * Snack bar: [SnackBar]
/// * Slider: [Slider], [RangeSlider] /// * Slider: [Slider], [RangeSlider]
/// * Switch: [Switch], [SwitchListTile] /// * Switch: [Switch], [SwitchListTile]
/// * Tabs: [TabBar], [TabBar.secondary] (*new*) /// * Tabs: [TabBar], [TabBar.secondary]
/// * TextFields: [TextField] together with its [InputDecoration] /// * TextFields: [TextField] together with its [InputDecoration]
/// * Time pickers: [showTimePicker], [TimePickerDialog] /// * Time pickers: [showTimePicker], [TimePickerDialog]
/// * Top app bar: [AppBar], [SliverAppBar], [SliverAppBar.medium], [SliverAppBar.large] /// * Top app bar: [AppBar], [SliverAppBar], [SliverAppBar.medium], [SliverAppBar.large]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment