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

Getting error when call Wiredash.of(context).show(); #337

Closed
ribuemsyne opened this issue Mar 8, 2024 · 4 comments
Closed

Getting error when call Wiredash.of(context).show(); #337

ribuemsyne opened this issue Mar 8, 2024 · 4 comments
Labels

Comments

@ribuemsyne
Copy link

ribuemsyne commented Mar 8, 2024

Install plugin and data fetched to dashboard successfully but getting exception when tried to call Wiredash.of(context).show();

Version 2.1.0

════════ Exception caught by widgets library ═══════════════════════════════════
The following RangeError was thrown building DefaultSelectionStyle:
RangeError (startIndex): Invalid value: Only valid value is 0: 1

The relevant error-causing widget was:
    MaterialApp MaterialApp:file:app/
![Uploading Simulator Screenshot - iPhone 15 - 2024-03-08 at 14.28.40.png…]()
lib/main.dart:27:28

When the exception was thrown, this was the stack:

#0      RangeError.checkValueInInterval (dart:core/errors.dart:313:7)
#1      _StringBase.replaceFirst (dart:core-patch/string_patch.dart:591:16)
#2      canonicalUri (package:go_router/src/path_utils.dart:136:17)
#3      RouteConfiguration.findMatch (package:go_router/src/configuration.dart:296:31)
#4      _RouteMatchListDecoder.convert (package:go_router/src/match.dart:947:23)
#5      Codec.decode (dart:convert/codec.dart:30:34)
#6      GoRouteInformationParser.parseRouteInformationWithDependencies (package:go_router/src/parser.dart:71:32)
#7      _RouterState._processRouteInformation (package:flutter/src/widgets/router.dart:741:8)
#8      _RouterState.didChangeDependencies (package:flutter/src/widgets/router.dart:694:7)
#9      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5631:13)
#10     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#11     StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#12     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#13     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#14     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#15     ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#16     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#17     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#18     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#19     ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#20     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#21     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#22     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#23     ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#24     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#25     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#26     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#27     ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#28     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#29     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#30     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#31     StatelessElement.update (package:flutter/src/widgets/framework.dart:5547:5)
#32     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#33     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#34     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#35     ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#36     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#37     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#38     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#39     StatelessElement.update (package:flutter/src/widgets/framework.dart:5547:5)
#40     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#41     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#42     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#43     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#44     StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#45     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#46     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#47     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#48     ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#49     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#50     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#51     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#52     ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#53     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#54     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#55     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#56     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#57     StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#58     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#59     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#60     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#61     StatelessElement.update (package:flutter/src/widgets/framework.dart:5547:5)
#62     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#63     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#64     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#65     ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#66     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#67     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#68     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#69     StatelessElement.update (package:flutter/src/widgets/framework.dart:5547:5)
#70     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#71     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#72     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#73     ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#74     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#75     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#76     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#77     ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#78     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#79     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6743:14)
#80     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#81     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#82     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#83     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#84     StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#85     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#86     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6743:14)
#87     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#88     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#89     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#90     ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#91     _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:105:11)
#92     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#93     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#94     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#95     Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#96     StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#97     Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#98     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#99     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#100    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#101    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#102    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#103    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#104    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#105    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#106    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#107    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#108    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#109    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#110    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#111    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#112    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6743:14)
#113    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#114    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#115    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#116    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#117    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:105:11)
#118    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#119    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#120    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#121    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#122    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#123    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#124    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#125    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#126    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#127    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#128    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#129    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#130    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#131    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#132    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#133    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#134    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#135    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#136    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#137    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#138    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6743:14)
#139    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#140    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#141    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#142    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#143    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:105:11)
#144    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#145    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#146    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#147    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#148    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#149    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#150    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#151    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#152    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#153    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#154    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#155    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6743:14)
#156    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#157    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#158    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#159    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#160    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:105:11)
#161    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#162    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#163    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#164    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#165    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#166    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#167    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#168    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#169    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#170    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#171    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#172    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#173    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#174    StatelessElement.update (package:flutter/src/widgets/framework.dart:5547:5)
#175    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#176    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6743:14)
#177    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#178    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#179    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#180    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#181    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:105:11)
#182    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#183    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#184    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#185    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#186    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#187    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#188    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#189    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#190    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#191    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#192    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#193    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#194    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#195    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#196    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#197    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#198    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#199    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#200    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#201    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#202    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#203    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#204    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#205    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#206    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#207    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#208    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#209    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#210    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#211    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#212    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#213    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#214    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#215    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#216    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#217    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#218    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#219    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#220    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#221    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#222    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#223    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#224    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#225    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#226    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#227    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#228    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#229    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6743:14)
#230    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#231    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#232    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#233    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#234    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:105:11)
#235    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#236    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#237    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#238    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#239    StatefulElement.update (package:flutter/src/widgets/framework.dart:5657:5)
#240    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#241    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#242    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#243    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#244    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#245    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#246    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#247    ProxyElement.update (package:flutter/src/widgets/framework.dart:5800:5)
#248    Element.updateChild (package:flutter/src/widgets/framework.dart:3815:15)
#249    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5496:16)
#250    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5634:11)
#251    Element.rebuild (package:flutter/src/widgets/framework.dart:5187:7)
#252    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2895:19)
#253    _LayoutBuilderElement._layout (package:flutter/src/widgets/layout_builder.dart:150:12)
#254    RenderObject.invokeLayoutCallback.<anonymous closure> (package:flutter/src/rendering/object.dart:2657:59)
#255    PipelineOwner._enableMutationsToDirtySubtrees (package:flutter/src/rendering/object.dart:1071:15)
#256    RenderObject.invokeLayoutCallback (package:flutter/src/rendering/object.dart:2657:14)
#257    RenderConstrainedLayoutBuilder.rebuildIfNecessary (package:flutter/src/widgets/layout_builder.dart:225:7)
#258    _RenderLayoutBuilder.performLayout (package:flutter/src/widgets/layout_builder.dart:308:5)
#259    RenderObject.layout (package:flutter/src/rendering/object.dart:2546:7)
#260    RenderBox.layout (package:flutter/src/rendering/box.dart:2389:11)
#261    RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:104:21)
#262    RenderObject.layout (package:flutter/src/rendering/object.dart:2546:7)
#263    RenderBox.layout (package:flutter/src/rendering/box.dart:2389:11)
#264    _RenderLayoutBuilder.performLayout (package:flutter/src/widgets/layout_builder.dart:310:14)
#265    RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:2385:7)
#266    PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:1025:18)
#267    PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:1038:15)
#268    RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:591:23)
#269    WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:986:13)
#270    RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:457:5)
#271    SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1325:15)
#272    SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1255:9)
#273    SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1113:5)
#274    _invoke (dart:ui/hooks.dart:312:13)
#275    PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:383:5)
#276    _drawFrame (dart:ui/hooks.dart:283:31)

