diff --git a/lib/screens/onboarding_screens.dart b/lib/screens/onboarding_screens.dart index 9f7c4ddb..f362deb5 100644 --- a/lib/screens/onboarding_screens.dart +++ b/lib/screens/onboarding_screens.dart @@ -183,7 +183,7 @@ class OnBoardingScreenState extends State { }, ); - return new Scaffold( + var scaffold = new Scaffold( key: _scaffoldKey, body: new Container( width: double.infinity, @@ -202,6 +202,20 @@ class OnBoardingScreenState extends State { padding: EdgeInsets.all(16.0), ), ); + + return new WillPopScope( + onWillPop: () { + if (_currentPageIndex != 0) { + pageController.previousPage( + duration: Duration(milliseconds: 200), + curve: Curves.easeIn, + ); + } else { + SystemChannels.platform.invokeMethod('SystemNavigator.pop'); + } + }, + child: scaffold, + ); } void setPageInputUrlDone() { diff --git a/pubspec.yaml b/pubspec.yaml index c6f18202..7ce66474 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: journal description: A Journaling App Built on top of Git -version: 1.0.0+3 +version: 1.0.0+5 dependencies: flutter: