Expose missing InAppBrowserSettings.menuButtonColor option in constructor platform interface, Fixed iOS InAppBrowserMenuItem.iconColor not working
This commit is contained in:
parent
a86c5d1e43
commit
d23f7fd41b
|
@ -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:
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
## 1.0.3
|
||||
|
||||
- Fixed `InAppBrowserMenuItem.iconColor` not working
|
||||
|
||||
## 1.0.2
|
||||
|
||||
- Added `PlatformPrintJobController.onComplete` setter
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
## 1.0.4
|
||||
|
||||
- Expose missing `InAppBrowserSettings.menuButtonColor` option
|
||||
|
||||
## 1.0.3
|
||||
|
||||
- Expose missing old `AndroidInAppWebViewOptions` and `IOSInAppWebViewOptions` classes
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 =
|
||||
|
|
|
@ -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<bool> 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<bool> isStartupFeatureSupported(
|
||||
WebViewFeature startupFeature) =>
|
||||
PlatformWebViewFeature.static().isStartupFeatureSupported(startupFeature);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue