Questions tagged [materialpageroute]

35 questions
0
votes
1 answer

How do I pass in a string variable into a ..loadRequest flutter controller that I received from another page thru MaterialPageRoute

This is my code: class ArticleView extends StatefulWidget { final String blogUrl; ArticleView({required this.blogUrl,super.key}); WebViewController controlla = WebViewController() ..setJavaScriptMode(JavaScriptMode.unrestricted) …
AceWorld
  • 1
  • 2
0
votes
0 answers

flutter routing not routing

I'm building an amazon clone app, currently building the sign up function of the app. I run into the following problem is when I as a user sign up for an account and click on sign up there happen's nothing. How the code is setup it should reroute…
0
votes
1 answer

How can I call a function as soon as I go back to the main screen? - Flutter

Hello, From the main screen of my app, pressing a button switches to another screen. IconButton( onPressed: () { Navigator.push( context, MaterialPageRoute( …
CastoldiG
  • 178
  • 3
  • 17
0
votes
0 answers
0
votes
2 answers

Always show BottomNavigationBar

Is there a way to show the BottomNavigationBar on every page? Currently the BottomNavigationBar disappears when pushing the button but I want the BottomNavigationBar to always be displayed even when routing to a new page. The following code shows my…
0
votes
1 answer

How to prevent other widgets from staying active when leaving them in flutter

I have an app with many pages/interfaces and most of them are getting the data from an api, when i leave a page and go to another, the previous one stays active forever. I noticed that when prenting the data result on every page and i noticed even…
Salim Dziri
  • 21
  • 1
  • 7
0
votes
1 answer

Navigate to different pages on the basis of group name in flutter

I have created one application in which all the group names are fetched. Now, I want the functionality in which if I click on group name "Technical", I will be redirected to UI Page of Technical group. When I click on group name "Medical", I will be…
Deep Shah
  • 7
  • 6
0
votes
1 answer

flutter:: Is it possible to load statefulwidget as a second page?

I have main.dart, a.dart and b.dart. When I run main.dart, the results of a and b are all displayed in one page. But I want the results of a and b to be displayed on different pages. So I used MaterialPageRoute to make a visible on the first page…
lele
  • 91
  • 6
0
votes
1 answer

Get MaterialPageRoute from Firestore - Flutter

I don't know whether it's possible or not but I want to get the new page for my navigator from the firestore database. Let me explain: I have the following code: onTap: () { Navigator.of(context).push(MaterialPageRoute( builder: (context) =>…
Thoxh
  • 149
  • 9
0
votes
2 answers

I want to Navigate to another page and parse with firestore data but how do I do that when I am using MaterialPageRoute?

I want to navigate from Products Page to a ProductDetail page but I am using data directly from firebase firestore. What do I put in the MaterialPageRoute as the arguments? I am also using StreamBuilder to get data snapshot from firebase. Below is…
0
votes
3 answers

How to pass many parameters from one page to another in flutter

... onTap: () { Navigator.push( context, MaterialPageRoute( builder: (context) => CategoryPage( snapshot.data[index]), )); }, ... Using the above code i try to pass the service id and the service type to the…
0
votes
1 answer

The getter 'data' was called on null. Receiver: null Tried calling: data

Tried signing up user with Firebase but got the above error instead, and the code is formatted in such a way that it should redirect the user to homepage after a successful signup. My main.dart import 'package:bedc_app/home_page.dart'; import…
0
votes
1 answer

Reuse Widget Across Two Pages With Keys

Long-winded context, scroll to bottom for specific question: I have a page with a custom widget (EntrySearch) containing a ListView and a search bar. When the user clicks on an item in the list view, I push a new page with the same list view and a…
0
votes
2 answers

Flutter: Routing to a different .dart file failing. Returns a black screen

I have created a social media app and now i am trying t customize my App by and i have added a Search, Chat icons and i would like the search icon to route to the Search page with exists in the App. I implemented MaterialPageRoute but it just…
Ace
  • 390
  • 1
  • 4
  • 11
0
votes
2 answers

Flutter/Dart - Navigator.pop(context) - How to Pop two Contexts back?

I've got; screen/widget Home() which calls; screen/widget MainStage() which calls; future method futureStage() which builds; PageViewBuilder StageBuilder() which contains; SwipeGestureRecognizer which calls; Navigator.push (context, …
Meggy
  • 1,491
  • 3
  • 28
  • 63