Questions tagged [materialpageroute]

35 questions
8
votes
3 answers

Flutter - Multi Page Navigation using bottom navigation bar icons

I'm trying to navigate to different pages within my app using the icons in my bottom navigation bar. I have tried many tutorials and can't seem to work out the best way to achieve this. I have created my Homepage (code below) and 2 additional pages,…
TJMitch95
  • 421
  • 3
  • 7
  • 23
6
votes
2 answers

How to remove the first screen from route in Flutter?

I am creating a loading screen for an app. This loading screen is the first screen to be shown to the user. After 3 seconds the page will navigate to the HomePage. everything is working fine. But when the user taps back button the loading screen…
Vettiyanakan
  • 7,957
  • 6
  • 37
  • 55
4
votes
0 answers

Flutter laggy navigation

I have this auto platform detect navigation function but when I use it for the iPhone on release mode it lags but when I make it only with MaterialPageRoute it doesn't lag at all on iOS. static navigateTo({BuildContext context, Widget w, bool…
Mohamed Mohamed
  • 3,965
  • 3
  • 23
  • 40
3
votes
2 answers

Flutter Modal Bottom Sheet with Navigator does not pop as expected

I a working with ModalBottomSheet and I love the package. However I am encountering an issue when trying to navigate with in a ModalBottomSheet. Here is a ScreenVideo for a better understanding. As you can see the View is presented as a…
3
votes
1 answer

How to pass an Argument as SerializedMessage

I'm quite new to Flutter and to learn "best practice" I loaded up the new skeleton example app. You get three example items in a list view and when you click on one of them you go to a details view. I want to pass the object so that for every…
Tim4497
  • 340
  • 3
  • 19
1
vote
1 answer

The argument type 'Route Function(RouteSettings)' can't be assigned to the parameter type 'List Function(String)?

class RoutesGenerator { static Route generateRoutes( RouteSettings settings) { switch(settings.name!) { case '/': return MaterialPageRoute(builder: (_) => const HomePage()); case '/add_employee': return…
1
vote
0 answers

Future builder with page transition cause lag

I have some troubles in my applications since I'm using different animated widget in combination of Future Builder (I think this is the problem). For example when I perform a navigation to another page and in this page I retrieve data with future…
1
vote
0 answers

Flutter: Navigator Push changes position of my Background Image

Two Files: account_page.dart & cart_page.dart I used Navigator.push to embed AccountPage() [from account_page.dart] within CartPage() (inside cart_page.dart). When I check the simulation, the background image widget within the Stack() changes…
Xamata
  • 11
  • 1
1
vote
2 answers

why can't the widget finder in my integration test find a widget after my test successfully signs into my flutter app?

I am trying to write some integration tests that start off with a login attempt then proceeds to navigate the app a bit to a certain page. The attempt to sign in actually succeeds but after that my attempts to find any widgets fails so I cannot…
lost baby
  • 3,178
  • 4
  • 32
  • 53
1
vote
3 answers

Flutter: Undefined name 'context'

I'm currently coding an app and I have some problems with page routing. I´m using a RouteGenerator, which works perfectly except in this case. If I try to navigate to my second screen, I receive an error saying: Undefined name 'context'. Try…
Nick
  • 71
  • 11
1
vote
1 answer

Flutter send data to a new route saying that the parameter isn't defined

I'm trying to pass a title to the next page. Keep in mind that FIRST and SECOND page are on two different dart file First page: Navigator.push( context, MaterialPageRoute( builder: (context) => Museo(title: newMuseo[index]['title']) …
1
vote
1 answer

(FLUTTER) ontap ListView(return listTile()) with Streambuilder causing data for inheritance to be null?

Hi im trying to create simple realtime database using Streambuilder while returning a Listview.builder which in it is a ListTile. I wish to give the ListTile an ability to move to other dart. which, I managed to do however when im trying to pass the…
0
votes
1 answer

Flutter: cannot delete Getx previous route

I want to clear all previous routes in Getx. That's why I am using that function: static Future removeAllAndNavigate( String nextScreen, { bool Function(Route)? predicate, dynamic arguments, int? id, Map
Abir Ahsan
  • 2,649
  • 29
  • 51
0
votes
0 answers

How to make the upgrader push to a new Navigator route when app do not need a update and the UpgradeAlert or UpgradeCard will not appear?

In materialApp I am using the upgrader to in home attribute to show a upgraderAlert to show that there is a app Update pending and need to update the app (I want to make it forcefully upgrade). here is the code of my material app where it goes to a…
0
votes
1 answer

How to create material button class in flutter

I'm currently creating an application and there's a lot of button that is needed. Is there a proper way to create it? I tried creating class for it but I've encountered multiple errors while creating it specifically in the Material Page Route part.
Yoke
  • 3
  • 2
1
2 3