launchCustomTab function
Implementation
void launchCustomTab(BuildContext context,String url) async {
try {
await tab.launch(
url,
customTabsOption: tab.CustomTabsOption(
toolbarColor: black,
animation: tab.CustomTabsSystemAnimation.slideIn(),
enableDefaultShare: true,
enableUrlBarHiding: true,
showPageTitle: true,
extraCustomTabs: const <String>[
'org.mozilla.firefox',
'com.microsoft.emmx',
],
),
safariVCOption: const tab.SafariViewControllerOption(
preferredBarTintColor: black,
preferredControlTintColor: Colors.white,
barCollapsingEnabled: true,
entersReaderIfAvailable: false,
dismissButtonStyle: tab.SafariViewControllerDismissButtonStyle.close,
),
);
} catch (e) {
// An exception is thrown if browser app is not installed on Android device.
debugPrint(e.toString());
}
}