mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-26 00:29:20 +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:dart_git/utils/result.dart';
|
||||||
import 'package:function_types/function_types.dart';
|
import 'package:function_types/function_types.dart';
|
||||||
import 'package:git_bindings/git_bindings.dart' as git_bindings;
|
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';
|
import 'clone.dart';
|
||||||
|
|
||||||
Future<Result<void>> cloneRemote({
|
Future<Result<void>> cloneRemote({
|
||||||
|
@ -406,6 +406,10 @@ class GitHostSetupScreenState extends State<GitHostSetupScreen> {
|
|||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
if (_currentPageIndex != 0) {
|
||||||
|
_previousPage();
|
||||||
|
return;
|
||||||
|
}
|
||||||
_removeRemote();
|
_removeRemote();
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
@ -418,10 +422,7 @@ class GitHostSetupScreenState extends State<GitHostSetupScreen> {
|
|||||||
return WillPopScope(
|
return WillPopScope(
|
||||||
onWillPop: () async {
|
onWillPop: () async {
|
||||||
if (_currentPageIndex != 0) {
|
if (_currentPageIndex != 0) {
|
||||||
pageController.previousPage(
|
_previousPage();
|
||||||
duration: 200.milliseconds,
|
|
||||||
curve: Curves.easeIn,
|
|
||||||
);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -452,8 +453,15 @@ class GitHostSetupScreenState extends State<GitHostSetupScreen> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _nextPage() {
|
Future<void> _previousPage() {
|
||||||
pageController.nextPage(
|
return pageController.previousPage(
|
||||||
|
duration: 200.milliseconds,
|
||||||
|
curve: Curves.easeIn,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _nextPage() {
|
||||||
|
return pageController.nextPage(
|
||||||
duration: 200.milliseconds,
|
duration: 200.milliseconds,
|
||||||
curve: Curves.easeIn,
|
curve: Curves.easeIn,
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user