From 33c607080e1c7467a2179abde930d67d0edc138d Mon Sep 17 00:00:00 2001 From: Stein Milder Date: Fri, 21 Oct 2022 14:03:35 +0200 Subject: [PATCH] feat: changes for safino --- lib/flutter_introduction.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/flutter_introduction.dart b/lib/flutter_introduction.dart index 609e530..43e323a 100644 --- a/lib/flutter_introduction.dart +++ b/lib/flutter_introduction.dart @@ -11,7 +11,7 @@ class Introduction extends StatefulWidget { const Introduction({ required this.navigateTo, required this.options, - required this.child, + this.child, this.physics, this.service, super.key, @@ -21,7 +21,7 @@ class Introduction extends StatefulWidget { final IntroductionService? service; final IntroductionOptions options; final ScrollPhysics? physics; - final Widget child; + final Widget? child; @override State createState() => _IntroductionState(); @@ -59,7 +59,10 @@ class _IntroductionState extends State { }, ); } else { - return widget.child; + WidgetsBinding.instance!.addPostFrameCallback((_) { + widget.navigateTo(); + }); + return widget.child ?? const CircularProgressIndicator(); } }, );