Category / Section
How to add Flutter Maps on the web and desktop platforms?
1 min read
We have provided web support for the Syncfusion® Flutter Maps package. You can run the following commands in the IDE terminal one by one to configure the web support.
flutter channel beta
flutter upgrade
flutter config --enable-web
flutter create .
flutter run -d chrome
You need to make sure you have Chrome or any other browsers on your machine along with Flutter SDK to run the application on the web platform. The supported web browsers for Flutter app are mentioned here.
@override Widget build(BuildContext context) { return Scaffold( body: SfMaps( layers: [ MapTileLayer( urlTemplate:'https://tile.openstreetmap.org/{z}/{x}/{y}.png', ), ], ), ); }
We have also enabled support for Windows, macOS and Linux platforms for our maps package. Follow these steps to run maps in macOS, Windows and Linux platforms.
Live samples for web,
Package reference,