mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-25 16:19:58 +08:00
Setup: Top left arrow button should go back
It's extremely irritating that it closes setup.
This commit is contained in:
@ -2,8 +2,8 @@ import 'package:dart_git/dart_git.dart';
|
||||
import 'package:dart_git/utils/result.dart';
|
||||
import 'package:function_types/function_types.dart';
|
||||
import 'package:git_bindings/git_bindings.dart' as git_bindings;
|
||||
import 'package:gitjournal/utils/logger.dart';
|
||||
|
||||
import 'package:gitjournal/utils/logger.dart';
|
||||
import 'clone.dart';
|
||||
|
||||
Future<Result<void>> cloneRemote({
|
||||
|
@ -406,6 +406,10 @@ class GitHostSetupScreenState extends State<GitHostSetupScreen> {
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
),
|
||||
onTap: () {
|
||||
if (_currentPageIndex != 0) {
|
||||
_previousPage();
|
||||
return;
|
||||
}
|
||||
_removeRemote();
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
@ -418,10 +422,7 @@ class GitHostSetupScreenState extends State<GitHostSetupScreen> {
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
if (_currentPageIndex != 0) {
|
||||
pageController.previousPage(
|
||||
duration: 200.milliseconds,
|
||||
curve: Curves.easeIn,
|
||||
);
|
||||
_previousPage();
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -452,8 +453,15 @@ class GitHostSetupScreenState extends State<GitHostSetupScreen> {
|
||||
}
|
||||
}
|
||||
|
||||
void _nextPage() {
|
||||
pageController.nextPage(
|
||||
Future<void> _previousPage() {
|
||||
return pageController.previousPage(
|
||||
duration: 200.milliseconds,
|
||||
curve: Curves.easeIn,
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _nextPage() {
|
||||
return pageController.nextPage(
|
||||
duration: 200.milliseconds,
|
||||
curve: Curves.easeIn,
|
||||
);
|
||||
|
Reference in New Issue
Block a user