Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. void showOverlay(BuildContext context) async {
  2. final OverlayState overlayState = Overlay.of(context);
  3. final OverlayEntry overlayEntry = OverlayEntry(
  4. builder: (BuildContext context)=>Positioned(
  5. left: 0.0,
  6. right: 0,
  7. bottom: 90.0,
  8. child: Container(
  9. margin: const EdgeInsets.all(15.0),
  10. padding: const EdgeInsets.all(3.0),
  11. decoration: BoxDecoration(
  12. borderRadius: BorderRadius.circular(25.0),
  13. border: Border.all(color: Colors.blueAccent)
  14. ),
  15. child:
  16. Text('Focus, lighting and contrast help',style: TextStyle(fontWeight: FontWeight.normal,
  17. color: Colors.white,
  18. fontSize: 18.0,
  19. decoration: TextDecoration.none)),
  20.  
  21. )
  22. ),
  23. );
  24. overlayState.insert(overlayEntry);
  25. await Future<dynamic>.delayed(Duration(seconds: 2));
  26. overlayEntry.remove();
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement