Skip to content

Commit b2c993c

Browse files
authored
Add to API docs to explain what Assist and Suggestion chips are (#129034)
Fixes flutter/flutter#128028. It seems pretty straightforward so don't think it warrants the effort to add more samples.
1 parent 63908a6 commit b2c993c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,22 @@ enum _ChipVariant { flat, elevated }
5050
/// Material Design 3. If [ThemeData.useMaterial3] is true, then [ActionChip]
5151
/// will be styled to match the Material Design 3 Assist and Suggestion chips.
5252
///
53+
/// ### Creating an Assist chip
54+
///
55+
/// Assist chips are used to provide a quick way to perform an action.
56+
/// To create an Action chip, set the icon property to the icon
57+
/// that represents the action and set the label to the name of the action.
58+
///
59+
///
60+
/// ### Creating a Suggestion chip
61+
///
62+
/// Suggestion chips usually display generated suggestions for the user,
63+
/// like a suggested response to a message.
64+
///
65+
/// To create a Suggestion chip, set the label to the suggestion
66+
/// and don't set the icon property.
67+
//
68+
///
5369
/// See also:
5470
///
5571
/// * [Chip], a chip that displays information and can be deleted.

0 commit comments

Comments
 (0)