0

i wanted to test MapboxGL using this package https://github.com/apptreesoftware/flutter_map .

I'm testing on Nokia 5.3 , Android 10 .

So when i test it , launching the screen directly from the Main.dart , it works fine with the markers and everything .

But when i try to go to that screen after clicking on a button, i get a black screen .

Pubspec.yaml 

environment:
sdk: ">=2.8.0 <3.0.0"
dependencies:
  flutter:
    sdk: flutter
flutter_map: any #Test map
flutter_map_marker_cluster: any

so like i said when i try to reach the screen like this

InkWell(
  child: Icon(
    FontAwesomeIcons.mapMarkerAlt,
  size: 12,
  color: HexColor('#54D3C2'),),
  onTap: () {
    Navigator.of(context).push(
      MaterialPageRoute(
        builder: (BuildContext context) {
          return TestMapPage();
        },
      ),);
 },

)

and i get these in my console .

I/flutter (27236): Another exception was thrown: There are multiple heroes that share the 
same tag within a subtree.
W/mple.sportsens(27236): Accessing hidden method Lsun/misc/Unsafe;- >getUnsafe()Lsun/misc/Unsafe; (greylist,core-platform-api, linking, allowed)
W/mple.sportsens(27236): Accessing hidden method Lsun/misc/Unsafe;- >objectFieldOffset(Ljava/lang/reflect/Field;)J (greylist,core-platform-api, linking, allowed)
W/mple.sportsens(27236): Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
W/mple.sportsens(27236): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
Outail Ouni
  • 113
  • 1
  • 4
  • Do you have several floatingButton on the same screen ? If so you must add the `heroTag` on each floatingButton to make them unique. – BabC Jan 06 '21 at 14:04
  • okay ... that was the error ... Thank you a lot it help. i just added "HeroTag : null" – Outail Ouni Jan 07 '21 at 10:49

0 Answers0