flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
166.14k stars 27.46k forks source link

[go_router] didChangeDependencies is called multiple time when using GoRouterState.of(context) #147404

Closed Trung15010802 closed 6 months ago

Trung15010802 commented 6 months ago

What package does this bug report belong to?

go_router

What target platforms are you seeing this bug on?

Web

Have you already upgraded your packages?

Yes

Dependency versions

pubspec.lock ```lock # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: _fe_analyzer_shared: dependency: transitive description: name: _fe_analyzer_shared sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" url: "https://pub.dev" source: hosted version: "67.0.0" analyzer: dependency: transitive description: name: analyzer sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" url: "https://pub.dev" source: hosted version: "6.4.1" analyzer_plugin: dependency: transitive description: name: analyzer_plugin sha256: "9661b30b13a685efaee9f02e5d01ed9f2b423bd889d28a304d02d704aee69161" url: "https://pub.dev" source: hosted version: "0.11.3" animated_stack_widget: dependency: transitive description: name: animated_stack_widget sha256: ce4788dd158768c9d4388354b6fb72600b78e041a37afc4c279c63ecafcb9408 url: "https://pub.dev" source: hosted version: "0.0.4" archive: dependency: transitive description: name: archive sha256: "7b875fd4a20b165a3084bd2d210439b22ebc653f21cea4842729c0c30c82596b" url: "https://pub.dev" source: hosted version: "3.4.9" args: dependency: transitive description: name: args sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" url: "https://pub.dev" source: hosted version: "2.5.0" asn1lib: dependency: transitive description: name: asn1lib sha256: c9c85fedbe2188b95133cbe960e16f5f448860f7133330e272edbbca5893ddc6 url: "https://pub.dev" source: hosted version: "1.5.2" async: dependency: "direct main" description: name: async sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dev" source: hosted version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" url: "https://pub.dev" source: hosted version: "2.1.1" characters: dependency: transitive description: name: characters sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted version: "1.3.0" charcode: dependency: transitive description: name: charcode sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 url: "https://pub.dev" source: hosted version: "1.3.1" checked_yaml: dependency: transitive description: name: checked_yaml sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff url: "https://pub.dev" source: hosted version: "2.0.3" ci: dependency: transitive description: name: ci sha256: "145d095ce05cddac4d797a158bc4cf3b6016d1fe63d8c3d2fbd7212590adca13" url: "https://pub.dev" source: hosted version: "0.1.0" cli_util: dependency: transitive description: name: cli_util sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 url: "https://pub.dev" source: hosted version: "0.4.1" clock: dependency: transitive description: name: clock sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf url: "https://pub.dev" source: hosted version: "1.1.1" collection: dependency: transitive description: name: collection sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted version: "1.18.0" convert: dependency: transitive description: name: convert sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" url: "https://pub.dev" source: hosted version: "3.1.1" cross_file: dependency: transitive description: name: cross_file sha256: "55d7b444feb71301ef6b8838dbc1ae02e63dd48c8773f3810ff53bb1e2945b32" url: "https://pub.dev" source: hosted version: "0.3.4+1" crypto: dependency: transitive description: name: crypto sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab url: "https://pub.dev" source: hosted version: "3.0.3" csslib: dependency: transitive description: name: csslib sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" url: "https://pub.dev" source: hosted version: "1.0.0" cupertino_icons: dependency: "direct main" description: name: cupertino_icons sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 url: "https://pub.dev" source: hosted version: "1.0.8" custom_lint: dependency: "direct dev" description: name: custom_lint sha256: "7c0aec12df22f9082146c354692056677f1e70bc43471644d1fdb36c6fdda799" url: "https://pub.dev" source: hosted version: "0.6.4" custom_lint_builder: dependency: transitive description: name: custom_lint_builder sha256: d7dc41e709dde223806660268678be7993559e523eb3164e2a1425fd6f7615a9 url: "https://pub.dev" source: hosted version: "0.6.4" custom_lint_core: dependency: transitive description: name: custom_lint_core sha256: a85e8f78f4c52f6c63cdaf8c872eb573db0231dcdf3c3a5906d493c1f8bc20e6 url: "https://pub.dev" source: hosted version: "0.6.3" dart_style: dependency: transitive description: name: dart_style sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" url: "https://pub.dev" source: hosted version: "2.3.6" dio: dependency: "direct main" description: name: dio sha256: "11e40df547d418cc0c4900a9318b26304e665da6fa4755399a9ff9efd09034b5" url: "https://pub.dev" source: hosted version: "5.4.3+1" dynamic_height_grid_view: dependency: "direct main" description: name: dynamic_height_grid_view sha256: "89b37bf6179af6bc496135c0c786c1f13e117c4ec7ce2278be52df75be90e1d8" url: "https://pub.dev" source: hosted version: "0.0.4" easy_localization: dependency: "direct main" description: name: easy_localization sha256: "432698c31a488dd64c56d4759f20d04844baba5e9e4f2cb1abb9676257918b17" url: "https://pub.dev" source: hosted version: "3.0.6" easy_logger: dependency: "direct main" description: name: easy_logger sha256: c764a6e024846f33405a2342caf91c62e357c24b02c04dbc712ef232bf30ffb7 url: "https://pub.dev" source: hosted version: "0.0.2" elegant_notification: dependency: "direct main" description: name: elegant_notification sha256: "138f9630fd3b1d8160cd29514b26da7a32cedb063b94d25efd25b0724becd881" url: "https://pub.dev" source: hosted version: "2.1.2" encrypt: dependency: "direct main" description: name: encrypt sha256: "62d9aa4670cc2a8798bab89b39fc71b6dfbacf615de6cf5001fb39f7e4a996a2" url: "https://pub.dev" source: hosted version: "5.0.3" equatable: dependency: transitive description: name: equatable sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 url: "https://pub.dev" source: hosted version: "2.0.5" excel: dependency: transitive description: name: excel sha256: "86958dd0771d4ce372cc8332d17d18d803bbcef6ab6d12ddd071699e4c232573" url: "https://pub.dev" source: hosted version: "4.0.3" extended_image: dependency: "direct main" description: name: extended_image sha256: d7f091d068fcac7246c4b22a84b8dac59a62e04d29a5c172710c696e67a22f94 url: "https://pub.dev" source: hosted version: "8.2.0" extended_image_library: dependency: transitive description: name: extended_image_library sha256: c9caee8fe9b6547bd41c960c4f2d1ef8e34321804de6a1777f1d614a24247ad6 url: "https://pub.dev" source: hosted version: "4.0.4" fake_async: dependency: transitive description: name: fake_async sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" url: "https://pub.dev" source: hosted version: "1.3.1" ffi: dependency: transitive description: name: ffi sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" url: "https://pub.dev" source: hosted version: "2.1.2" file: dependency: transitive description: name: file sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted version: "7.0.0" file_picker: dependency: transitive description: name: file_picker sha256: "45c70b43df893027e441a6fa0aacc8f484fb9f9c60c746dc8f1dc4f774cf55cd" url: "https://pub.dev" source: hosted version: "8.0.2" file_selector_linux: dependency: transitive description: name: file_selector_linux sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492" url: "https://pub.dev" source: hosted version: "0.9.2+1" file_selector_macos: dependency: transitive description: name: file_selector_macos sha256: b15c3da8bd4908b9918111fa486903f5808e388b8d1c559949f584725a6594d6 url: "https://pub.dev" source: hosted version: "0.9.3+3" file_selector_platform_interface: dependency: transitive description: name: file_selector_platform_interface sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b url: "https://pub.dev" source: hosted version: "2.6.2" file_selector_windows: dependency: transitive description: name: file_selector_windows sha256: d3547240c20cabf205c7c7f01a50ecdbc413755814d6677f3cb366f04abcead0 url: "https://pub.dev" source: hosted version: "0.9.3+1" fixnum: dependency: transitive description: name: fixnum sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" url: "https://pub.dev" source: hosted version: "1.1.0" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" flutter_animate: dependency: transitive description: name: flutter_animate sha256: "7c8a6594a9252dad30cc2ef16e33270b6248c4dedc3b3d06c86c4f3f4dc05ae5" url: "https://pub.dev" source: hosted version: "4.5.0" flutter_form_builder: dependency: "direct main" description: name: flutter_form_builder sha256: "560eb5e367d81170c6ade1e7ae63ecc5167936ae2cdfaae8a345e91bce19d2f2" url: "https://pub.dev" source: hosted version: "9.2.1" flutter_lints: dependency: "direct dev" description: name: flutter_lints sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" url: "https://pub.dev" source: hosted version: "3.0.2" flutter_localizations: dependency: transitive description: flutter source: sdk version: "0.0.0" flutter_map: dependency: "direct main" description: name: flutter_map sha256: cda8d72135b697f519287258b5294a57ce2f2a5ebf234f0e406aad4dc14c9399 url: "https://pub.dev" source: hosted version: "6.1.0" flutter_map_cancellable_tile_provider: dependency: transitive description: name: flutter_map_cancellable_tile_provider sha256: ae18dd59faf74f3eca1d28f83e59b47741bbff962e123bbebe9335c04d432f44 url: "https://pub.dev" source: hosted version: "2.0.0" flutter_map_marker_cluster: dependency: transitive description: name: flutter_map_marker_cluster sha256: "16fa4e8ca1b38b18229174b118f212436b7379c02fa33b71826a8d2c98f5f76c" url: "https://pub.dev" source: hosted version: "1.3.5" flutter_map_marker_popup: dependency: transitive description: name: flutter_map_marker_popup sha256: ec563bcbae24a18ac16815fb75ac5ab33ccba609e14db70e252a67de19c6639c url: "https://pub.dev" source: hosted version: "6.1.2" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f" url: "https://pub.dev" source: hosted version: "2.0.19" flutter_riverpod: dependency: "direct main" description: name: flutter_riverpod sha256: "0f1974eff5bbe774bf1d870e406fc6f29e3d6f1c46bd9c58e7172ff68a785d7d" url: "https://pub.dev" source: hosted version: "2.5.1" flutter_shaders: dependency: transitive description: name: flutter_shaders sha256: "02750b545c01ff4d8e9bbe8f27a7731aa3778402506c67daa1de7f5fc3f4befe" url: "https://pub.dev" source: hosted version: "0.1.2" flutter_simple_treeview: dependency: transitive description: name: flutter_simple_treeview sha256: ad4978d2668dd078d3a09966832da111bef9102dd636e572c50c80133b7ff4d9 url: "https://pub.dev" source: hosted version: "3.0.2" flutter_svg: dependency: "direct main" description: name: flutter_svg sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2" url: "https://pub.dev" source: hosted version: "2.0.10+1" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" flutter_web_plugins: dependency: transitive description: flutter source: sdk version: "0.0.0" form_builder_validators: dependency: "direct main" description: name: form_builder_validators sha256: "19aa5282b7cede82d0025ab031a98d0554b84aa2ba40f12013471a3b3e22bf02" url: "https://pub.dev" source: hosted version: "9.1.0" freezed_annotation: dependency: transitive description: name: freezed_annotation sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d url: "https://pub.dev" source: hosted version: "2.4.1" glob: dependency: transitive description: name: glob sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" url: "https://pub.dev" source: hosted version: "2.1.2" go_router: dependency: "direct main" description: name: go_router sha256: b465e99ce64ba75e61c8c0ce3d87b66d8ac07f0b35d0a7e0263fcfc10f99e836 url: "https://pub.dev" source: hosted version: "13.2.5" google_maps: dependency: transitive description: name: google_maps sha256: "47eef3836b49bb030d5cb3afc60b8451408bf34cf753e571b645d6529eb4251a" url: "https://pub.dev" source: hosted version: "7.1.0" google_maps_flutter: dependency: transitive description: name: google_maps_flutter sha256: c1972cbad779bc5346c49045f26ae45550a0958b1cbca5b524dd3c8954995d28 url: "https://pub.dev" source: hosted version: "2.6.1" google_maps_flutter_android: dependency: transitive description: name: google_maps_flutter_android sha256: "256b3c974e415bd17555ceff76a5d0badd2cbfd29febfc23070993358f639550" url: "https://pub.dev" source: hosted version: "2.7.0" google_maps_flutter_ios: dependency: transitive description: name: google_maps_flutter_ios sha256: e5132d17f051600d90d79d9f574b177c24231da702453a036db2490f9ced4646 url: "https://pub.dev" source: hosted version: "2.6.0" google_maps_flutter_platform_interface: dependency: transitive description: name: google_maps_flutter_platform_interface sha256: "167af879da4d004cd58771f1469b91dcc3b9b0a2c5334cc6bf71fd41d4b35403" url: "https://pub.dev" source: hosted version: "2.6.0" google_maps_flutter_web: dependency: transitive description: name: google_maps_flutter_web sha256: "861c6dd430123e58bb1154342345c5bfa36064120c8ec3dbc0d0b7522add1861" url: "https://pub.dev" source: hosted version: "0.5.6+2" hotreloader: dependency: transitive description: name: hotreloader sha256: ed56fdc1f3a8ac924e717257621d09e9ec20e308ab6352a73a50a1d7a4d9158e url: "https://pub.dev" source: hosted version: "4.2.0" html: dependency: transitive description: name: html sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" url: "https://pub.dev" source: hosted version: "0.15.4" http: dependency: transitive description: name: http sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" url: "https://pub.dev" source: hosted version: "1.2.1" http_client_helper: dependency: transitive description: name: http_client_helper sha256: "8a9127650734da86b5c73760de2b404494c968a3fd55602045ffec789dac3cb1" url: "https://pub.dev" source: hosted version: "3.0.0" http_parser: dependency: transitive description: name: http_parser sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" url: "https://pub.dev" source: hosted version: "4.0.2" image: dependency: transitive description: name: image sha256: "4c68bfd5ae83e700b5204c1e74451e7bf3cf750e6843c6e158289cf56bda018e" url: "https://pub.dev" source: hosted version: "4.1.7" image_picker: dependency: "direct main" description: name: image_picker sha256: fe9ee64ccb8d599a5dfb0e21cc6652232c610bcf667af4e79b9eb175cc30a7a5 url: "https://pub.dev" source: hosted version: "1.1.0" image_picker_android: dependency: transitive description: name: image_picker_android sha256: "8e75431a62b7feb4fd55cb4a5c6f0ac4564460ec5dc09f9c4a0d50a5ce7c4cb9" url: "https://pub.dev" source: hosted version: "0.8.10" image_picker_for_web: dependency: transitive description: name: image_picker_for_web sha256: "5d6eb13048cd47b60dbf1a5495424dea226c5faf3950e20bf8120a58efb5b5f3" url: "https://pub.dev" source: hosted version: "3.0.4" image_picker_ios: dependency: transitive description: name: image_picker_ios sha256: f74064bc548b5164a033ec05638e23c91be1a249c255e0f56319dddffd759794 url: "https://pub.dev" source: hosted version: "0.8.10+1" image_picker_linux: dependency: transitive description: name: image_picker_linux sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" url: "https://pub.dev" source: hosted version: "0.2.1+1" image_picker_macos: dependency: transitive description: name: image_picker_macos sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" url: "https://pub.dev" source: hosted version: "0.2.1+1" image_picker_platform_interface: dependency: transitive description: name: image_picker_platform_interface sha256: "9ec26d410ff46f483c5519c29c02ef0e02e13a543f882b152d4bfd2f06802f80" url: "https://pub.dev" source: hosted version: "2.10.0" image_picker_windows: dependency: transitive description: name: image_picker_windows sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" url: "https://pub.dev" source: hosted version: "0.2.1+1" intl: dependency: "direct main" description: name: intl sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" url: "https://pub.dev" source: hosted version: "0.18.1" jiffy: dependency: transitive description: name: jiffy sha256: cc1d4b75016a9156c29b5d61f0c9176c3e0fb0580cc5a0e0422b5d2cab3fbfff url: "https://pub.dev" source: hosted version: "6.2.1" js: dependency: transitive description: name: js sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted version: "0.6.7" js_wrapping: dependency: transitive description: name: js_wrapping sha256: e385980f7c76a8c1c9a560dfb623b890975841542471eade630b2871d243851c url: "https://pub.dev" source: hosted version: "0.7.4" json_annotation: dependency: transitive description: name: json_annotation sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" url: "https://pub.dev" source: hosted version: "4.9.0" latlong2: dependency: "direct main" description: name: latlong2 sha256: "98227922caf49e6056f91b6c56945ea1c7b166f28ffcd5fb8e72fc0b453cc8fe" url: "https://pub.dev" source: hosted version: "0.9.1" leak_tracker: dependency: transitive description: name: leak_tracker sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" url: "https://pub.dev" source: hosted version: "10.0.0" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 url: "https://pub.dev" source: hosted version: "2.0.1" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 url: "https://pub.dev" source: hosted version: "2.0.1" lints: dependency: transitive description: name: lints sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 url: "https://pub.dev" source: hosted version: "3.0.0" lists: dependency: transitive description: name: lists sha256: "4ca5c19ae4350de036a7e996cdd1ee39c93ac0a2b840f4915459b7d0a7d4ab27" url: "https://pub.dev" source: hosted version: "1.0.1" logger: dependency: transitive description: name: logger sha256: "8c94b8c219e7e50194efc8771cd0e9f10807d8d3e219af473d89b06cc2ee4e04" url: "https://pub.dev" source: hosted version: "2.2.0" logging: dependency: transitive description: name: logging sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" url: "https://pub.dev" source: hosted version: "1.2.0" lottie: dependency: "direct main" description: name: lottie sha256: ce2bb2605753915080e4ee47f036a64228c88dc7f56f7bc1dbe912d75b55b1e2 url: "https://pub.dev" source: hosted version: "3.1.0" matcher: dependency: transitive description: name: matcher sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted version: "0.8.0" meta: dependency: transitive description: name: meta sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted version: "1.11.0" mgrs_dart: dependency: transitive description: name: mgrs_dart sha256: fb89ae62f05fa0bb90f70c31fc870bcbcfd516c843fb554452ab3396f78586f7 url: "https://pub.dev" source: hosted version: "2.0.0" mime: dependency: transitive description: name: mime sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" url: "https://pub.dev" source: hosted version: "1.0.5" month_picker_dialog: dependency: "direct main" description: name: month_picker_dialog sha256: c908f78d506a2ef05ca390375f063c56944790de93943923e41fc6b92ae8f602 url: "https://pub.dev" source: hosted version: "2.11.2" nested: dependency: transitive description: name: nested sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" url: "https://pub.dev" source: hosted version: "1.0.0" omni_datetime_picker: dependency: "direct main" description: path: "." ref: HEAD resolved-ref: "4136fe19dfc3b0a03b18f116778340a7346bf79d" url: "https://github.com/Trung15010802/OmniDateTimePicker" source: git version: "1.0.9" package_config: dependency: transitive description: name: package_config sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" url: "https://pub.dev" source: hosted version: "2.1.0" path: dependency: transitive description: name: path sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted version: "1.9.0" path_parsing: dependency: transitive description: name: path_parsing sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf url: "https://pub.dev" source: hosted version: "1.0.1" path_provider: dependency: transitive description: name: path_provider sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 url: "https://pub.dev" source: hosted version: "2.1.3" path_provider_android: dependency: transitive description: name: path_provider_android sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d url: "https://pub.dev" source: hosted version: "2.2.4" path_provider_foundation: dependency: transitive description: name: path_provider_foundation sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" url: "https://pub.dev" source: hosted version: "2.3.2" path_provider_linux: dependency: transitive description: name: path_provider_linux sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 url: "https://pub.dev" source: hosted version: "2.2.1" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" url: "https://pub.dev" source: hosted version: "2.1.2" path_provider_windows: dependency: transitive description: name: path_provider_windows sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" url: "https://pub.dev" source: hosted version: "2.2.1" petitparser: dependency: transitive description: name: petitparser sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 url: "https://pub.dev" source: hosted version: "6.0.2" platform: dependency: transitive description: name: platform sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" url: "https://pub.dev" source: hosted version: "3.1.4" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" url: "https://pub.dev" source: hosted version: "2.1.8" pointycastle: dependency: transitive description: name: pointycastle sha256: "79fbafed02cfdbe85ef3fd06c7f4bc2cbcba0177e61b765264853d4253b21744" url: "https://pub.dev" source: hosted version: "3.9.0" polylabel: dependency: transitive description: name: polylabel sha256: "41b9099afb2aa6c1730bdd8a0fab1400d287694ec7615dd8516935fa3144214b" url: "https://pub.dev" source: hosted version: "1.0.1" pool: dependency: transitive description: name: pool sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" url: "https://pub.dev" source: hosted version: "1.5.1" proj4dart: dependency: transitive description: name: proj4dart sha256: c8a659ac9b6864aa47c171e78d41bbe6f5e1d7bd790a5814249e6b68bc44324e url: "https://pub.dev" source: hosted version: "2.1.0" provider: dependency: transitive description: name: provider sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c url: "https://pub.dev" source: hosted version: "6.1.2" pub_semver: dependency: transitive description: name: pub_semver sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" url: "https://pub.dev" source: hosted version: "2.1.4" pubspec_parse: dependency: transitive description: name: pubspec_parse sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 url: "https://pub.dev" source: hosted version: "1.2.3" responsive_builder: dependency: "direct main" description: name: responsive_builder sha256: a38ba9ba86c9daf08904674553034b651377b1d685d10ee450d8350ae51f76ec url: "https://pub.dev" source: hosted version: "0.7.0" riverpod: dependency: transitive description: name: riverpod sha256: f21b32ffd26a36555e501b04f4a5dca43ed59e16343f1a30c13632b2351dfa4d url: "https://pub.dev" source: hosted version: "2.5.1" riverpod_analyzer_utils: dependency: transitive description: name: riverpod_analyzer_utils sha256: "8b71f03fc47ae27d13769496a1746332df4cec43918aeba9aff1e232783a780f" url: "https://pub.dev" source: hosted version: "0.5.1" riverpod_lint: dependency: "direct dev" description: name: riverpod_lint sha256: "3c67c14ccd16f0c9d53e35ef70d06cd9d072e2fb14557326886bbde903b230a5" url: "https://pub.dev" source: hosted version: "2.3.10" rxdart: dependency: transitive description: name: rxdart sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" url: "https://pub.dev" source: hosted version: "0.27.7" sanitize_html: dependency: transitive description: name: sanitize_html sha256: "12669c4a913688a26555323fb9cec373d8f9fbe091f2d01c40c723b33caa8989" url: "https://pub.dev" source: hosted version: "2.1.0" scroll_to_index: dependency: "direct main" description: name: scroll_to_index sha256: b707546e7500d9f070d63e5acf74fd437ec7eeeb68d3412ef7b0afada0b4f176 url: "https://pub.dev" source: hosted version: "3.0.1" shared_preferences: dependency: "direct main" description: name: shared_preferences sha256: d3bbe5553a986e83980916ded2f0b435ef2e1893dfaa29d5a7a790d0eca12180 url: "https://pub.dev" source: hosted version: "2.2.3" shared_preferences_android: dependency: transitive description: name: shared_preferences_android sha256: "1ee8bf911094a1b592de7ab29add6f826a7331fb854273d55918693d5364a1f2" url: "https://pub.dev" source: hosted version: "2.2.2" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation sha256: "7708d83064f38060c7b39db12aefe449cb8cdc031d6062280087bc4cdb988f5c" url: "https://pub.dev" source: hosted version: "2.3.5" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" url: "https://pub.dev" source: hosted version: "2.3.2" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b" url: "https://pub.dev" source: hosted version: "2.3.2" shared_preferences_web: dependency: transitive description: name: shared_preferences_web sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a" url: "https://pub.dev" source: hosted version: "2.3.0" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" url: "https://pub.dev" source: hosted version: "2.3.2" shelf: dependency: transitive description: name: shelf sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 url: "https://pub.dev" source: hosted version: "1.4.1" signalr_core: dependency: "direct main" description: name: signalr_core sha256: "27c4ce798c8fedc2f7e3e4668c2b1dbcf6ee2a93f40ad24284b5f5bbed84529d" url: "https://pub.dev" source: hosted version: "1.1.2" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" source_span: dependency: transitive description: name: source_span sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted version: "1.10.0" sprintf: dependency: transitive description: name: sprintf sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" url: "https://pub.dev" source: hosted version: "7.0.0" sse: dependency: transitive description: name: sse sha256: fdce3a4ac3ae1c01083d05ded0bcdb7e02857ca2323823548e9e76d2f61638f0 url: "https://pub.dev" source: hosted version: "4.1.5" sse_channel: dependency: transitive description: name: sse_channel sha256: "9aad5d4eef63faf6ecdefb636c0f857bd6f74146d2196087dcf4b17ab5b49b1b" url: "https://pub.dev" source: hosted version: "0.1.1" stack_trace: dependency: transitive description: name: stack_trace sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted version: "1.11.1" state_notifier: dependency: transitive description: name: state_notifier sha256: b8677376aa54f2d7c58280d5a007f9e8774f1968d1fb1c096adcb4792fba29bb url: "https://pub.dev" source: hosted version: "1.0.0" stream_channel: dependency: transitive description: name: stream_channel sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted version: "2.1.2" stream_transform: dependency: transitive description: name: stream_transform sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" url: "https://pub.dev" source: hosted version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" url: "https://pub.dev" source: hosted version: "1.2.0" stvg_package: dependency: "direct main" description: path: "." ref: HEAD resolved-ref: "4a282100f7c8f69294820fb5082d017759503615" url: "https://git.smartlook.com.vn/frontend/UI_V1_FE" source: git version: "1.1.0" syncfusion_flutter_charts: dependency: "direct main" description: name: syncfusion_flutter_charts sha256: b0af93cd77b64a759158bfed7c119c3072c8e8fbde6bf3fdc5e815fa4fdfc87c url: "https://pub.dev" source: hosted version: "25.1.41+2" syncfusion_flutter_core: dependency: transitive description: name: syncfusion_flutter_core sha256: "708425f534ef04253334763c8b75acc79eaec2d9b325bcd862575ea0a2207d87" url: "https://pub.dev" source: hosted version: "25.1.41" syncfusion_flutter_datagrid: dependency: transitive description: name: syncfusion_flutter_datagrid sha256: "43ddc9dbebe14c836f6e4236bd20534f48b3e26672d757a9cedc99a16fa82fc1" url: "https://pub.dev" source: hosted version: "25.1.41" syncfusion_flutter_datagrid_export: dependency: transitive description: name: syncfusion_flutter_datagrid_export sha256: bc099c33dd4f1a128d4b3c9da587474ff73addb43f38da226a28a607decda4ff url: "https://pub.dev" source: hosted version: "25.1.41" syncfusion_flutter_pdf: dependency: transitive description: name: syncfusion_flutter_pdf sha256: "0810e1c59e06f3ec0d9a783bf44f7dc57cede36262fbc3f737af71c79cc9450f" url: "https://pub.dev" source: hosted version: "25.1.41" syncfusion_flutter_xlsio: dependency: transitive description: name: syncfusion_flutter_xlsio sha256: "79195234d64a8e6c1909a6ab14f9a9a7984966ee1ec6d988f493be850e498451" url: "https://pub.dev" source: hosted version: "25.1.41" syncfusion_officecore: dependency: transitive description: name: syncfusion_officecore sha256: deea7826d5a0e7c07e0d272c74d9f4a6f35dd8b2a4ab9dcd694f7f6cf632fb55 url: "https://pub.dev" source: hosted version: "25.1.41" term_glyph: dependency: transitive description: name: term_glyph sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 url: "https://pub.dev" source: hosted version: "1.2.1" test_api: dependency: transitive description: name: test_api sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted version: "0.6.1" tuple: dependency: transitive description: name: tuple sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151 url: "https://pub.dev" source: hosted version: "2.0.2" typed_data: dependency: transitive description: name: typed_data sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c url: "https://pub.dev" source: hosted version: "1.3.2" unicode: dependency: transitive description: name: unicode sha256: "0f69e46593d65245774d4f17125c6084d2c20b4e473a983f6e21b7d7762218f1" url: "https://pub.dev" source: hosted version: "0.3.1" universal_html: dependency: transitive description: name: universal_html sha256: "56536254004e24d9d8cfdb7dbbf09b74cf8df96729f38a2f5c238163e3d58971" url: "https://pub.dev" source: hosted version: "2.2.4" universal_io: dependency: transitive description: name: universal_io sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" url: "https://pub.dev" source: hosted version: "2.2.2" url_strategy: dependency: "direct main" description: name: url_strategy sha256: "42b68b42a9864c4d710401add17ad06e28f1c1d5500c93b98c431f6b0ea4ab87" url: "https://pub.dev" source: hosted version: "0.2.0" uuid: dependency: transitive description: name: uuid sha256: "814e9e88f21a176ae1359149021870e87f7cddaf633ab678a5d2b0bff7fd1ba8" url: "https://pub.dev" source: hosted version: "4.4.0" vector_graphics: dependency: transitive description: name: vector_graphics sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3" url: "https://pub.dev" source: hosted version: "1.1.11+1" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da url: "https://pub.dev" source: hosted version: "1.1.11+1" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" url: "https://pub.dev" source: hosted version: "1.1.11+1" vector_math: dependency: transitive description: name: vector_math sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" url: "https://pub.dev" source: hosted version: "2.1.4" vm_service: dependency: transitive description: name: vm_service sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 url: "https://pub.dev" source: hosted version: "13.0.0" watcher: dependency: transitive description: name: watcher sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" url: "https://pub.dev" source: hosted version: "1.1.0" web: dependency: transitive description: name: web sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted version: "0.5.1" web_socket_channel: dependency: transitive description: name: web_socket_channel sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" url: "https://pub.dev" source: hosted version: "2.4.5" win32: dependency: transitive description: name: win32 sha256: "0eaf06e3446824099858367950a813472af675116bf63f008a4c2a75ae13e9cb" url: "https://pub.dev" source: hosted version: "5.5.0" wkt_parser: dependency: transitive description: name: wkt_parser sha256: "8a555fc60de3116c00aad67891bcab20f81a958e4219cc106e3c037aa3937f13" url: "https://pub.dev" source: hosted version: "2.0.0" xdg_directories: dependency: transitive description: name: xdg_directories sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d url: "https://pub.dev" source: hosted version: "1.0.4" xml: dependency: transitive description: name: xml sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 url: "https://pub.dev" source: hosted version: "6.5.0" yaml: dependency: transitive description: name: yaml sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" url: "https://pub.dev" source: hosted version: "3.1.2" sdks: dart: ">=3.3.3 <4.0.0" flutter: ">=3.19.0" ```

