ios - GitHostSetup: Add a back button on the top left

There is no way to exit the host setup otherwise. In Android, there is
the back button, but that doesn't exist in ios. This took me way too
long to implement, and even now, I'm not convinced that the button looks
right.
This commit is contained in:
Vishesh Handa
2019-10-09 21:50:24 +02:00
parent 57eb00a583
commit 51d2efaad9

View File

@ -265,24 +265,38 @@ class GitHostSetupScreenState extends State<GitHostSetupScreen> {
},
);
var body = Container(
width: double.infinity,
height: double.infinity,
child: Stack(
alignment: FractionalOffset.bottomCenter,
children: <Widget>[
pageView,
DotsIndicator(
dotsCount: _pageCount,
position: _currentPageIndex,
decorator: DotsDecorator(
activeColor: Theme.of(context).primaryColorDark,
),
),
],
),
padding: EdgeInsets.all(16.0),
);
var scaffold = Scaffold(
body: Container(
width: double.infinity,
height: double.infinity,
child: Stack(
alignment: FractionalOffset.bottomCenter,
children: <Widget>[
pageView,
DotsIndicator(
dotsCount: _pageCount,
position: _currentPageIndex,
decorator: DotsDecorator(
activeColor: Theme.of(context).primaryColorDark,
body: Stack(
children: <Widget>[
body,
if (Platform.isIOS)
InkWell(
child: Container(
child: Icon(Icons.arrow_back, size: 32.0),
padding: EdgeInsets.all(8.0),
),
)
],
),
padding: EdgeInsets.all(16.0),
onTap: () => Navigator.of(context).pop(),
),
],
),
);