Skip to content

Commit

Permalink
Rename from enableInstantApps to instantAppsEnabled in `CustomTab…
Browse files Browse the repository at this point in the history
…sOptions`
  • Loading branch information
droibit committed Oct 8, 2023
1 parent 5a7ee4a commit 41a2f88
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion flutter_custom_tabs/test/launcher_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void main() {
urlBarHidingEnabled: true,
shareState: CustomTabsShareState.off,
showPageTitle: true,
enableInstantApps: false,
instantAppsEnabled: false,
animations: CustomTabsAnimations(
startEnter: '_startEnter',
startExit: '_startExit',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -94,8 +94,8 @@ CustomTabsIntent createIntent(@NonNull Map<String, Object> 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)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CustomTabsOptions {
this.urlBarHidingEnabled,
this.shareState,
this.showPageTitle,
this.enableInstantApps,
this.instantAppsEnabled,
this.closeButton,
this.animations,
this.extraCustomTabs,
Expand Down Expand Up @@ -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;
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void main() {
urlBarHidingEnabled: true,
shareState: CustomTabsShareState.off,
showPageTitle: true,
enableInstantApps: false,
instantAppsEnabled: false,
closeButton: CustomTabsCloseButton(
icon: "icon",
position: CustomTabsCloseButtonPosition.end,
Expand Down Expand Up @@ -79,7 +79,7 @@ void main() {
'urlBarHidingEnabled': true,
'shareState': 2,
'showPageTitle': true,
'enableInstantApps': false,
'instantAppsEnabled': false,
'closeButtonIcon': "icon",
'closeButtonPosition': 2,
'animations': <String, String>{
Expand Down

0 comments on commit 41a2f88

Please sign in to comment.