overlay_manager 0.0.1 copy "overlay_manager: ^0.0.1" to clipboard
overlay_manager: ^0.0.1 copied to clipboard

outdated

Group and manage easily flutter overlays.

Overlay Manager #

Import #

import 'package:overlay_manager/overlay_manager.dart';

Create #

final manager = GlobalOverlayManager(navigatorKey: navKey);

or

final manager = ContextOverlayManager(context: context);

Using #

  • For show an overlay:
manager.show(
  barrierColor: Colors.red.shade500.withOpacity(0.2),
  onDismiss: print,
  isDismissible: false,
  builder: (context, entry) => AlertMessage(
    onClose: () => entry.close(0),
  ),
);

call entry.close(0) to close this overlay.

  • If you want to close all overlay when the screen is disposed, let's try:
@override
void dispose() {
    manager.closeAll();
    super.dispose();
}
  • The [overlay] rearrange is coming soon.
5
likes
0
points
116
downloads

Publisher

unverified uploader

Weekly Downloads

Group and manage easily flutter overlays.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on overlay_manager