launchURLInDefaultBrowserOnAndroid method
Future<void>
launchURLInDefaultBrowserOnAndroid(
)
Implementation
Future<void> launchURLInDefaultBrowserOnAndroid() async {
final theme = Theme.of(Get.context!);
try {
await launchUrl(Uri.parse('https://flutter.dev'),
customTabsOptions: CustomTabsOptions(
colorSchemes: CustomTabsColorSchemes.defaults(
toolbarColor: theme.colorScheme.surface,
navigationBarColor: theme.colorScheme.surface,
),
urlBarHidingEnabled: true,
showTitle: true,
browser: const CustomTabsBrowserConfiguration(
prefersDefaultBrowser: true,
),
),
);
} catch (e) {
debugPrint(e.toString());
}
}