flutter-navigation

Flutter navigation, reopen page instead of pushing it again

女生的网名这么多〃 提交于 2021-01-02 07:00:11
问题 I'm new to flutter and I'm working on an App that have multiple screens. I would like to know to stop flutter from creating multiple screens of the same route, for example I have Page 1 and Page 2 , if I click on the button to navigate to Page 2 and clicked again on the same button the application will push a new screen of Page 2 and i will have it twice and if I click on the return button it will send me back to the first created Page 2 is there a way to create every page only once and then

Receive Response from pop navigator in Flutter

ぃ、小莉子 提交于 2020-12-27 06:09:14
问题 Here is a simple example of code that navigator push for a form called. and pop for an answer. my goal is to make a pop of an object, not a string, but keeping it that simple still doesn't work. main.dart: import 'package:flutter/material.dart'; import 'answer.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { final appTitle = 'Form Validation Demo'; return MaterialApp( title: appTitle, home: Scaffold( appBar: AppBar(

Receive Response from pop navigator in Flutter

孤街醉人 提交于 2020-12-27 06:03:17
问题 Here is a simple example of code that navigator push for a form called. and pop for an answer. my goal is to make a pop of an object, not a string, but keeping it that simple still doesn't work. main.dart: import 'package:flutter/material.dart'; import 'answer.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { final appTitle = 'Form Validation Demo'; return MaterialApp( title: appTitle, home: Scaffold( appBar: AppBar(

Possible to copy iOS App Store transition using Flutter?

旧城冷巷雨未停 提交于 2020-12-04 06:08:40
问题 Is it possible to copy the transition effect of iOS App Store using Flutter? I tried using Hero Animation by placing two tags into the root layout of both widgets, but animation looks janky or not what I expected. But good thing about this is I am able to do iOS swipe back as I'm using MaterialPageRoute. Source Hero( tag: 'heroTag_destinationScreen', transitionOnUserGestures: true, flightShuttleBuilder: (BuildContext flightContext, Animation<double> animation, HeroFlightDirection

Possible to copy iOS App Store transition using Flutter?

无人久伴 提交于 2020-12-04 06:07:00
问题 Is it possible to copy the transition effect of iOS App Store using Flutter? I tried using Hero Animation by placing two tags into the root layout of both widgets, but animation looks janky or not what I expected. But good thing about this is I am able to do iOS swipe back as I'm using MaterialPageRoute. Source Hero( tag: 'heroTag_destinationScreen', transitionOnUserGestures: true, flightShuttleBuilder: (BuildContext flightContext, Animation<double> animation, HeroFlightDirection

Possible to copy iOS App Store transition using Flutter?

有些话、适合烂在心里 提交于 2020-12-04 06:06:43
问题 Is it possible to copy the transition effect of iOS App Store using Flutter? I tried using Hero Animation by placing two tags into the root layout of both widgets, but animation looks janky or not what I expected. But good thing about this is I am able to do iOS swipe back as I'm using MaterialPageRoute. Source Hero( tag: 'heroTag_destinationScreen', transitionOnUserGestures: true, flightShuttleBuilder: (BuildContext flightContext, Animation<double> animation, HeroFlightDirection