fix(ui): fix file download
This commit is contained in:
+2
-2
@@ -10,8 +10,8 @@ class Application : FlutterApplication(), PluginRegistrantCallback {
|
||||
super.onCreate()
|
||||
}
|
||||
|
||||
override fun registerWith(registry: PluginRegistry?) {
|
||||
PathProviderPlugin.registerWith(registry?.registrarFor(
|
||||
override fun registerWith(registry: PluginRegistry) {
|
||||
PathProviderPlugin.registerWith(registry.registrarFor(
|
||||
"io.flutter.plugins.pathprovider.PathProviderPlugin"))
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,10 @@ import 'package:url_launcher/url_launcher.dart';
|
||||
/// Launch URL
|
||||
Future<void> launchURL(BuildContext context, String url) async {
|
||||
try {
|
||||
await launchUrl(Uri.parse(url).withScheme);
|
||||
await launchUrl(
|
||||
Uri.parse(url).withScheme,
|
||||
mode: LaunchMode.externalApplication,
|
||||
);
|
||||
} catch (e) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(context.translations.launchUrlError)),
|
||||
|
||||
Reference in New Issue
Block a user