fast_overlays 0.1.2 fast_overlays: ^0.1.2 copied to clipboard
Show overlays, dialogs, snackbars, and more without a context
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(GlobalKey<NavigatorState>()),
);
}
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