Skip to content

type 'List<Comparable<dynamic>>' is not a subtype of type 'Iterable<Pair>' of 'iterable' #13

@spkingr

Description

@spkingr

When I make a simple game, I got the error again and again, how to solve it, thanks!

Another exception was thrown: type 'List<Comparable<dynamic>>' is not a subtype of type 'Iterable<Pair>' of 'iterable'

And the stack:

I/flutter (20726): When the exception was thrown, this was the stack:
I/flutter (20726): #0      List.setRange (dart:core/runtime/libarray.dart)
I/flutter (20726): #1      sort (package:box2d/src/buffer_utils.dart:151:8)
I/flutter (20726): #2      DefaultBroadPhaseBuffer.updatePairs (file:///D:/Software/Google/Flutter/SDK/flutter/.pub-cache/hosted/pub.flutter-io.cn/box2d-0.4.0/lib/src/collision/broadphase/default_broadphase_buffer.dart:140:17)
I/flutter (20726): #3      ContactManager.findNewContacts (file:///D:/Software/Google/Flutter/SDK/flutter/.pub-cache/hosted/pub.flutter-io.cn/box2d-0.4.0/lib/src/dynamics/contact_manager.dart:165:16)
I/flutter (20726): #4      World.stepDt (file:///D:/Software/Google/Flutter/SDK/flutter/.pub-cache/hosted/pub.flutter-io.cn/box2d-0.4.0/lib/src/dynamics/world.dart:566:23)
I/flutter (20726): #5      Box2DComponent.update (package:project_simple_game/flame/box2d/box2d_component.dart:39:11)
I/flutter (20726): #6      GameWorld.update (package:project_simple_game/game_world.dart:26:11)
I/flutter (20726): #7      GameRoot.update (package:project_simple_game/game_root.dart:33:21)
I/flutter (20726): #8      _GameRenderBox._update (package:project_simple_game/flame/game.dart:119:10)
I/flutter (20726): #9      _GameRenderBox._tick (package:project_simple_game/flame/game.dart:112:5)
I/flutter (20726): #10     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
I/flutter (20726): #11     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleBeginFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:906:11)
I/flutter (20726): #12     __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.forEach (dart:collection/runtime/libcompact_hash.dart:363:8)
I/flutter (20726): #13     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleBeginFrame (package:flutter/src/scheduler/binding.dart:904:17)
I/flutter (20726): #14     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:747:7)
I/flutter (20726): #16     _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
I/flutter (20726): #17     _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
I/flutter (20726): #18     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)
I/flutter (20726): (elided one frame from package dart:async)
I/flutter (20726): 
I/flutter (20726): 
I/flutter (20726): This exception was thrown in the context of a scheduler callback. When the scheduler callback was
I/flutter (20726): _registered_ (as opposed to when the exception was thrown), this was the stack:
I/flutter (20726): #0      new _FrameCallbackEntry.<anonymous closure> (package:flutter/src/scheduler/binding.dart:109:33)
I/flutter (20726): #1      new _FrameCallbackEntry (package:flutter/src/scheduler/binding.dart:112:6)
I/flutter (20726): #2      _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.scheduleFrameCallback (package:flutter/src/scheduler/binding.dart:426:53)
I/flutter (20726): #3      _GameRenderBox._scheduleTick (package:project_simple_game/flame/game.dart:102:50)
I/flutter (20726): #4      _GameRenderBox._tick (package:project_simple_game/flame/game.dart:111:5)
I/flutter (20726): #5      _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
I/flutter (20726): #6      _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleBeginFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:906:11)
I/flutter (20726): #7      __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.forEach (dart:collection/runtime/libcompact_hash.dart:363:8)
I/flutter (20726): #8      _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleBeginFrame (package:flutter/src/scheduler/binding.dart:904:17)
I/flutter (20726): #9      _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleBeginFrame (package:flutter/src/scheduler/binding.dart:834:5)
I/flutter (20726): #10     _invoke1 (dart:ui/hooks.dart:134:13)
I/flutter (20726): #11     _beginFrame (dart:ui/hooks.dart:105:3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions