mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 18:38:36 +08:00
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:
@ -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(),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user