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

Strings not accepted as Node ids #100

Closed
RottenSchnitzel opened this issue Mar 15, 2023 · 3 comments
Closed

Strings not accepted as Node ids #100

RottenSchnitzel opened this issue Mar 15, 2023 · 3 comments

Comments

@RottenSchnitzel
Copy link

RottenSchnitzel commented Mar 15, 2023

Even though #44 is closed and apparently resolved it is not working for me:

This raises the error type 'String' is not a subtype of type 'int?' in type cast.

@override
void initState() {
  final node0 = Node.Id("0");
  final node1 = Node.Id("1");
  graph.addEdge(node0, node1);
  builder
    ..siblingSeparation = (10)
    ..levelSeparation = (50)
    ..subtreeSeparation = (100)
    ..orientation = (BuchheimWalkerConfiguration.ORIENTATION_LEFT_RIGHT);
}
@nabil6391
Copy link
Owner

Please share the error message and the stacktrace

@RottenSchnitzel
Copy link
Author

RottenSchnitzel commented Mar 16, 2023

Sure. Here is everything the console gave me:

════════ Exception caught by widgets library ═══════════════════════════════════
The following _CastError was thrown building GraphView(dirty, state: _GraphViewState#f555c):
type 'String' is not a subtype of type 'int' in type cast

The relevant error-causing widget was
GraphView
lib/common/tree.dart:72
When the exception was thrown, this was the stack
#0      _TreeState.build.<anonymous closure> (package:Test/common/tree.dart:80:41)
#1      _GraphView._extractChildren.<anonymous closure> (package:graphview/GraphView.dart:103:40)
#2      List.forEach (dart:core-patch/growable_array.dart:416:8)
#3      _GraphView._extractChildren (package:graphview/GraphView.dart:102:17)
#4      new _GraphView (package:graphview/GraphView.dart:86:35)
#5      _GraphViewState.build (package:graphview/GraphView.dart:69:14)
#6      StatefulElement.build (package:flutter/src/widgets/framework.dart:5080:27)
#7      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4968:15)
#8      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5133:11)
#9      Element.rebuild (package:flutter/src/widgets/framework.dart:4690:5)
#10     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4950:5)
#11     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5124:11)
#12     ComponentElement.mount (package:flutter/src/widgets/framework.dart:4944:5)
...     Normal element mounting (73 frames)
#85     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3953:16)
#86     MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6512:36)
#87     MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6524:32)
...     Normal element mounting (9 frames)
#96     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3953:16)
#97     MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6512:36)
#98     MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6524:32)
...     Normal element mounting (28 frames)
#126    Element.inflateWidget (package:flutter/src/widgets/framework.dart:3953:16)
#127    MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6512:36)
#128    MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6524:32)
...     Normal element mounting (326 frames)
#454    Element.inflateWidget (package:flutter/src/widgets/framework.dart:3953:16)
#455    MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6512:36)
#456    MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6524:32)
...     Normal element mounting (446 frames)
#902    Element.inflateWidget (package:flutter/src/widgets/framework.dart:3953:16)
#903    Element.updateChild (package:flutter/src/widgets/framework.dart:3682:18)
#904    RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:1176:16)
#905    RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:1145:5)
#906    RenderObjectToWidgetAdapter.attachToRenderTree.<anonymous closure> (package:flutter/src/widgets/binding.dart:1092:18)
#907    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2682:19)
#908    RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:1091:13)
#909    WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:926:7)
#910    WidgetsBinding.scheduleAttachRootWidget.<anonymous closure> (package:flutter/src/widgets/binding.dart:906:7)
#914    _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:192:26)
(elided 3 frames from class _Timer and dart:async-patch)
════════════════════════════════════════════════════════════════════════════════
D/EGL_emulation( 8303): app_time_stats: avg=5484.56ms min=5484.56ms max=5484.56ms count=1

@nabil6391
Copy link
Owner

Cannot reproduce the issue

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

No branches or pull requests

2 participants