flutter_custom_tabs icon indicating copy to clipboard operation
flutter_custom_tabs copied to clipboard

Method to close the custom tab?

Open hiddencaliber opened this issue 6 years ago • 11 comments

hiddencaliber avatar Apr 24 '19 02:04 hiddencaliber

me to

ashkryab avatar Aug 14 '19 15:08 ashkryab

need close tab after hendle deep link

ashkryab avatar Aug 14 '19 15:08 ashkryab

@ashkryab @hiddencaliber did you find a solution to this issue?

agarzas avatar Oct 17 '19 20:10 agarzas

If the website is yours, you can use JavaScript window.close() command to close the browser.

yokristiawan-gmail-com avatar Mar 17 '21 10:03 yokristiawan-gmail-com

I agree with @ashkryab. After deep linking into the app from a custom tab, the previous custom tab seems to still open in the background. This results in the behavior, that no other custom tab can get opened while the app is running.

@droibit is it possible to close previously opened custom tabs?

daniellampl avatar Jun 21 '21 13:06 daniellampl

@daniellampl
Please consider url_lancher to open a deep link URL, as I can not provide a good solution from this plugin for now.

I understand that flutter_custom_tabs and deep links are incompatible,
so I'll consider a fundamental solution.

droibit avatar Jun 22 '21 17:06 droibit

@daniellampl Please consider url_lancher to open a deep link URL, as I can not provide a good solution from this plugin for now.

I understand that flutter_custom_tabs and deep links are incompatible, so I'll consider a fundamental solution.

deep links work for Android but not for iOS.

ayechan-maung avatar Dec 08 '21 09:12 ayechan-maung

Dupe of https://github.com/droibit/flutter_custom_tabs/issues/33 ?

Nice work on this plugin @droibit , thanks 👍

But also, this is a critical issue.

Are there any plans to merge in something like the functionality mentioned previously?

Or something similar to closeInAppWebView?

danwild avatar Apr 22 '24 00:04 danwild

Same here.. I'd want to get the url in return once we hit a deep/app link url and also close the tab automatically..

Awesome plugin though!!

Suman085 avatar Apr 22 '24 16:04 Suman085

There is an existing method to do this! And it is in the docs.

Apologies for the oversight 😅

Just call closeCustomTabs.

Thanks @droibit 🎉

This kinda addresses https://github.com/droibit/flutter_custom_tabs/issues/33 too

danwild avatar Apr 26 '24 03:04 danwild

Hi,

Thank you for your comments and insights. As you mentioned,
flutter_custom_tabs currently offers the closeCustomTabs function to manually close Custom Tabs.

I'm glad to hear that this function may match your use case. If you are considering using OAuth,
you may want to explore plugins like flutter_web_auth_2 for a better user experience as it leverages OS capabilities.

For now, there are no immediate plans to add additional functionality beyond manually closing Custom Tabs.
However, I recognize that closing Custom Tabs is a key use case for OAuth,
and I will begin considering support for OAuth authentication in future versions of the plugin.

Thank you for your feedback and suggestions.

droibit avatar Apr 28 '24 06:04 droibit