toMapPlatform method
dynamic
toMapPlatform()
Implementation
dynamic toMapPlatform() {
if (defaultTargetPlatform == TargetPlatform.android) {
return toMapAndroid();
}
// Guard with !kIsWeb: in a browser on an Apple machine,
// defaultTargetPlatform reports the host OS and would otherwise take
// this native branch instead of the Web tile list.
if (!kIsWeb &&
(defaultTargetPlatform == TargetPlatform.iOS ||
defaultTargetPlatform == TargetPlatform.macOS)) {
return toMapiOS();
}
if (kIsWeb) {
return toWeb();
}
throw UnsupportedError("platform not supported yet");
}