Comments (6)
Same error on 3.16.0, 3.16.9, 3.19.3 and master for go_router
from flutter.
Its not only valid with go_router, but other types too. Like I am using flow_builder and it rebuilds the page too. I am going back to version 3.16.9 to test if it is still broken.
Edit: Yes, same code works in 3.16.9 but not in 3.19.2.
from flutter.
Its not only valid with go_router, but other types too. Like I am using flow_builder and it rebuilds the page too. I am going back to version 3.16.9 to test if it is still broken.
Edit: Yes, same code works in 3.16.9 but not in 3.19.2.
It's a navigator v2 bug ?
from flutter.
Its not only valid with go_router, but other types too. Like I am using flow_builder and it rebuilds the page too. I am going back to version 3.16.9 to test if it is still broken.
Edit: Yes, same code works in 3.16.9 but not in 3.19.2.It's a navigator v2 bug ?
I dont think so it is because it is broken even with flow_builder. Try downgrading flutter. It seems to be working in 3.16.9. I didnt test the other versions.
from flutter.
Hi everyone,
This is working as intended, please see some similar issues filed before: #132049, #138708. The given solution is building a const widget. E.g:
Sample code
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
MyApp({super.key});
final GoRouter _router = GoRouter(
routes: <RouteBase>[
GoRoute(
path: '/',
builder: (context, state) {
return const RootPage();
},
routes: [
GoRoute(
path: 'a',
builder: (context, state) {
return const DetailPage();
},
),
],
),
],
);
@override
Widget build(BuildContext context) => MaterialApp.router(routerConfig: _router);
}
class RootPage extends StatefulWidget {
const RootPage({super.key});
@override
State<RootPage> createState() => _RootPageState();
}
class _RootPageState extends State<RootPage> {
@override
Widget build(BuildContext context) {
print('RootPage build');
return Scaffold(
appBar: AppBar(title: const Text('/')),
body: Center(
child: Column(
children: [
ElevatedButton(
onPressed: () => GoRouter.of(context).go('/a'),
child: const Text('go to a'),
),
],
),
),
);
}
}
class DetailPage extends StatefulWidget {
const DetailPage({super.key});
@override
State<DetailPage> createState() => _DetailPageState();
}
class _DetailPageState extends State<DetailPage> {
@override
Widget build(BuildContext context) {
print('DetailPage build');
return Scaffold(
appBar: AppBar(title: const Text('a')),
body: Center(
child: Column(
children: [
ElevatedButton(
onPressed: () => GoRouter.of(context).pop(),
child: const Text('pop'),
),
],
),
),
);
}
}
from flutter.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
from flutter.
Related Issues (20)
- [tool_crash] FileSystemException: Cannot open file, OS Error: The system cannot find the file specified., errno = 2 HOT 2
- [resultsdb] Simplify TestFileReporterResults using results db proto file.
- [resultsdb] Simplify dependencies of buildbucket-dart package and productionize the package
- [resultsdb] Upload test_results file to results db
- [resultsdb] document results db luci configurations
- [resultdb] Document the use of analysis tool
- Clang tidy output in the engine has regressed, making debugging difficult HOT 4
- App store rejection due to crashes on 17.4.1 after upgrading to Flutter 3.19.5 HOT 5
- Stage changes to `flutter/packages` as a PR that migrates to `SurfaceProducer` HOT 5
- Document the plugin story changes for Impeller on Android HOT 3
- [Impeller] Convert to BGRAXR_10 for iOS wide gamut surface/offscreen buffers HOT 12
- `DecoratedSliver` Docs Sample HOT 1
- ListWheelScrollView: whole app starts flickering HOT 2
- Engine CI prod jobs stuck in queueing. HOT 8
- [go_router] [WEB] pathParameters not working with deeplink HOT 3
- [test_runner] Consolidate runDartTest, runFlutterTest and runFlutterWebTest into a single function HOT 4
- AppBar shape disappears on AppBar elevation change when scrolling HOT 8
- [test_runner] generate logs into FLUTTER_LOGS_DIR
- Crashing bug on Android Emulator HOT 12
- Color of Japanese text conversion box is invisible HOT 5
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 flutter.