From b2c993cad37d1a3f00d2b67e18cde41a6d77f741 Mon Sep 17 00:00:00 2001 From: Leigha Jarett Date: Tue, 20 Jun 2023 05:03:21 -0400 Subject: [PATCH] Add to API docs to explain what Assist and Suggestion chips are (#129034) Fixes https://github.com/flutter/flutter/issues/128028. It seems pretty straightforward so don't think it warrants the effort to add more samples. --- .../flutter/lib/src/material/action_chip.dart | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/flutter/lib/src/material/action_chip.dart b/packages/flutter/lib/src/material/action_chip.dart index 2d6b330a64..725570fd56 100644 --- a/packages/flutter/lib/src/material/action_chip.dart +++ b/packages/flutter/lib/src/material/action_chip.dart @@ -50,6 +50,22 @@ enum _ChipVariant { flat, elevated } /// Material Design 3. If [ThemeData.useMaterial3] is true, then [ActionChip] /// will be styled to match the Material Design 3 Assist and Suggestion chips. /// +/// ### Creating an Assist chip +/// +/// Assist chips are used to provide a quick way to perform an action. +/// To create an Action chip, set the icon property to the icon +/// that represents the action and set the label to the name of the action. +/// +/// +/// ### Creating a Suggestion chip +/// +/// Suggestion chips usually display generated suggestions for the user, +/// like a suggested response to a message. +/// +/// To create a Suggestion chip, set the label to the suggestion +/// and don't set the icon property. +// +/// /// See also: /// /// * [Chip], a chip that displays information and can be deleted.