Hibok
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 
 

51 řádky
1.2 KiB

  1. import 'package:flutter/material.dart';
  2. class TutorialOverlay extends ModalRoute<void> {
  3. @override
  4. Duration get transitionDuration => Duration(milliseconds: 100);
  5. @override
  6. bool get opaque => false;
  7. @override
  8. bool get barrierDismissible => false;
  9. @override
  10. Color get barrierColor => Colors.black.withOpacity(0.5);
  11. @override
  12. String get barrierLabel => null;
  13. @override
  14. bool get maintainState => true;
  15. final child;
  16. TutorialOverlay({this.child});
  17. @override
  18. Widget buildPage(
  19. BuildContext context,
  20. Animation<double> animation,
  21. Animation<double> secondaryAnimation,
  22. ) {
  23. // This makes sure that text and other content follows the material style
  24. return Material(
  25. type: MaterialType.transparency,
  26. // make sure that the overlay content is not cut off
  27. child: SafeArea(
  28. child: child, //_buildOverlayContent(context),
  29. ),
  30. );
  31. }
  32. @override
  33. Widget buildTransitions(BuildContext context, Animation<double> animation,
  34. Animation<double> secondaryAnimation, Widget child) {
  35. return FadeTransition(
  36. opacity: animation,
  37. child: child,
  38. );
  39. }
  40. }