fix: android channel invoke

This commit is contained in:
lollipopkit🏳️‍⚧️
2025-09-09 13:30:37 +08:00
parent e70abeef04
commit 98e13c39cf

View File

@@ -155,7 +155,7 @@ class MainActivity: FlutterFragmentActivity() {
override fun onReceive(context: Context?, intent: Intent?) {
if (intent?.action == ACTION_STOP_ALL_CONNECTIONS && ::channel.isInitialized) {
try {
channel.invokeMethod("stopAllConnections")
channel.invokeMethod("stopAllConnections", null)
} catch (e: Exception) {
android.util.Log.e("MainActivity", "Failed to invoke stopAllConnections: ${e.message}")
}