Bottom sheet
A bottom sheet gives a short task or a few details their own surface while keeping the current page in place.
Read a delivery note
#Open Delivery note to read where the parcel will be left. Close the sheet to return to the page.
components/bottom-sheet/appliance/read_delivery_note.dart
import 'package:flutter/widgets.dart';
import 'package:appliance_ui/appliance_ui.dart';
class ReadDeliveryNote extends StatelessWidget {
const ReadDeliveryNote({super.key});
@override
Widget build(BuildContext context) => ApplianceButton(
'Delivery note',
onPressed: () => showApplianceBottomSheet<void>(
context: context,
title: 'Delivery note',
builder: (_) => const Text('Leave the parcel at the side door.'),
),
);
}
Parameters
showApplianceBottomSheet API ↗title- Heading at the top of the panel.
builder- Builds the content inside the sheet.
barrierDismissible- Allows a press outside the sheet to dismiss it.
Shared behaviour
- Keyboard and focus. Tab to Delivery note and press Enter. Try Escape, then reopen the sheet and use its close action.
- Screen readers. Read from the sheet heading through the note and the dismiss action.
- Direction and type. Try larger type on the phone. On wider screens some looks present the same details on a centred surface.