getMetaThemeColor method
Returns an instance of Color representing the content value of the
<meta name="theme-color" content=""> tag of the current WebView, if available, otherwise null.
Officially Supported Platforms/Implementations:
- Android WebView:
- This method is implemented using JavaScript.
- iOS WKWebView (Official API - WKWebView.themeColor):
- On iOS < 15.0, this method is implemented using JavaScript.
- Linux WPE WebKit (Official API - webkit_web_view_get_theme_color)
- macOS WKWebView (Official API - WKWebView.themeColor):
- On iOS < 12.0, this method is implemented using JavaScript.
- Web <iframe> but requires same origin:
- This method is implemented using JavaScript.
- Windows WebView2:
- This method is implemented using JavaScript.
Use the PlatformInAppWebViewController.isMethodSupported method to check if this method is supported at runtime.
Implementation
Future<Color?> getMetaThemeColor() => platform.getMetaThemeColor();