Skip to content
On this page

Alert

A contextual message with a title, description, indicator, and actions.

Alert in FluttyUIAlert in FluttyUI dark theme

Import

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

Usage

const ui.Alert(
  title: Text('Changes saved'),
  description: Text('Your profile is up to date.'),
  type: ui.AlertType.success,
)

API Reference

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

Alert

const Alert({
  super.key,
  required this.title,
  required this.description,
  this.type = AlertType.info,
  this.size,
  this.indicator,
  this.actions = const [],
  this.padding,
  this.spacing,
  this.indicatorSpacing,
  this.backgroundColor,
  this.borderRadius,
  this.titleColor,
  this.descriptionColor,
  this.actionBreakpoint = 480,
});
ParameterTypeRequiredDefault
keyKey?Nonull
titleWidgetYes—
descriptionWidgetYes—
typeAlertTypeNoAlertType.info
sizeComponentSize?Nonull
indicatorWidget?Nonull
actionsList<Widget>Noconst []
paddingEdgeInsetsGeometry?Nonull
spacingdouble?Nonull
indicatorSpacingdouble?Nonull
backgroundColorColor?Nonull
borderRadiusdouble?Nonull
titleColorColor?Nonull
descriptionColorColor?Nonull
actionBreakpointdoubleNo480

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/feedbacks/alert/alert.dart

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

DartFlutter

Get started with FluttyUI