Skip to content

Commit 1f2c238

Browse files
committed
fix platformViewRegistry for web
1 parent a0d16fb commit 1f2c238

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

arcgis_map_sdk_web/lib/src/arcgis_map_web_controller.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import 'dart:async';
2-
import 'dart:js_interop';
3-
import 'dart:ui' as ui;
2+
import 'dart:ui_web';
43

54
import 'package:arcgis_map_sdk_platform_interface/arcgis_map_sdk_platform_interface.dart';
65
import 'package:arcgis_map_sdk_web/arcgis_map_web_js.dart';
@@ -22,7 +21,6 @@ class ArcgisMapWebController {
2221
final Completer<bool> _baseMapLoaded = Completer();
2322
ViewPadding? _activePadding;
2423

25-
//TODO CHECK
2624
late JsEsriMap? _map = const EsriMap().init(
2725
basemap: _mapOptions.basemap?.value,
2826
ground: _mapOptions.mapStyle == MapStyle.threeD ? _mapOptions.ground?.value : null,
@@ -77,8 +75,9 @@ class ArcgisMapWebController {
7775
}) : _mapId = mapId,
7876
_streamController = streamController,
7977
_mapOptions = mapOptions {
78+
final PlatformViewRegistry platformViewRegistry = PlatformViewRegistry();
8079
// ignore: avoid_dynamic_calls
81-
ui.platformViewRegistry.registerViewFactory(
80+
platformViewRegistry.registerViewFactory(
8281
_getViewType(_mapId),
8382
(int viewId) => _div,
8483
);

0 commit comments

Comments
 (0)