Fix swipe to go back interaction for iOS
This commit is contained in:
parent
480fe878c0
commit
6a884b7bd0
|
@ -1,9 +1,21 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
Future<T> routeToPage<T extends Object>(BuildContext context, Widget page) {
|
||||
return Navigator.of(context).push(
|
||||
_buildPageRoute(page),
|
||||
);
|
||||
if (Platform.isAndroid) {
|
||||
return Navigator.of(context).push(
|
||||
_buildPageRoute(page),
|
||||
);
|
||||
} else {
|
||||
return Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (BuildContext context) {
|
||||
return page;
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void replacePage(BuildContext context, Widget page) {
|
||||
|
|
Loading…
Reference in a new issue