Skip to content

Commit

Permalink
Rename from showPageTitle to showTitle in CustomTabsOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
droibit committed Oct 8, 2023
1 parent 41a2f88 commit 1a8e1d3
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion flutter_custom_tabs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class MyApp extends StatelessWidget {
),
shareState: CustomTabsShareState.on,
urlBarHidingEnabled: true,
showPageTitle: true,
showTitle: true,
closeButton: CustomTabsCloseButton(
icon: CustomTabsCloseButtonIcon.back,
),
Expand Down
4 changes: 2 additions & 2 deletions flutter_custom_tabs/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class MyApp extends StatelessWidget {
),
shareState: CustomTabsShareState.on,
urlBarHidingEnabled: true,
showPageTitle: true,
showTitle: true,
closeButton: CustomTabsCloseButton(
icon: CustomTabsCloseButtonIcon.back,
),
Expand Down Expand Up @@ -101,7 +101,7 @@ class MyApp extends StatelessWidget {
colorScheme: theme.brightness.toColorScheme(),
toolbarColor: theme.primaryColor,
),
showPageTitle: true,
showTitle: true,
),
safariVCOptions: SafariViewControllerOptions.pageSheet(
configuration: const SheetPresentationControllerConfiguration(
Expand Down
4 changes: 2 additions & 2 deletions flutter_custom_tabs/lib/src/launcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import 'package:flutter_custom_tabs_platform_interface/flutter_custom_tabs_platf
/// customTabsOptions: CustomTabsOptions(
/// toolbarColor: Theme.of(context).primaryColor,
/// urlBarHidingEnabled: true,
/// showPageTitle: true,
/// showTitle: true,
/// closeButton: CustomTabsCloseButton(
/// icon: CustomTabsCloseButtonIcon.back,
/// ),
Expand Down Expand Up @@ -67,7 +67,7 @@ Future<void> launchUrlString(
/// customTabsOptions: CustomTabsOptions(
/// toolbarColor: Theme.of(context).primaryColor,
/// urlBarHidingEnabled: true,
/// showPageTitle: true,
/// showTitle: true,
/// closeButton: CustomTabsCloseButton(
/// icon: CustomTabsCloseButtonIcon.back,
/// ),
Expand Down
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 @@ -65,7 +65,7 @@ void main() {
),
urlBarHidingEnabled: true,
shareState: CustomTabsShareState.off,
showPageTitle: true,
showTitle: true,
instantAppsEnabled: false,
animations: CustomTabsAnimations(
startEnter: '_startEnter',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class CustomTabsFactory {
private static final String KEY_COLOR_SCHEME_PARAMS_NAVIGATION_BAR_COLOR = "navigationBarColor";
private static final String KEY_COLOR_SCHEME_PARAMS_NAVIGATION_BAR_DIVIDER_COLOR = "navigationBarDividerColor";
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_SHOW_TITLE = "showTitle";
private static final String KEY_OPTIONS_SHARE_STATE = "shareState";
private static final String KEY_INSTANT_APPS_ENABLED = "instantAppsEnabled";
private static final String KEY_OPTIONS_ANIMATIONS = "animations";
Expand Down Expand Up @@ -90,8 +90,8 @@ CustomTabsIntent createIntent(@NonNull Map<String, Object> options) {
builder.setShareState(shareState);
}

if (options.containsKey(KEY_OPTIONS_SHOW_PAGE_TITLE)) {
builder.setShowTitle(((Boolean) options.get(KEY_OPTIONS_SHOW_PAGE_TITLE)));
if (options.containsKey(KEY_OPTIONS_SHOW_TITLE)) {
builder.setShowTitle(((Boolean) options.get(KEY_OPTIONS_SHOW_TITLE)));
}

if (options.containsKey(KEY_INSTANT_APPS_ENABLED)) {
Expand Down
6 changes: 3 additions & 3 deletions flutter_custom_tabs_android/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class MyApp extends StatelessWidget {
),
shareState: CustomTabsShareState.on,
urlBarHidingEnabled: true,
showPageTitle: true,
showTitle: true,
animations: CustomTabsSystemAnimations.slideIn(),
closeButton: CustomTabsCloseButton(
icon: CustomTabsCloseButtonIcon.back,
Expand Down Expand Up @@ -111,7 +111,7 @@ class MyApp extends StatelessWidget {
colorScheme: theme.brightness.toColorScheme(),
toolbarColor: theme.primaryColor,
),
showPageTitle: true,
showTitle: true,
),
safariVCOptions: SafariViewControllerOptions.pageSheet(
configuration: const SheetPresentationControllerConfiguration(
Expand Down Expand Up @@ -151,7 +151,7 @@ class MyApp extends StatelessWidget {
),
shareState: CustomTabsShareState.on,
urlBarHidingEnabled: true,
showPageTitle: true,
showTitle: true,
),
safariVCOptions: SafariViewControllerOptions(
preferredBarTintColor: theme.colorScheme.surface,
Expand Down
6 changes: 3 additions & 3 deletions flutter_custom_tabs_ios/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class MyApp extends StatelessWidget {
),
shareState: CustomTabsShareState.on,
urlBarHidingEnabled: true,
showPageTitle: true,
showTitle: true,
),
safariVCOptions: SafariViewControllerOptions(
preferredBarTintColor: theme.colorScheme.surface,
Expand Down Expand Up @@ -102,7 +102,7 @@ class MyApp extends StatelessWidget {
colorSchemes: CustomTabsColorSchemes.theme(
toolbarColor: theme.primaryColor,
),
showPageTitle: true,
showTitle: true,
),
safariVCOptions: SafariViewControllerOptions.pageSheet(
configuration: const SheetPresentationControllerConfiguration(
Expand Down Expand Up @@ -142,7 +142,7 @@ class MyApp extends StatelessWidget {
),
shareState: CustomTabsShareState.on,
urlBarHidingEnabled: true,
showPageTitle: true,
showTitle: true,
),
safariVCOptions: SafariViewControllerOptions(
preferredBarTintColor: theme.colorScheme.surface,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class CustomTabsOptions {
this.colorSchemes,
this.urlBarHidingEnabled,
this.shareState,
this.showPageTitle,
this.showTitle,
this.instantAppsEnabled,
this.closeButton,
this.animations,
Expand All @@ -29,14 +29,14 @@ class CustomTabsOptions {
required CustomTabsBottomSheetConfiguration configuration,
CustomTabsColorSchemes? colorSchemes,
CustomTabsShareState? shareState,
bool? showPageTitle,
bool? showTitle,
CustomTabsCloseButton? closeButton,
List<String>? extraCustomTabs,
Map<String, String>? headers,
}) : this(
colorSchemes: colorSchemes,
shareState: shareState,
showPageTitle: showPageTitle,
showTitle: showTitle,
closeButton: closeButton,
extraCustomTabs: extraCustomTabs,
headers: headers,
Expand All @@ -53,7 +53,7 @@ class CustomTabsOptions {
final CustomTabsShareState? shareState;

/// Show web page title in tool bar.
final bool? showPageTitle;
final bool? showTitle;

/// If enabled, allow custom tab to use [Instant Apps](https://developer.android.com/topic/instant-apps/index.html).
final bool? instantAppsEnabled;
Expand All @@ -80,7 +80,7 @@ class CustomTabsOptions {
if (urlBarHidingEnabled != null)
'urlBarHidingEnabled': urlBarHidingEnabled,
if (shareState != null) 'shareState': shareState!.rawValue,
if (showPageTitle != null) 'showPageTitle': showPageTitle,
if (showTitle != null) 'showTitle': showTitle,
if (instantAppsEnabled != null) 'instantAppsEnabled': instantAppsEnabled,
if (animations != null) 'animations': animations!.toMap(),
if (closeButton?.icon != null) 'closeButtonIcon': closeButton!.icon,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void main() {
),
urlBarHidingEnabled: true,
shareState: CustomTabsShareState.off,
showPageTitle: true,
showTitle: true,
instantAppsEnabled: false,
closeButton: CustomTabsCloseButton(
icon: "icon",
Expand Down Expand Up @@ -78,7 +78,7 @@ void main() {
},
'urlBarHidingEnabled': true,
'shareState': 2,
'showPageTitle': true,
'showTitle': true,
'instantAppsEnabled': false,
'closeButtonIcon': "icon",
'closeButtonPosition': 2,
Expand Down

0 comments on commit 1a8e1d3

Please sign in to comment.