Created
August 22, 2019 06:50
-
-
Save webianks/d71da659a2da6e9c63c777bbe1b81e2c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
showOverlay(BuildContext context) { | |
if (overlayEntry != null) return; | |
OverlayState overlayState = Overlay.of(context); | |
overlayEntry = OverlayEntry(builder: (context) { | |
return Positioned( | |
bottom: MediaQuery.of(context).viewInsets.bottom, | |
right: 0.0, | |
left: 0.0, | |
child: InputDoneView()); | |
}); | |
overlayState.insert(overlayEntry); | |
} | |
removeOverlay() { | |
if (overlayEntry != null) { | |
overlayEntry.remove(); | |
overlayEntry = null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment