Add Material 3 SwitchListTile example and update existing examples (#119714)

* Add Material 3 `SwitchListTile` example and update existing examples

* Update examples with `useMaterial3: true` and update example descriptions.

* add a `ColorScheme` colour
This commit is contained in:
Taha Tesser
2023-02-06 11:02:37 +02:00
committed by GitHub
parent b8f5394a5c
commit bbca7ff693
16 changed files with 370 additions and 127 deletions

View File

@@ -86,8 +86,8 @@ import 'theme_data.dart';
/// {@end-tool}
///
/// {@tool dartpad}
/// This sample shows the creation of a [CheckboxListTile] using [ThemeData.useMaterial3] flag,
/// as described in: https://m3.material.io/components/lists/overview.
/// This sample demonstrates how [CheckboxListTile] positions the checkbox widget
/// relative to the text in different configurations.
///
/// ** See code in examples/api/lib/material/checkbox_list_tile/checkbox_list_tile.1.dart **
/// {@end-tool}

View File

@@ -89,6 +89,13 @@ enum _SwitchListTileType { material, adaptive }
/// ** See code in examples/api/lib/material/switch_list_tile/switch_list_tile.0.dart **
/// {@end-tool}
///
/// {@tool dartpad}
/// This sample demonstrates how [SwitchListTile] positions the switch widget
/// relative to the text in different configurations.
///
/// ** See code in examples/api/lib/material/switch_list_tile/switch_list_tile.1.dart **
/// {@end-tool}
///
/// ## Semantics in SwitchListTile
///
/// Since the entirety of the SwitchListTile is interactive, it should represent
@@ -113,7 +120,7 @@ enum _SwitchListTileType { material, adaptive }
/// LinkedLabelRadio, that includes an interactive [RichText] widget that
/// handles tap gestures.
///
/// ** See code in examples/api/lib/material/switch_list_tile/switch_list_tile.1.dart **
/// ** See code in examples/api/lib/material/switch_list_tile/custom_labeled_switch.0.dart **
/// {@end-tool}
///
/// ## SwitchListTile isn't exactly what I want
@@ -129,7 +136,7 @@ enum _SwitchListTileType { material, adaptive }
/// Here is an example of a custom LabeledSwitch widget, but you can easily
/// make your own configurable widget.
///
/// ** See code in examples/api/lib/material/switch_list_tile/switch_list_tile.2.dart **
/// ** See code in examples/api/lib/material/switch_list_tile/custom_labeled_switch.1.dart **
/// {@end-tool}
///
/// See also: