changeDefaultIconMarker method

  1. @override
Future changeDefaultIconMarker(
  1. MarkerIcon homeMarker
)

change Home Icon Marker we need to global key to recuperate widget from tree element homeMarker : (MarkerIcon) key of widget that represent the new marker

Implementation

@override
Future changeDefaultIconMarker(MarkerIcon homeMarker) async {
  osmWebFlutterState.widget.dynamicMarkerWidgetNotifier.value = homeMarker;
  await Future.delayed(duration, () async {
    final icon = await capturePng(osmWebFlutterState.dynamicMarkerKey!);
    await interop.setDefaultIcon(mapIdMixin, icon.convertToString());
  });
}