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.
AttachmentPicker
const AttachmentPicker({
super.key,
required this.attachments,
required this.onChanged,
this.onDone,
this.onError,
this.delegate = const NativeAttachmentPickerDelegate(),
this.sources = AttachmentPickerSource.values,
this.maxAttachments = 10,
this.maxFileBytes = 25 * 1024 * 1024,
this.maxTotalBytes = 100 * 1024 * 1024,
this.allowedExtensions = const [],
this.allowImageEditing = true,
this.enabled = true,
this.doneLabel = 'Attach',
this.motion,
});| Parameter | Type | Required | Default |
|---|---|---|---|
key | Key? | No | null |
attachments | List<AttachmentPickerItem> | Yes | — |
onChanged | ValueChanged<List<AttachmentPickerItem>> | Yes | — |
onDone | ValueChanged<List<AttachmentPickerItem>>? | No | null |
onError | void Function(Object error)? | No | null |
delegate | AttachmentPickerDelegate | No | const NativeAttachmentPickerDelegate() |
sources | List<AttachmentPickerSource> | No | AttachmentPickerSource.values |
maxAttachments | int | No | 10 |
maxFileBytes | int | No | 25 * 1024 * 1024 |
maxTotalBytes | int | No | 100 * 1024 * 1024 |
allowedExtensions | List<String> | No | const [] |
allowImageEditing | bool | No | true |
enabled | bool | No | true |
doneLabel | String | No | 'Attach' |
motion | ComponentMotion? | No | null |
Future<List<AttachmentPickerItem>?> show
static Future<List<AttachmentPickerItem>?> show({
required BuildContext context,
List<AttachmentPickerItem> initialAttachments = const [],
AttachmentPickerDelegate delegate = const NativeAttachmentPickerDelegate(),
List<AttachmentPickerSource> sources = AttachmentPickerSource.values,
int maxAttachments = 10,
int maxFileBytes = 25 * 1024 * 1024,
int maxTotalBytes = 100 * 1024 * 1024,
List<String> allowedExtensions = const [],
bool allowImageEditing = true,
});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/media/attachment_picker/attachment_picker.dart
This reference is generated from the AttachmentPicker declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

