launchURL function

Future<void> launchURL({
  1. required LegalType legalType,
})

Opens the URL associated with legalType in an external browser or app.

Throws an ExternalLaunchException if the URL cannot be launched — for example, if no application on the device can handle the URL scheme.

Implementation

Future<void> launchURL({required LegalType legalType}) async {
  final Uri uri = Uri.parse(legalType.url);

  await _launchExternalUri(uri, action: 'launch_url', mode: LaunchMode.externalApplication);
}