Skip to content
On this page

FloatingButton

A floating action control with animated expansion and collapse.

FloatingButton in FluttyUIFloatingButton 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.

FloatingButton

const FloatingButton({
  super.key,
  this.icon,
  this.onPressed,
  this.actions = const [],
  this.isOpen,
  this.onOpenChanged,
  this.semanticLabel = 'Quick actions',
  this.enabled = true,
  this.size,
  this.dimension,
  this.iconSize,
  this.borderRadius,
  this.backgroundColor,
  this.foregroundColor,
  this.actionBackgroundColor,
  this.backdrop = FloatingButtonBackdrop.dim,
  this.backdropColor,
  this.blur = 8,
  this.gap,
});
ParameterTypeRequiredDefault
keyKey?Nonull
iconWidget?Nonull
onPressedVoidCallback?Nonull
actionsList<FloatingButtonAction>Noconst []
isOpenbool?Nonull
onOpenChangedValueChanged<bool>?Nonull
semanticLabelStringNo'Quick actions'
enabledboolNotrue
sizeComponentSize?Nonull
dimensiondouble?Nonull
iconSizedouble?Nonull
borderRadiusdouble?Nonull
backgroundColorColor?Nonull
foregroundColorColor?Nonull
actionBackgroundColorColor?Nonull
backdropFloatingButtonBackdropNoFloatingButtonBackdrop.dim
backdropColorColor?Nonull
blurdoubleNo8
gapdouble?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/buttons/floating_button/floating_button.dart

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

DartFlutter

Get started with FluttyUI