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.
MorphButton
const MorphButton({
super.key,
required this.label,
required this.panelBuilder,
this.leading,
this.size,
this.isOpen,
this.onOpenChanged,
this.enabled = true,
this.variant = MorphButtonVariant.primary,
this.direction = MorphButtonDirection.top,
this.expandedWidth,
this.expandedHeight,
this.height,
this.panelPadding,
this.borderRadius,
this.duration,
this.animate = true,
this.dismissOnOutsideTap = true,
this.backgroundColor,
this.foregroundColor,
});| Parameter | Type | Required | Default |
|---|---|---|---|
key | Key? | No | null |
label | String | Yes | — |
panelBuilder | Widget Function(BuildContext context, VoidCallback close) | Yes | — |
leading | Widget? | No | null |
size | ComponentSize? | No | null |
isOpen | bool? | No | null |
onOpenChanged | ValueChanged<bool>? | No | null |
enabled | bool | No | true |
variant | MorphButtonVariant | No | MorphButtonVariant.primary |
direction | MorphButtonDirection | No | MorphButtonDirection.top |
expandedWidth | double? | No | null |
expandedHeight | double? | No | null |
height | double? | No | null |
panelPadding | EdgeInsetsGeometry? | No | null |
borderRadius | double? | No | null |
duration | Duration? | No | null |
animate | bool | No | true |
dismissOnOutsideTap | bool | No | true |
backgroundColor | Color? | No | null |
foregroundColor | Color? | No | null |
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/morph_button/morph_button.dart
This reference is generated from the MorphButton declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