════════════════════════════════════════════════════════════════════════════════
@ribuemsyne ribuemsyne added the bug Something isn't working label Mar 8, 2024
@passsy
Copy link
Member

passsy commented Mar 8, 2024

This issue is unrelated to Wiredash, but caused by go_router or your goRouter configuration.
The the issue reported here flutter/flutter#112798

But I've seen similar issues in the past with routers when wiredash opens #282 #287 #289
Therefore I can give you some recommendations, how to resolve the issue

Background

When Wiredash opens, it wraps your AppWidget with new additional widgets. This causes

  1. Your widgets to rebuild (build() is called again)
    From my experience, many apps do not expect that their topmost widget will be rebuilt (ever). Most of them are StatelessWidget that initialize stuff. When they get rebuilt, they initialize everything again, leaving their app in an illegal state. (like recreating the router).

  2. Your widgets receive a call to didChangeDependencies().
    Some apps have navigation or authentication redirect code in didChangeDependencies(). This works because they only expect this method to be called when their authentication changes. But now this method is also called by Wiredash.

Steps to resolve the issue:

  1. Please ensure not to initialize your router in a StatelessWidget. Use a StatefulWidget and keep your router in your state to survive rebuilds. Also, double-check if you created the router inside your build method. This will recreate it when the build method is called again.

  2. Prepare your app to not get disposed. Ensure, that the widgets below Wiredash do not hold any state in their build method. StatelessWidget widget do not keep final proprties!
    Add a breakpoint to the dispose method of your widgets. They shouldn't get disposed and recreated when Wiredash opens. Instead, only didChangeDependencies should be called when you open Wiredash.
    If you see any widgets getting disposed when opening Wiredash, there is a bug in your app code that makes your app lose state (including your router).

  3. Can't find the dispose issue? You could add a GlobalKey to the widget that holds your router. It only works if you have a StatefulWidget and do keep the router in your state.

Please let me know if you could resolve the issue!

@passsy passsy added support and removed bug Something isn't working labels Mar 8, 2024
@ribuemsyne
Copy link
Author

ribuemsyne commented Mar 11, 2024 via email

@passsy
Copy link
Member

passsy commented Mar 11, 2024

Where have you defined your router?
Is any dispose method called? If you have not implemented them, do and check.

@ribuemsyne
Copy link
Author

ribuemsyne commented Mar 12, 2024 via email

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

No branches or pull requests

2 participants