Created
June 22, 2016 17:54
-
-
Save chinmaygarde/d778498418e30825d687147b79d070eb to your computer and use it in GitHub Desktop.
Example usage of connecting to the URI launcher and launching a URI.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/services.dart'; // for shell | |
import 'package:sky_services/flutter/platform/uri_launcher.mojom.dart' as mojo; | |
static mojo.UriLauncherProxy _initLauncherService() => | |
shell.connectToApplicationService( | |
mojo.UriLauncher.serviceName, | |
mojo.UriLauncher.connectToService); | |
static mojo.UriLauncherProxy _launcherService = _initLauncherService(); | |
void launchURI() { | |
Future.wait(<Future<bool>>[_launcherService.launch("http://flutter.io")]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment