diff --git a/packages/stream_chat_flutter/example/android/app/src/main/kotlin/com/example/example/Application.kt b/packages/stream_chat_flutter/example/android/app/src/main/kotlin/com/example/example/Application.kt index f1bd7610..97b327c1 100644 --- a/packages/stream_chat_flutter/example/android/app/src/main/kotlin/com/example/example/Application.kt +++ b/packages/stream_chat_flutter/example/android/app/src/main/kotlin/com/example/example/Application.kt @@ -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")) } } \ No newline at end of file diff --git a/packages/stream_chat_flutter/lib/src/utils.dart b/packages/stream_chat_flutter/lib/src/utils.dart index 86357803..04800e98 100644 --- a/packages/stream_chat_flutter/lib/src/utils.dart +++ b/packages/stream_chat_flutter/lib/src/utils.dart @@ -9,7 +9,10 @@ import 'package:url_launcher/url_launcher.dart'; /// Launch URL Future 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)),