platform property
PlatformWebView?
platform
Implementation
static PlatformWebView? get platform {
if (_platform == null) {
switch (defaultTargetPlatform) {
case TargetPlatform.android:
_platform = AndroidWebView();
break;
case TargetPlatform.iOS:
_platform = CupertinoWebView();
break;
default:
throw UnsupportedError(
"Trying to use the default webview implementation for $defaultTargetPlatform but there isn't a default one",
);
}
}
return _platform;
}
Implementation
static set platform(PlatformWebView? platform) {
_platform = platform;
}