Skip to content
On this page

BottomSheet

A sheet that presents content above the lower edge of the screen.

BottomSheet in FluttyUIBottomSheet in FluttyUI dark theme

Import

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

Usage

Call this from a callback with a context below FluttyApp, which provides the overlay.

ui.BottomSheet.show(
  context: context,
  title: const Text('Details'),
  child: const Text('Add supporting content here.'),
)

API Reference

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

BottomSheet

const BottomSheet({
  super.key,
  this.size,
  this.title,
  required this.child,
  this.actions = const [],
  this.showCloseButton = true,
  this.showHandle = true,
  this.padding,
  this.backgroundColor,
  this.foregroundColor,
  this.keyboardBackgroundColor,
  this.borderRadius,
  this.maxWidth = 440,
  this.textStyle,
});
ParameterTypeRequiredDefault
keyKey?Nonull
sizeComponentSize?Nonull
titleWidget?Nonull
childWidgetYes—
actionsList<Widget>Noconst []
showCloseButtonboolNotrue
showHandleboolNotrue
paddingEdgeInsetsGeometry?Nonull
backgroundColorColor?Nonull
foregroundColorColor?Nonull
keyboardBackgroundColorColor?Nonull
borderRadiusdouble?Nonull
maxWidthdoubleNo440
textStyleTextStyle?Nonull

Future<T?> show<T>

static Future<T?> show<T>({
  required BuildContext context,
  ComponentSize? size,
  Widget? title,
  required Widget child,
  List<Widget> actions = const [],
  bool showCloseButton = true,
  bool showHandle = true,
  EdgeInsetsGeometry? padding,
  Color? backgroundColor,
  Color? foregroundColor,
  Color? keyboardBackgroundColor,
  double? borderRadius,
  double maxWidth = 440,
  TextStyle? textStyle,
  bool barrierDismissible = true,
  ComponentMotion? motion,
});

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/overlays/bottom_sheet/bottom_sheet.dart

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

DartFlutter

Get started with FluttyUI