Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问下使用该框架后,在flutter页面间跳转还能 使用getx的别名路由方法吗? #13

Open
CodeIdeal opened this issue Oct 9, 2021 · 3 comments

Comments

@CodeIdeal
Copy link

CodeIdeal commented Oct 9, 2021

使用Get.toName() 方法会报如下错误:

══╡ EXCEPTION CAUGHT BY GESTURE ╞═══════════════════════════════════════════════════════════════════
The following assertion was thrown while handling a gesture:
'package:flutter/src/widgets/navigator.dart': Failed assertion: line 4570 pos 12:
'entry.route._navigator == null': is not true.

Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

When the exception was thrown, this was the stack:
#2      NavigatorState._pushEntry (package:flutter/src/widgets/navigator.dart:4570:12)
#3      NavigatorState.push (package:flutter/src/widgets/navigator.dart:4480:5)
#4      NavigatorState.pushNamed (package:flutter/src/widgets/navigator.dart:4212:12)
#5      GetNavigation.toNamed (package:get/get_navigation/src/extension_navigation.dart:626:37)
#6      AboutPage.generateItem.<anonymous closure> (package:flutter_c_plugins/pages/about/view.dart:70:15)
#7      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
#8      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:607:11)
#9      BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:296:5)
#10     BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:267:7)
#11     GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:157:27)
#12     GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:443:20)
#13     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:419:22)
#14     RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:287:11)
#15     GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:374:7)
#16     GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:338:5)
#17     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:296:7)
#18     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:279:7)
#22     _invoke1 (dart:ui/hooks.dart:182:10)
#23     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:282:7)
#24     _dispatchPointerDataPacket (dart:ui/hooks.dart:96:31)
(elided 5 frames from class _AssertionError and dart:async)

Handler: "onTap"
Recognizer:
  TapGestureRecognizer#153a7
════════════════════════════════════════════════════════════════════════════════════════════════════

======== Exception caught by gesture ===============================================================
The following assertion was thrown while handling a gesture:
'package:flutter/src/widgets/navigator.dart': Failed assertion: line 4570 pos 12: 'entry.route._navigator == null': is not true.


Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

When the exception was thrown, this was the stack: 
#2      NavigatorState._pushEntry (package:flutter/src/widgets/navigator.dart:4570:12)
#3      NavigatorState.push (package:flutter/src/widgets/navigator.dart:4480:5)
#4      NavigatorState.pushNamed (package:flutter/src/widgets/navigator.dart:4212:12)
#5      GetNavigation.toNamed (package:get/get_navigation/src/extension_navigation.dart:626:37)
#6      AboutPage.generateItem.<anonymous closure> (package:flutter_c_plugins/pages/about/view.dart:70:15)
...
Handler: "onTap"
Recognizer: TapGestureRecognizer#153a7
  debugOwner: GestureDetector
  state: ready
  won arena
  finalPosition: Offset(66.9, 267.3)
  finalLocalPosition: Offset(54.3, 26.6)
  button: 1
  sent tap down
====================================================================================================
@github-actions
Copy link

github-actions bot commented Oct 9, 2021

first issue 🚀

@CodeIdeal CodeIdeal changed the title 请问下使用该框架后,在flutter页面间跳转还能 使用getx的路由方法吗? 请问下使用该框架后,在flutter页面间跳转还能 使用getx的别名路由方法吗? Oct 11, 2021
@CodeIdeal
Copy link
Author

已fork了本项目,构建了复现场景.
详见: https://github.com/CodeIdeal/g_faraday 中 example/lib/src/pages/features/basic/pages/flutter_to_flutter.dart页面

@KADO-C
Copy link

KADO-C commented Oct 11, 2021

提了 PR ,不知道会不会合并
这边做了下扩展能支持 GetX 的 Get.toNamed, 可以试一下
https://github.com/KADO-C/g_faraday

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants