Comments (1)
Hi, and sorry for the really late response! Popping the SwipeablePageRoute
with a value should work as expected, and I can't reproduce this problem. The code below prints “Result: null” when swiping the page away and “Result: update” when clicking the “Pop” button:
import 'package:flutter/material.dart';
import 'package:swipeable_page_route/swipeable_page_route.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: '🔙 swipeable_page_route example',
home: FirstPage(),
);
}
}
class FirstPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: MorphingAppBar(title: const Text('Page 1')),
body: ElevatedButton(
onPressed: () async {
final result = await Navigator.of(context).push<String>(
SwipeablePageRoute(builder: (_) => SecondPage()),
);
print('Result: $result');
},
child: const Text('Open page 2'),
),
);
}
}
class SecondPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: MorphingAppBar(title: const Text('Page 2')),
body: ElevatedButton(
onPressed: () async => Navigator.pop(context, 'update'),
child: const Text('Pop'),
),
);
}
}
Please reopen this issue if the problem still occurs and provide the full code to reproduce it
from swipeable_page_route.
Related Issues (20)
- Option to remove shadow in page transition HOT 4
- When the body uses SingleChildScrollView cannot slide normally and return
- Named Navigator HOT 1
- Swipe from anywhere with floating effect on scene HOT 1
- Animated title does not use styles or color from appbar HOT 1
- How to have parallax effect for the first page
- Flickering bug
- Flutter 3.0 TabbarView can not support swipe to back in Android. HOT 1
- Hello, please update dependencies for flutter 3.10 HOT 1
- feature request: make canOnlySwipeFromEdge non-final HOT 2
- How does SwipeablePageRoute work with go_router? HOT 8
- It goes back twice on Android
- Build failing with Flutter 3.13.9 HOT 2
- [FR] Add reverse transition duration HOT 1
- Add "scrolledUnderElevation" to adapt to Material3 HOT 1
- Typed Go_Router? HOT 5
- Update to Flutter 3.22.0 HOT 2
- Is there a callback like `WillPop` that detects and allows swipeback? HOT 2
- flexibleSpace not supported HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swipeable_page_route.