Steps to reproduce

  1. Use GoRouterState.of(context) ininitState()or didChangeDependencies()
  2. When showDialog or navigate didChangeDependencies is necessary called

Expected results

Not calleddidChangeDependencies()

Actual results

didChangeDependencies() is unnecessary called

Code sample

Code sample ```dart // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; /// This sample app shows an app with two screens. /// /// The first route '/' is mapped to [HomeScreen], and the second route /// '/details' is mapped to [DetailsScreen]. /// /// The buttons use context.go() to navigate to each destination. On mobile /// devices, each destination is deep-linkable and on the web, can be navigated /// to using the address bar. void main() => runApp(const MyApp()); /// The route configuration. final GoRouter _router = GoRouter( routes: [ GoRoute( path: '/', builder: (BuildContext context, GoRouterState state) { return const HomeScreen(); }, routes: [ GoRoute( path: 'details', builder: (BuildContext context, GoRouterState state) { return const DetailsScreen(); }, ), ], ), ], ); /// The main app. class MyApp extends StatelessWidget { /// Constructs a [MyApp] const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp.router( routerConfig: _router, ); } } /// The home screen class HomeScreen extends StatefulWidget { /// Constructs a [HomeScreen] const HomeScreen({super.key}); @override State createState() => _HomeScreenState(); } class _HomeScreenState extends State { @override void initState() { WidgetsBinding.instance.addPostFrameCallback((_) { GoRouterState.of(context); }); super.initState(); } @override void didChangeDependencies() { print('didChangeDependencies'); super.didChangeDependencies(); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: const Text('Home Screen')), body: Center( child: ElevatedButton( onPressed: () { context.go('/details'); // showAboutDialog(context: context); }, child: const Text('Show dialog'), ), ), ); } } /// The details screen class DetailsScreen extends StatelessWidget { /// Constructs a [DetailsScreen] const DetailsScreen({super.key}); @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: const Text('Details Screen')), body: Center( child: ElevatedButton( onPressed: () => context.go('/'), child: const Text('Go back to the Home screen'), ), ), ); } } ```

Screenshots or Videos

Screenshots / Video demonstration ![image](https://github.com/flutter/flutter/assets/90593296/2204a5f0-c1ba-4886-8de8-c74938cb661b)

Logs

Logs ```console [Paste your logs here] ```

Flutter Doctor output

Doctor output ```console Run on DartPad.dev ```
danagbemava-nc commented 6 months ago

This is working by design. See https://github.com/flutter/flutter/issues/136332#issuecomment-1771773076.

Closing this based on the comment shared.

Thank you

github-actions[bot] commented 5 months ago

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.