ReplitSuggestion class
A tappable prompt row: the host's suggested message, optionally with a leading icon. Usable on its own, or in a ReplitSuggestionGroup:
ReplitSuggestion(
label: 'Summarize this thread',
icon: Icons.summarize_outlined,
onTap: () => send('Summarize this thread'),
)
Two variants, per the design: a plain row resting in the secondary ink with no chrome of its own, and — with outlined — a row on the faint fill and hairline, in full ink. The outlined form is also the treatment for suggestions embedded inside an assistant message.
label is the whole content — the package ships no strings and does not derive prompt text. A null onTap renders the row disabled.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ReplitSuggestion
Constructors
- ReplitSuggestion({Key? key, required String label, IconData? icon, VoidCallback? onTap, bool outlined = false, bool enabled = true, String? tooltip, EdgeInsetsGeometry? padding, BorderRadius? borderRadius, ReplitSuggestionStyle? style})
-
const
Properties
- borderRadius → BorderRadius?
-
The row's corner. Defaults to the design's 8.
final
- enabled → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → IconData?
-
Optional leading glyph.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String
-
The suggestion text, on one line — it ellipsizes rather than wrapping.
final
- onTap → VoidCallback?
-
Null renders the row disabled.
final
- outlined → bool
-
Draws the row on the design's faint fill and hairline, in full ink.
Plain rows carry no chrome and rest in the secondary ink.
final
- padding → EdgeInsetsGeometry?
-
Inside the row. Defaults to the design's 10 horizontally.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → ReplitSuggestionStyle?
-
Per-instance restyling, merged over ReplitTheme.suggestionStyle's
fields; nulls fall through to the theme tokens.
final
- tooltip → String?
-
Host-localized tooltip, e.g. the full text of a long suggestion.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ReplitSuggestion> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited