Show overlays without context
Features
Unlike other contextless overlay solutions, fast_overlays uses Flutter's built-in overlay implementations
fast_overlays supports the following overlays:
- Snackbar
- Material banner
- Modal bottom sheet
- Date picker
- Date range picker
- Time picker
- License page
- Search
- Menu
- Dialog
- About dialog
- General dialog
Convenience classes
Class | Use-case |
---|---|
SnackBarDuration | SnackBar duration constants |
Getting started
Register a GlobalKey with FastOverlays and your MaterialApp
import 'package:fast_overlays/fast_overlays.dart';
import 'package:flutter/material.dart';
void example() {
// ...
MaterialApp(
navigatorKey: FastOverlays.init(),
);
}
Usage
import 'package:fast_overlays/fast_overlays.dart';
import 'package:flutter/material.dart';
void showSnackbar() {
FastOverlays.showSnackBar(
const SnackBar(
content: Text('I am a snackbar'),
duration: SnackBarDuration.indefinite,
),
);
}
Additional information
See fast_ui for more information