151 questions
0
votes
0
answers
32
views
How to avoid building pages in the route stack returned by MaterialApp.initialRoutes?
I'd like a password reset email to navigate me to an app page:
https://myapp.com/#/pwreset?token=12345
It seems I can have MaterialApp.onGenerateInitialRoutes generate a stack of pages:
Home
...
0
votes
0
answers
170
views
Flutter: Handling navigation with scaffold
I am new to flutter, and I am still getting the grasp of the concept. I have a simple app that implements a navigation drawer that can navigate to 3 other screens (Let's call them screen 1, 2 and 3).
...
1
vote
0
answers
44
views
Flutter: Persistent BottomNavigationBar with proper back navigation not working with PopScope
I'm trying to implement a persistent bottom navigation bar that stays visible across all pages while maintaining proper back navigation. However, I'm encountering issues with the back button behavior.
...
1
vote
0
answers
27
views
Flutter Guest Access with Bloc and go_router
Trying to implement guest access to my app,
The app flow goes as this: Walkthrough screen (/onboarding) => user can either login/signup/continueAsguest after the first installation as the user ...
-1
votes
1
answer
139
views
handle back button in nested navigators with pop scope flutter
I am trying to handle my nested navigators with Pop Scope.
Beacuse in the nested routes , when i tap the back button on the device the app closes.
The onInvoked method is deprecated so i couldn't ...
1
vote
1
answer
137
views
Provide a bloc to a portion of the widget tree with go_router
I use flutter_bloc for the state management and go_router for navigation and routing in my app.
Here's a simple version of my router:
class AppRouter {
AppRouter._();
static GoRouter router = ...
1
vote
0
answers
104
views
When I tap the back button on the phone, my app closes
When I tap the back button on the phone the app closes. I want it to go back to the previous route instead of exiting.
Also this didn't work:
android:enableOnBackInvokedCallback="true"
In my ...
0
votes
2
answers
173
views
Android back button closes the app instead of popping the current route
Using the new Navigator 2.0 API for navigation in my Flutter app, I have the following simple version of my code:
import 'package:flutter/material.dart';
void main() {
runApp(const MainApp());
}
...
2
votes
0
answers
50
views
flutter jumps back to the last route
I want to build a loading screen for my flutter app, which includes a small start animation.
The goal is that the loading screen is only left when a 4 second timer has expired and the data is loaded.
...
0
votes
1
answer
109
views
showDialog rebuild after navigating
I am trying to show a loading after making a request and immediately after trying to navigate to another page. For this I am using a ShowDialog and a FutureProgressDialog. The problem is that when the ...
1
vote
0
answers
74
views
How to have a BottomNavigationBar show on more than just the main screens, but not all screens?
Currently it only shows on main screens. I can only get it working on either ALL screens or only main screens... I need to be able to choose which screens to show the BottomNavigationBar on.
I now ...
1
vote
1
answer
719
views
Transitons doesn't work with StatefulShellRoute in go_router package
This is the official example that demonstrates how to setup nested navigation using a BottomNavigationBar, where each bar item uses its own persistent navigator, i.e. navigation state is maintained ...
1
vote
1
answer
800
views
Flutter GetX: How to obtain routes in stack, aka routing history?
I try to get access to the stack variable where GetX stores visited routes.
It is purely educational for now, but I think it can be useful sometimes.
I tried Get.routeTree.routes but it is just a list ...
0
votes
1
answer
47
views
How to check internet connectivity globally with routers?
How can we check internet connectivity? I can check with Streambuilder but how to achieve this with routers? The problem is we can not use async await in this.
If anyone can suggest anything on this ...
1
vote
1
answer
542
views
Deferred page loading in Fluter Web with Router
I am working on optimizing the initial page load of my Flutter web app. One path I am investigating is to reduce the binary size of main.dart.js by splitting it into parts using deferred loading.
I am ...
0
votes
1
answer
211
views
How to apply reverse animation on Navigator.pop() using flutter_animate package?
I'm applying a fade animation to my full-screen overlay widget using flutter_animate.
Animating "opening" the overlay is as simple as adding a single line of code like Animate(effects: const ...
0
votes
1
answer
612
views
Getx Close to Route automatically getting called
Automatically CLOSE TO ROUTE gettng called deleting the dependencies injected.
the below code is used for navigating to next screen, and when I am clicking the back button provided by scaffold this is ...
0
votes
0
answers
299
views
A Global Key was used multiple times inside one widget's child list
Getting a error in flutter = 1. A Global Key was used multiple times inside one widget's child list and Could not find a generator for route Route Settings("/", null) in the _Widgets App ...
0
votes
1
answer
149
views
Flutter can't pass optional Route Argument
I am trying to pass an object as a route argument in Flutter. For this I use ModalRoute.of(context as BuildContext)!.settings.arguments as Object?; . This object should be optional. Therefore I have ...
1
vote
0
answers
138
views
Can't clear stack while navigation on auto_route
I have a question about auto_route in Flutter: I can't clear the stacks while navigating.
I have initialized auto_route in MyApp like this:
class MyApp extends StatelessWidget {
MyApp({super.key});...
2
votes
0
answers
332
views
Flutter FCM Push Notifications - Routing to a widget and displaying when app has foreground
I am working on integrating FCM notifications into my Flutter app but haven't found many examples on displaying the notification details in a widget (plenty of documentation for printing notification ...
1
vote
0
answers
171
views
Is there any Solution to keep user login state persistent in Flutter app using auto router?
Hello Flutter experts,
I am currently working on a Flutter application and following the clean architecture pattern. I have successfully implemented user authentication using Bloc, and I'm using the ...
1
vote
0
answers
549
views
Flutter Dynamic Screen Change and Nested Routing with GetX (Dashboard)
I am new to flutter and currently developing a dashboard for the client. I am stuck with some issue, I created a dummy app now to test my implementations. The issue I am getting is I have a menu ...
0
votes
1
answer
456
views
How can I add a splash screen to my Flutter app when having a routemaster package?
Newbie programmer and first time asking here. Hello!
I have made a Flutter project and have used routemaster to decide whether the user is logged in or no; if Firebase recognizes the user and has data ...
2
votes
0
answers
1k
views
How to implement nested navigation with auth pages with go router in flutter?
So I have a app that when user open the app it first goes to splash screen then goes to login pages and after signin in user can see the home screen. But home screen is a nested navigation. It's ...
1
vote
2
answers
180
views
How to conditionally define colors of icons in bottom app bar
I want to use a BottomAppBar and due to technical reasons I cannot use the BottomNavigationBar.
How do I define the color of my icons depending on which screen I'm on? I.e. when I am on Screen A, the ...
1
vote
1
answer
846
views
Issue with GoRouter (Flutter) unable to display scaffold on main route but was able to in sub route
Good day,
So the main issue with my flutter code is that the initial screen using GoRoute it does not display the scaffolding of the screen but the custom widget (Card). The problem does not persist ...
0
votes
1
answer
316
views
How stop Video player when navigate(push) other screen
How to stop the video player when switching to another screen. I have a player and when I move across another screen the video doesn't stop and keeps running because it's still on the stack. I can't ...
0
votes
1
answer
346
views
Bottom navigation bar navigation using AutoTabsRouter
I have used AutoTabsRouter() and want to switch to another tab (downloads) on connection loss and disable all remaining tabs. How can I do it?
Here, when the connection is lost, the tab changed to ...
0
votes
0
answers
152
views
In Flutter, how to manage the number of screen instances?
I noticed when I ran the navigator observer that I'm building a huge stack of opened screens when I keep navigating between two screens. I researched the topic and the resources available aren't ...
1
vote
1
answer
481
views
Routing in flutter doesn't work correctly
Routes not functioning correctly in Flutter
This is my routes.dart code:
import 'package:flutter/material.dart';
import 'package:gowild/Screens/homeScreen.dart';
import '../screens/login_screen.dart';
...
0
votes
1
answer
555
views
Navigating after an async function
I am using the AutoRouter package to handle all of my navigation logic. Everything seems to be working so far but I am encountering the following error:
[VERBOSE-2:dart_vm_initializer.cc(41)] ...
0
votes
1
answer
343
views
Generated Routes with bloc Flutter
I'm developing a simple Flutter application with generatedRoutes and bloc state management library/pattern. I've one simple cubit which generates a random number and a single Home Screen with a button ...
0
votes
0
answers
81
views
How do i navigate to other Screen in Overlay widget? onTap function not working
Selected menu item fails to navigate to the screen/page assigned
Have tried using the Drawer and appBar without the overlay widget but gave error "No Overlay Widget"
@override
Widget ...
1
vote
0
answers
171
views
How to handle endless sub routes & nested routes in Flutter Web using the go_router package
I'm building a simple file storage application like DropBox. The base file path for assets would be mywebsite.com/assets. I want to be able to also handle dynamic paths like the following
mywebsite....
1
vote
0
answers
394
views
Flutter PageRoute / PageRouteBuilder buildTransitions building on every frame
Flutter's extendable PageRoute class (also implemented by PageRouteBuilder) has two primary methods for the page content, buildPage for the primary content and buildTansitions to wrap the content in ...
1
vote
0
answers
621
views
How to navigate to a ShellRoute with go_router?
I have a shell route called BasePage with routes such as HomePage. I want the first screen of my app to be another page called FirstPage. Then, I want to navigate from FirstPage to BasePage. However, ...
0
votes
1
answer
310
views
Using Getx Pages with Fixed Google NavBar in Flutter
I'm a newbie in flutter. I found that using getx routes (GetPages) instead of classic routes is very easy and manageble. In a same way I found google_nav_bar package is very easy and stylish. But my ...
-1
votes
1
answer
1k
views
Issue passing an id using router-go package
I'm trying to route to specific id /product/:id but when i click on my card to navigate it shows an error , but when i do hot reload it works.
**Here is the error
**> type 'Null' is not a subtype ...
1
vote
3
answers
2k
views
How to use pushReplacment method using go-router package?
How can we use pushReplacment using go-router package
I tried this but didn't work
context.pushReplacement("register");
To use the Navigator API with named routes (pushNamed, ...
2
votes
0
answers
825
views
Flutter Navigation 2.0 with bloc and cubit pop and back button not working
I am implementing flutter navigation 2.0 for mobile with BLoC and cubit. Navigating from one screen to the other declaratively is working fine. The issue is when I pop using the back arrow or tap ...
0
votes
0
answers
487
views
Is there a way in Flutter to add a NavBar to a route outside of the Shell Routes?
In Flutter using the go_router library I am adding pages A, B and C, which exist in a BottomNavBar navigation.
They are all encapsulated in a ShellRoute with a BottomNavBar and work like a charm.
My ...
1
vote
2
answers
2k
views
push same page with different parameters in getx route delegate flutter
I want to open the same page again with different params
the issue is that if I open the category page from any other page it works great with params. but if I open the category page from category ...
2
votes
1
answer
884
views
How to navigate between two Pages using the Drawer?
I'm fairly new to Flutter, and I'm trying to get some simple functionality working, but I'm having trouble.
I want to be able to navigate between two pages using the Drawer. I am able to navigate from ...
3
votes
1
answer
2k
views
Flutter web: Opening direct URL navigation working on local but not after deployment
Even though there exists one Question that is already opened I didnt understand the approaches, but first to the problem itself.
On my local machine my routing works fine.
But when I host it I have ...
-1
votes
1
answer
77
views
Flutter-during navigation want text variable is returning null(want to prioritize the function in navigation during elevated Button)
I am sending an image to API and I want to show Snackbar to display if image is uploaded or not.
I have defined text variable in class. And then from API response I am changing that variable but ...
0
votes
1
answer
935
views
(Flutter/Dart) How to ignore popups in didPopNext?
didPopNext understands that popup is a screen when it was popped, but i don't want to call my checkInterstitial method in this case.
what should I do to solve this?
class HomePage extends ...
4
votes
3
answers
5k
views
How to use context.go() method for ShellRoute in Flutter/GoRouter
I have a login page, and after login homepage basically. The homepage has BottomNavigationBar, like Instagram, and It's obvious that it's not GoRoute, instead of this it's ShellRoute. So, ShellRoute ...
1
vote
1
answer
1k
views
How to change flutter WEB urls programmatically?
so I have the following routes defined in my main.dart file:
routes: {
'/sign-in': (context) => BlocProvider(
lazy: false,
create: (_) => AuthCubit(),
...
0
votes
2
answers
845
views
How to handle null arguments in Getx Routing
So I'm Using Getx's routing in Flutter.
I have a Product class that accepts an argument of the type Product
const Produkt({
required this.product,
});
I handle the navigation through GetPages,...