Skip to content
On this page

EmptyState

A message and optional action for empty or unavailable content.

EmptyState in FluttyUIEmptyState 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.

EmptyState

const EmptyState({
  super.key,
  this.size,
  this.title = 'Nothing here yet',
  this.description = 'Create your first item to get started.',
  this.visual,
  this.icon,
  this.initials,
  this.actionLabel,
  this.onAction,
  this.visualSize,
  this.iconSize,
  this.titleColor,
  this.descriptionColor,
  this.visualBackgroundColor,
  this.actionBorderColor,
  this.actionTextColor,
  this.maxWidth,
  this.actionWidth,
});
ParameterTypeRequiredDefault
keyKey?Nonull
sizeComponentSize?Nonull
titleStringNo'Nothing here yet'
descriptionStringNo'Create your first item to get started.'
visualWidget?Nonull
iconWidget?Nonull
initialsString?Nonull
actionLabelString?Nonull
onActionVoidCallback?Nonull
visualSizedouble?Nonull
iconSizedouble?Nonull
titleColorColor?Nonull
descriptionColorColor?Nonull
visualBackgroundColorColor?Nonull
actionBorderColorColor?Nonull
actionTextColorColor?Nonull
maxWidthdouble?Nonull
actionWidthdouble?Nonull

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/data_display/empty_state/empty_state.dart

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

DartFlutter

Get started with FluttyUI