We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9078c9e commit 63dfebdCopy full SHA for 63dfebd
arcgis_map_sdk_web/lib/src/arcgis_map_web_controller.dart
@@ -271,10 +271,16 @@ class ArcgisMapWebController {
271
}
272
273
if (webgl2 != null) {
274
- (webgl2 as WebGLRenderingContext)
275
- .getCustomExtension('WEBGL_lose_context')
276
- ?.loseContext();
277
- webgl2.getCustomExtension('WEBGL_lose_context')?.restoreContext();
+ // WebGL2 context needs to be handled differently than WebGL1
+ final loseContextExtension = callMethod(
+ webgl2,
+ 'getExtension',
278
+ ['WEBGL_lose_context'],
279
+ );
280
+ if (loseContextExtension != null) {
281
+ callMethod(loseContextExtension as Object, 'loseContext', []);
282
+ callMethod(loseContextExtension, 'restoreContext', []);
283
+ }
284
285
286
0 commit comments