mirror of
https://github.com/venera-app/venera.git
synced 2025-12-16 07:01:16 +00:00
Optimize iOS full-screen back gesture implementation (#643)
* Optimize iOS full-screen back gesture implementation - Fix #613 and #617 * Fix setting page
This commit is contained in:
@@ -14,20 +14,14 @@ extension Navigation on BuildContext {
|
||||
return Navigator.of(this).canPop();
|
||||
}
|
||||
|
||||
Future<T?> to<T>(Widget Function() builder,
|
||||
{bool enableIOSGesture = true, bool iosFullScreenGesture = true}) {
|
||||
Future<T?> to<T>(Widget Function() builder,) {
|
||||
return Navigator.of(this).push<T>(AppPageRoute(
|
||||
builder: (context) => builder(),
|
||||
enableIOSGesture: enableIOSGesture,
|
||||
iosFullScreenPopGesture: iosFullScreenGesture));
|
||||
builder: (context) => builder()));
|
||||
}
|
||||
|
||||
Future<void> toReplacement<T>(Widget Function() builder,
|
||||
{bool enableIOSGesture = true, bool iosFullScreenGesture = true}) {
|
||||
Future<void> toReplacement<T>(Widget Function() builder) {
|
||||
return Navigator.of(this).pushReplacement(AppPageRoute(
|
||||
builder: (context) => builder(),
|
||||
enableIOSGesture: enableIOSGesture,
|
||||
iosFullScreenPopGesture: iosFullScreenGesture));
|
||||
builder: (context) => builder()));
|
||||
}
|
||||
|
||||
double get width => MediaQuery.of(this).size.width;
|
||||
|
||||
Reference in New Issue
Block a user