diff --git a/lib/screen/interactive_postcard/postcard_explain.dart b/lib/screen/interactive_postcard/postcard_explain.dart index 337c94e51..f02dbfda0 100644 --- a/lib/screen/interactive_postcard/postcard_explain.dart +++ b/lib/screen/interactive_postcard/postcard_explain.dart @@ -43,8 +43,12 @@ class _PostcardExplainState extends State { @override void initState() { - unawaited(_initPlayer()); _viewClaimPage = !widget.payload.isPayToMint; + if (_viewClaimPage) { + unawaited(_initPlayer()); + } else { + unawaited(_colouringController.play()); + } _swiperController = SwiperController(); super.initState(); unawaited(injector().setAutoShowPostcard(false)); @@ -60,6 +64,8 @@ class _PostcardExplainState extends State { await _colouringController.initialize().then((_) { _colouringController.setLooping(true); }); + + await _controller.play(); } @override @@ -140,9 +146,6 @@ class _PostcardExplainState extends State { setState(() { _currentIndex = index; if (index == 0) { - unawaited(_controller.play()); - } - if (index == 1) { unawaited(_colouringController.play()); } }); @@ -252,6 +255,9 @@ class _PostcardExplainState extends State { setState(() { _viewClaimPage = false; }); + Future.delayed(const Duration(milliseconds: 50), () { + unawaited(_colouringController.play()); + }); }, ), const SizedBox(height: 10),