Open DragonSlayer88 opened 1 year ago
same issue, but only happens after i press "r" to hot reload.
I use the tooltip for Markers on the FlutterMap. This happened on some Markers. I couldn't find a pattern.
Even on the first time, simulator and real device. No reload required
═══════ Exception caught by gesture ═══════════════════════════════════════════
The following StateError was thrown while handling a gesture:
Bad state: This controller has not been attached to a tooltip yet.
When the exception was thrown, this was the stack:
#0 JustTheController.defaultShowTooltip (package:just_the_tooltip/src/models/just_the_controller.dart:22:5)
just_the_controller.dart:22
...locationss.entries.map((entry) {
final tooltipController = JustTheController();
return Marker(
width: 25.0,
height: 25.0,
point: entry.value,
builder: (ctx) => GestureDetector(
onTap: () => {
tooltipController.showTooltip(immediately: true)
},
child: JustTheTooltip(
controller: tooltipController,
content: Padding(
padding: const EdgeInsets.all(8.0),
child: ConstrainedBox(
constraints:
const BoxConstraints(maxWidth: 200.0),
child: Text(
'${member.vorname} ${member.nachname}',
)),
),
child: Icon(
Icons.person_pin_circle,
color: Colors.red,
),
),
),
);
});
Im dynamically attaching controllers to tooltips i am creating as i need them. The first ones i create work fine, but when i create more i get this error. Please help:
Bad state: This controller has not been attached to a tooltip yet.