Open MICKEY88661 opened 1 year ago
I also have issues related to go_router. I wrapped MaterialApp.router() with BetterFeedback component. Sometimes it works fine when doing routing, sometimes it triggers an exception.
Version Info
flutter: stable 3.16.5
feedback: ^3.0.0
Exception
══╡ EXCEPTION CAUGHT BY GESTURE ╞═══════════════════════════════════════════════════════════════════
The following assertion was thrown while handling a gesture:
No GoRouter found in context
'package:go_router/src/router.dart':
Failed assertion: line 507 pos 12: 'inherited != null'
When the exception was thrown, this was the stack:
#2 GoRouter.of (package:go_router/src/router.dart:507:12)
#3 GoRouterHelper.pushNamed (package:go_router/src/misc/extensions.dart:59:16)
#4 _TrendyCollectionViewState.build.<anonymous closure>.<anonymous closure>.<anonymous closure>.<anonymous closure>
(package:clubspace/features/trendy_avatar/presentation/pages/trendy_collections.dart:129:31)
#5 SelectAccountPopupView.build.<anonymous closure>
(package:clubspace/features/trendy_avatar/presentation/views/select_platform_popup.dart:91:37)
#6 PlatformGridWidget.build.<anonymous closure>.<anonymous closure>
(package:clubspace/features/trendy_avatar/presentation/widgets/platform_grid.dart:51:30)
#7 PlatformItemWidget.build.<anonymous closure> (package:clubspace/features/trendy_avatar/presentation/widgets/platfrom_item.dart:30:20)
#8 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:275:24)
#9 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:652:11)
#10 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:309:5)
#11 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:242:7)
#12 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:630:9)
#13 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:98:12)
#14 PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:143:9)
#15 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:633:13)
#16 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:141:18)
#17 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:127:7)
#18 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:488:19)
#19 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:468:22)
#20 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:439:11)
#21 GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:413:7)
#22 GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:376:5)
#23 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:323:7)
#24 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:292:9)
#25 _invoke1 (dart:ui/hooks.dart:328:13)
#26 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:410:7)
#27 _dispatchPointerDataPacket (dart:ui/hooks.dart:262:31)
(elided 2 frames from class _AssertionError)
Handler: "onTap"
Recognizer:
TapGestureRecognizer#b76f3
════════════════════════════════════════════════════════════════════════════════════════════════════
I have issues with go_router/BetterFeedback too. Swipe back gesture (at least with CupertinoPage on iOS) does not work when MaterialApp.router() is wrapped with BetterFeedback component.
Any update?
I'm also having a problem with the swipe back gesture on iOS but I'm not using go_router though.
The swipe back works, but not all the time. Approximately 4 out of 5 tries doesn't work, then it suddenly work with no difference in the way I'm making the gesture.
This problem appeared after wrapping MaterialApp
with BetterFeedback
widget. The issue disappears if I remove BetterFeedback
.
I'm on feedback version 3.0.0
.
Hi @SharbelOkzan, @WiRight, @brain0verfl0w, @yushengguo557, and mainly @MICKEY88661 wich create the issue. Can you guys please test this again with latest version (3.1.0), this bugs (or at least ver very very similar ones) was fixed in PR #293 and I belive this are one of the fixed ones in the process (sorry but I had not time right now to test it)
Version
2.6.0
Library
feedback
Flutter channel
stable
Flutter version
3.7.3
Platform
Android, iOS
Details
The keyboard will be pop out immediately when my app is using
go_router
as well.source code
``` import 'package:flutter/material.dart'; import 'package:feedback/feedback.dart'; import 'package:go_router/go_router.dart'; void main() { runApp( BetterFeedback( child: MyApp(), ), ); } class MyApp extends StatelessWidget { MyApp({super.key}); // named routes late final _router = GoRouter( routes: [ GoRoute( path: '/', builder: (context, state) => const MyHomePage(title: 'Flutter Demo Home Page'), ), ], ); @override Widget build(BuildContext context) { return MaterialApp.router( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, ), routerConfig: _router, ); } } class MyHomePage extends StatefulWidget { const MyHomePage({super.key, required this.title}); final String title; @override Statehttps://github.com/ueman/feedback/assets/35022289/e48e99fe-4344-42d3-b349-58fff1ee71e0
Steps to reproduce
Output of
flutter doctor -v