launchWithCustomAnimation method
Future<void>
launchWithCustomAnimation(
{ - required String url,
- bool showTitle = false,
})
Implementation
Future<void> launchWithCustomAnimation({ required String url, bool showTitle = false }) async {
final theme = Theme.of(Get.context!);
try {
await launchUrl(
Uri.parse(url),
customTabsOptions: CustomTabsOptions(
urlBarHidingEnabled: false,
colorSchemes: CustomTabsColorSchemes.defaults(
toolbarColor: theme.colorScheme.surface,
),
showTitle: showTitle,
animations: CustomTabsSystemAnimations.fade(),
),
safariVCOptions: SafariViewControllerOptions(
barCollapsingEnabled: false,
preferredBarTintColor: theme.colorScheme.surface,
preferredControlTintColor: theme.colorScheme.onSurface,
modalPresentationStyle: ViewControllerModalPresentationStyle.automatic,
),
);
} catch (e) {
debugPrint(e.toString());
}
}