Skip to content

Instantly share code, notes, and snippets.

Last active June 12, 2021 05:10
What would you like to do?
Unit Testing a Utility function that returns a Widget (Code)
dynamic launchURL(BuildContext context, String url) async {
if (url == 'about:blank') return;
if (url.startsWith('internal://')) {
final isGroups = url.contains('/groups');
if (isGroups) return _handleUnsupported(context);
void _handleUnsupported(BuildContext context) {
context: context,
message: LocalePathUtils.errorsLocalePath('unknownRoute'),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment