Skip to content
On this page

PromptSuggestions

Suggested prompts that help start or continue a conversation.

PromptSuggestions in FluttyUIPromptSuggestions in FluttyUI dark theme

Import

import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;

API Reference

The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.

PromptSuggestions

const PromptSuggestions({
  super.key,
  required this.suggestions,
  this.size,
  required this.onSelected,
  this.layout = PromptSuggestionLayout.grid,
  this.maxColumns = 2,
  this.minCardWidth = 160,
  this.cardWidth = 220,
  this.spacing,
  this.padding = EdgeInsets.zero,
});
ParameterTypeRequiredDefault
keyKey?Nonull
suggestionsList<PromptSuggestion>Yes—
sizeComponentSize?Nonull
onSelectedValueChanged<PromptSuggestion>?Yes—
layoutPromptSuggestionLayoutNoPromptSuggestionLayout.grid
maxColumnsintNo2
minCardWidthdoubleNo160
cardWidthdoubleNo220
spacingdouble?Nonull
paddingEdgeInsetsGeometryNoEdgeInsets.zero

Application Setup

Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.

Source

lib/src/widgets/messaging/prompt_suggestions/prompt_suggestions.dart

This reference is generated from the PromptSuggestions declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

DartFlutter

Get started with FluttyUI