diff --git a/flutter_custom_tabs/test/launcher_test.dart b/flutter_custom_tabs/test/launcher_test.dart index 055238f..4c942e2 100644 --- a/flutter_custom_tabs/test/launcher_test.dart +++ b/flutter_custom_tabs/test/launcher_test.dart @@ -66,7 +66,7 @@ void main() { urlBarHidingEnabled: true, shareState: CustomTabsShareState.off, showPageTitle: true, - enableInstantApps: false, + instantAppsEnabled: false, animations: CustomTabsAnimations( startEnter: '_startEnter', startExit: '_startExit', diff --git a/flutter_custom_tabs_android/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/CustomTabsFactory.java b/flutter_custom_tabs_android/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/CustomTabsFactory.java index ad09d87..b4726ec 100644 --- a/flutter_custom_tabs_android/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/CustomTabsFactory.java +++ b/flutter_custom_tabs_android/android/src/main/java/com/github/droibit/flutter/plugins/customtabs/CustomTabsFactory.java @@ -36,7 +36,7 @@ class CustomTabsFactory { private static final String KEY_OPTIONS_URL_BAR_HIDING_ENABLED = "urlBarHidingEnabled"; private static final String KEY_OPTIONS_SHOW_PAGE_TITLE = "showPageTitle"; private static final String KEY_OPTIONS_SHARE_STATE = "shareState"; - private static final String KEY_OPTIONS_ENABLE_INSTANT_APPS = "enableInstantApps"; + private static final String KEY_INSTANT_APPS_ENABLED = "instantAppsEnabled"; private static final String KEY_OPTIONS_ANIMATIONS = "animations"; private static final String KEY_CLOSE_BUTTON_POSITION = "closeButtonPosition"; private static final String KEY_CLOSE_BUTTON_ICON = "closeButtonIcon"; @@ -94,8 +94,8 @@ CustomTabsIntent createIntent(@NonNull Map options) { builder.setShowTitle(((Boolean) options.get(KEY_OPTIONS_SHOW_PAGE_TITLE))); } - if (options.containsKey(KEY_OPTIONS_ENABLE_INSTANT_APPS)) { - builder.setInstantAppsEnabled(((Boolean) options.get(KEY_OPTIONS_ENABLE_INSTANT_APPS))); + if (options.containsKey(KEY_INSTANT_APPS_ENABLED)) { + builder.setInstantAppsEnabled(((Boolean) options.get(KEY_INSTANT_APPS_ENABLED))); } if (options.containsKey(KEY_OPTIONS_ANIMATIONS)) { diff --git a/flutter_custom_tabs_platform_interface/lib/src/custom_tabs_options.dart b/flutter_custom_tabs_platform_interface/lib/src/custom_tabs_options.dart index b5b7b9c..efbfd9d 100644 --- a/flutter_custom_tabs_platform_interface/lib/src/custom_tabs_options.dart +++ b/flutter_custom_tabs_platform_interface/lib/src/custom_tabs_options.dart @@ -17,7 +17,7 @@ class CustomTabsOptions { this.urlBarHidingEnabled, this.shareState, this.showPageTitle, - this.enableInstantApps, + this.instantAppsEnabled, this.closeButton, this.animations, this.extraCustomTabs, @@ -56,7 +56,7 @@ class CustomTabsOptions { final bool? showPageTitle; /// If enabled, allow custom tab to use [Instant Apps](https://developer.android.com/topic/instant-apps/index.html). - final bool? enableInstantApps; + final bool? instantAppsEnabled; /// The close button configuration. final CustomTabsCloseButton? closeButton; @@ -81,7 +81,7 @@ class CustomTabsOptions { 'urlBarHidingEnabled': urlBarHidingEnabled, if (shareState != null) 'shareState': shareState!.rawValue, if (showPageTitle != null) 'showPageTitle': showPageTitle, - if (enableInstantApps != null) 'enableInstantApps': enableInstantApps, + if (instantAppsEnabled != null) 'instantAppsEnabled': instantAppsEnabled, if (animations != null) 'animations': animations!.toMap(), if (closeButton?.icon != null) 'closeButtonIcon': closeButton!.icon, if (closeButton?.position != null) diff --git a/flutter_custom_tabs_platform_interface/test/src/custom_tabs_options_test.dart b/flutter_custom_tabs_platform_interface/test/src/custom_tabs_options_test.dart index ae6d1d2..62a7664 100644 --- a/flutter_custom_tabs_platform_interface/test/src/custom_tabs_options_test.dart +++ b/flutter_custom_tabs_platform_interface/test/src/custom_tabs_options_test.dart @@ -33,7 +33,7 @@ void main() { urlBarHidingEnabled: true, shareState: CustomTabsShareState.off, showPageTitle: true, - enableInstantApps: false, + instantAppsEnabled: false, closeButton: CustomTabsCloseButton( icon: "icon", position: CustomTabsCloseButtonPosition.end, @@ -79,7 +79,7 @@ void main() { 'urlBarHidingEnabled': true, 'shareState': 2, 'showPageTitle': true, - 'enableInstantApps': false, + 'instantAppsEnabled': false, 'closeButtonIcon': "icon", 'closeButtonPosition': 2, 'animations': {