Work with our skilled Flutter developers to accelerate your project and boost its performance.
Hire Flutter DevelopersTo open a web browser with a URL in Flutter, you can use the url_launcher package. Here’s how you can do it:
dependencies: url_launcher: ^6.1.14
import 'package:url_launcher/url_launcher.dart';
Future_launchURL() async { final Uri url = Uri.parse('https://flutter.dev'); if (await canLaunchUrl(url)) { await launchUrl(url); } else { throw 'Could not launch $url'; } }
ElevatedButton( onPressed: _launchURL, child: Text('Open Flutter Website'), )
Add this to your Info.plist:
LSApplicationQueriesSchemes https http
Add this to AndroidManifest.xml: