show method
void
show(
- BuildContext context,
- Widget contentView, {
- EdgeInsetsGeometry? margin,
- Color? backgroundColor,
Implementation
void show(BuildContext context, Widget contentView, {EdgeInsetsGeometry? margin, Color? backgroundColor}) {
GlobalKey<_TopFloatingWidgetState> key = GlobalKey<_TopFloatingWidgetState>();
_remove();
OverlayEntry overlayEntry = OverlayEntry(
builder: (BuildContext context) => _TopFloatingWidget(
key: key,
contentView: contentView,
margin: margin,
backgroundColor: backgroundColor,
),
);
Overlay.of(context).insert(overlayEntry);
_overlayEntry = overlayEntry;
_key = key;
}