Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void showOverlay(BuildContext context) async {
- final OverlayState overlayState = Overlay.of(context);
- final OverlayEntry overlayEntry = OverlayEntry(
- builder: (BuildContext context)=>Positioned(
- left: 0.0,
- right: 0,
- bottom: 90.0,
- child: Container(
- margin: const EdgeInsets.all(15.0),
- padding: const EdgeInsets.all(3.0),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(25.0),
- border: Border.all(color: Colors.blueAccent)
- ),
- child:
- Text('Focus, lighting and contrast help',style: TextStyle(fontWeight: FontWeight.normal,
- color: Colors.white,
- fontSize: 18.0,
- decoration: TextDecoration.none)),
- )
- ),
- );
- overlayState.insert(overlayEntry);
- await Future<dynamic>.delayed(Duration(seconds: 2));
- overlayEntry.remove();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement