diff --git a/flutter_inappwebview/example/pubspec.yaml b/flutter_inappwebview/example/pubspec.yaml index 884f3667..ef088c4f 100755 --- a/flutter_inappwebview/example/pubspec.yaml +++ b/flutter_inappwebview/example/pubspec.yaml @@ -12,7 +12,7 @@ version: 1.0.0+1 publish_to: none environment: - sdk: ">=2.15.0 <4.0.0" + sdk: ">=2.17.0 <4.0.0" flutter: ">=3.0.0" dependencies: diff --git a/flutter_inappwebview_ios/CHANGELOG.md b/flutter_inappwebview_ios/CHANGELOG.md index 392fbfe4..b61a86e8 100644 --- a/flutter_inappwebview_ios/CHANGELOG.md +++ b/flutter_inappwebview_ios/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.3 + +- Fixed `InAppBrowserMenuItem.iconColor` not working + ## 1.0.2 - Added `PlatformPrintJobController.onComplete` setter diff --git a/flutter_inappwebview_ios/ios/Classes/InAppBrowser/InAppBrowserWebViewController.swift b/flutter_inappwebview_ios/ios/Classes/InAppBrowser/InAppBrowserWebViewController.swift index 6f01c4e3..3f59398b 100755 --- a/flutter_inappwebview_ios/ios/Classes/InAppBrowser/InAppBrowserWebViewController.swift +++ b/flutter_inappwebview_ios/ios/Classes/InAppBrowser/InAppBrowserWebViewController.swift @@ -325,9 +325,9 @@ public class InAppBrowserWebViewController: UIViewController, InAppBrowserDelega if !menuItem.showAsAction { uiActions.append(uiAction) } else { - navigationItem.rightBarButtonItems?.append( - UIBarButtonItem(primaryAction: uiAction) - ) + let buttonItem = UIBarButtonItem(primaryAction: uiAction) + buttonItem.tintColor = menuItem.iconColor + navigationItem.rightBarButtonItems?.append(buttonItem) } } if !uiActions.isEmpty { diff --git a/flutter_inappwebview_ios/ios/Classes/Types/InAppBrowserMenuItem.swift b/flutter_inappwebview_ios/ios/Classes/Types/InAppBrowserMenuItem.swift index 8a603daa..ef2af3c5 100644 --- a/flutter_inappwebview_ios/ios/Classes/Types/InAppBrowserMenuItem.swift +++ b/flutter_inappwebview_ios/ios/Classes/Types/InAppBrowserMenuItem.swift @@ -23,7 +23,7 @@ public class InAppBrowserMenuItem: NSObject { self.iconColor = iconColor self.showAsAction = showAsAction if #available(iOS 13.0, *), let icon = icon, let iconColor = iconColor { - icon.withTintColor(iconColor) + icon.withTintColor(iconColor, renderingMode: .alwaysOriginal) } } diff --git a/flutter_inappwebview_ios/pubspec.yaml b/flutter_inappwebview_ios/pubspec.yaml index 7b02b0cc..80dc4519 100644 --- a/flutter_inappwebview_ios/pubspec.yaml +++ b/flutter_inappwebview_ios/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_inappwebview_ios description: iOS implementation of the flutter_inappwebview plugin. -version: 1.0.2 +version: 1.0.3 homepage: https://inappwebview.dev/ repository: https://github.com/pichillilorenzo/flutter_inappwebview/tree/master/flutter_inappwebview_ios issue_tracker: https://github.com/pichillilorenzo/flutter_inappwebview/issues diff --git a/flutter_inappwebview_platform_interface/CHANGELOG.md b/flutter_inappwebview_platform_interface/CHANGELOG.md index 89e5aaa8..ab990590 100644 --- a/flutter_inappwebview_platform_interface/CHANGELOG.md +++ b/flutter_inappwebview_platform_interface/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.4 + +- Expose missing `InAppBrowserSettings.menuButtonColor` option + ## 1.0.3 - Expose missing old `AndroidInAppWebViewOptions` and `IOSInAppWebViewOptions` classes diff --git a/flutter_inappwebview_platform_interface/lib/src/in_app_browser/in_app_browser_settings.dart b/flutter_inappwebview_platform_interface/lib/src/in_app_browser/in_app_browser_settings.dart index d75cafb8..b2f1c106 100755 --- a/flutter_inappwebview_platform_interface/lib/src/in_app_browser/in_app_browser_settings.dart +++ b/flutter_inappwebview_platform_interface/lib/src/in_app_browser/in_app_browser_settings.dart @@ -304,6 +304,7 @@ class InAppBrowserSettings_ this.closeButtonCaption, this.closeButtonColor, this.hideCloseButton = false, + this.menuButtonColor, this.presentationStyle = ModalPresentationStyle_.FULL_SCREEN, this.transitionStyle = ModalTransitionStyle_.COVER_VERTICAL, this.hideTitleBar = false, diff --git a/flutter_inappwebview_platform_interface/lib/src/in_app_browser/in_app_browser_settings.g.dart b/flutter_inappwebview_platform_interface/lib/src/in_app_browser/in_app_browser_settings.g.dart index 4c2fe0f6..75eedc8c 100644 --- a/flutter_inappwebview_platform_interface/lib/src/in_app_browser/in_app_browser_settings.g.dart +++ b/flutter_inappwebview_platform_interface/lib/src/in_app_browser/in_app_browser_settings.g.dart @@ -213,6 +213,7 @@ class InAppBrowserSettings this.hideToolbarBottom = false, this.hideToolbarTop = false, this.hideUrlBar = false, + this.menuButtonColor, this.presentationStyle = ModalPresentationStyle.FULL_SCREEN, this.shouldCloseOnBackButtonPressed = false, this.toolbarBottomBackgroundColor, @@ -239,6 +240,9 @@ class InAppBrowserSettings closeButtonColor: map['closeButtonColor'] != null ? UtilColor.fromStringRepresentation(map['closeButtonColor']) : null, + menuButtonColor: map['menuButtonColor'] != null + ? UtilColor.fromStringRepresentation(map['menuButtonColor']) + : null, toolbarBottomBackgroundColor: map['toolbarBottomBackgroundColor'] != null ? UtilColor.fromStringRepresentation( map['toolbarBottomBackgroundColor']) @@ -271,9 +275,6 @@ class InAppBrowserSettings instance.hideToolbarBottom = map['hideToolbarBottom']; instance.hideToolbarTop = map['hideToolbarTop']; instance.hideUrlBar = map['hideUrlBar']; - instance.menuButtonColor = map['menuButtonColor'] != null - ? UtilColor.fromStringRepresentation(map['menuButtonColor']) - : null; instance.presentationStyle = ModalPresentationStyle.fromNativeValue(map['presentationStyle']); instance.shouldCloseOnBackButtonPressed = diff --git a/flutter_inappwebview_platform_interface/lib/src/platform_webview_feature.g.dart b/flutter_inappwebview_platform_interface/lib/src/platform_webview_feature.g.dart index a5062774..091f7b40 100644 --- a/flutter_inappwebview_platform_interface/lib/src/platform_webview_feature.g.dart +++ b/flutter_inappwebview_platform_interface/lib/src/platform_webview_feature.g.dart @@ -6,10 +6,7 @@ part of 'platform_webview_feature.dart'; // ExchangeableEnumGenerator // ************************************************************************** -///Class that represents an Android-specific utility class for checking which WebView Support Library features are supported on the device. -/// -///**Officially Supported Platforms/Implementations**: -///- Android native WebView +///{@macro flutter_inappwebview_platform_interface.PlatformWebViewFeature} class WebViewFeature { final String _value; final String _nativeValue; @@ -320,37 +317,11 @@ class WebViewFeature { return null; } - ///Return whether a feature is supported at run-time. On devices running Android version `Build.VERSION_CODES.LOLLIPOP` and higher, - ///this will check whether a feature is supported, depending on the combination of the desired feature, the Android version of device, - ///and the WebView APK on the device. If running on a device with a lower API level, this will always return `false`. - /// - ///**Note**: This method is different from [isStartupFeatureSupported] and this - ///method only accepts certain features. - ///Please verify that the correct feature checking method is used for a particular feature. - /// - ///**Note**: If this method returns `false`, it is not safe to invoke the methods - ///requiring the desired feature. - ///Furthermore, if this method returns `false` for a particular feature, any callback guarded by that feature will not be invoked. - /// - ///**Official Android API**: https://developer.android.com/reference/androidx/webkit/WebViewFeature#isFeatureSupported(java.lang.String) + ///{@macro flutter_inappwebview_platform_interface.PlatformWebViewFeature.isFeatureSupported} static Future isFeatureSupported(WebViewFeature feature) => PlatformWebViewFeature.static().isFeatureSupported(feature); - ///Return whether a startup feature is supported at run-time. - ///On devices running Android version `Build.VERSION_CODES.LOLLIPOP` and higher, - ///this will check whether a startup feature is supported, - ///depending on the combination of the desired feature, - ///the Android version of device, and the WebView APK on the device. - ///If running on a device with a lower API level, this will always return `false`. - /// - ///**Note**: This method is different from [isFeatureSupported] and this method only accepts startup features. - ///Please verify that the correct feature checking method is used for a particular feature. - /// - ///**Note**: If this method returns `false`, it is not safe to invoke the methods requiring the desired feature. - ///Furthermore, if this method returns `false` for a particular feature, - ///any callback guarded by that feature will not be invoked. - /// - ///**Official Android API**: https://developer.android.com/reference/androidx/webkit/WebViewFeature#isFeatureSupported(java.lang.String) + ///{@macro flutter_inappwebview_platform_interface.PlatformWebViewFeature.isStartupFeatureSupported} static Future isStartupFeatureSupported( WebViewFeature startupFeature) => PlatformWebViewFeature.static().isStartupFeatureSupported(startupFeature); diff --git a/flutter_inappwebview_platform_interface/lib/src/types/custom_tabs_navigation_event_type.g.dart b/flutter_inappwebview_platform_interface/lib/src/types/custom_tabs_navigation_event_type.g.dart index d7e3fb29..63e7f079 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/custom_tabs_navigation_event_type.g.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/custom_tabs_navigation_event_type.g.dart @@ -6,7 +6,7 @@ part of 'custom_tabs_navigation_event_type.dart'; // ExchangeableEnumGenerator // ************************************************************************** -///The type corresponding to the navigation event of [PlatformChromeSafariBrowser.onNavigationEvent]. +///The type corresponding to the navigation event of [PlatformChromeSafariBrowserEvents.onNavigationEvent]. class CustomTabsNavigationEventType { final int _value; final int? _nativeValue; diff --git a/flutter_inappwebview_platform_interface/pubspec.yaml b/flutter_inappwebview_platform_interface/pubspec.yaml index 7bba218b..f9f5c297 100644 --- a/flutter_inappwebview_platform_interface/pubspec.yaml +++ b/flutter_inappwebview_platform_interface/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_inappwebview_platform_interface description: A common platform interface for the flutter_inappwebview plugin. -version: 1.0.3 +version: 1.0.4 homepage: https://inappwebview.dev/ repository: https://github.com/pichillilorenzo/flutter_inappwebview/tree/master/flutter_inappwebview_platform_interface issue_tracker: https://github.com/pichillilorenzo/flutter_inappwebview/issues