static Future<void> openUri(String? url) async { if (await canLaunch(url!)) { await launch(url); } else { Future.error('Could not launch $url'); } }