In short, you have to:
//import the JS interop lib import 'package:js/js.dart' as js; // access the JS context for the page var context = js.context; // then use context to access JS object var canvas = query('#map_canvas'); var googlemaps = js.context.google.maps; // and create JS objects accessed through proxies var googlemap = new js.Proxy(googlemaps.Map, canvas);
For more details (scopes, lifetimes, callbacks, etc) and examples, refer to linked article.
Answered By – Zdeslav Vojkovic
Answer Checked By – Marie Seifert (FlutterFixes Admin)