Flutter uses a flexible system that allows you to call platform-specific APIs whether available in Kotlin or Java code on Android, or in Swift or Objective-C code on iOS. A named channel for communicating with platform plugins using asynchronous method calls.
Questions tagged [flutter-method-channel]
146 questions
0
votes
1 answer
Implementing methodChannel in simple headless flutter/dart plugin for Swift app
I'm trying to implement a simple headless dart module that can be run from an iOS function :
Here is the AppDelegate.swift :
import UIKit
import Flutter
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_…

aloys-c
- 51
- 5
0
votes
0 answers
How to invoke Dart code from Kotlin and return result
I want a Kotlin activity to invoke my Dart code using the methodChannel.invokeMethod method. I want to get the result which is passed on the Dart side. Can someone please help me in extracting the result from MethodChannel.Result callback? How to…

Pro
- 445
- 4
- 14
0
votes
0 answers
Android Native AlertDialog/xml file show in flutter using method channel
I want to show my custom-made native android XML alert dialog in flutter using method channel call, I do not want to get the result back to flutter and show a dialog in a flutter, instead, I want to show that native custom-made android XML alert…

Majid
- 175
- 12
0
votes
1 answer
How to invoke dart code from kotlin code?
I have a flutter application where I have written kotlin code and I have set up method channel to communicate. There is a method in kotlin code which is invoked periodically by alarmManager. I want this method to call another method written on the…

Pro
- 445
- 4
- 14
0
votes
0 answers
Flutter app not working after integration with existing native app
I have an existing native iOS App that in production already. Now i want a flutter module to be integrated into the existing app. My flutter module works fine when run individually. I want my native app to call the flutter screen and back to the…

user2903299
- 101
- 2
- 9
0
votes
0 answers
White Screen on open qr_code_scanner: ^1.0.1
I'm openning the scanner of qr_code_scanner plugin and getting a white screen and this error:
E/MethodChannel#flutter/platform_views(27605): Failed to handle method call
E/MethodChannel#flutter/platform_views(27605): java.lang.NullPointerException:…

Rodrigo Reveron
- 1
- 1
0
votes
0 answers
Unable to naviagte to another screen in flutter
I'm trying to take value from the method channel and using the value I'm trying to navigate another screen. When I try to navigate from TextButton onclick it's navigating but when I try to navigate from the value received by the method channel it's…

thinkcode
- 196
- 2
- 9
0
votes
0 answers
Handling method channels in flutter on dart side
I'm trying to handle the method channel call on the dart side. What I expected to happen when calling a constructor was that the program printed sign in!.
What I get instead is
MissingPluginException(No
implementation found for method signIn on…

JRazek
- 191
- 2
- 11
0
votes
1 answer
Run Flutter MethodChannel even if app is closed
I want to run flutter method channel every 5 seconds even if app is closed so what I should do?

bhargav Vagadiya
- 11
- 3
0
votes
1 answer
Flutter how to convert NSData* to Byte* in objc
I am trying to use c++ api with objc native code in flutter.
https://docs.flutter.dev/development/platform-integration/platform-channels?tab=type-mappings-obj-c-tab
flutter documentation says Uint8List should be stored as FlutterStandardTypedData…

Jungwon
- 1,038
- 7
- 20
0
votes
1 answer
Flutter Method Chanel Error java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread
Please Help Me.
My Flutter Plugin Java can't return the list from native android please tell me to resolve it.
I created a flutter plugin to connect to my watch. I created a method Chanel to execute android native SDK, but I am stuck because I can't…

Thananat Rueangchot
- 13
- 3
0
votes
2 answers
how to implement Appl ovin Native Ad in Flutter app
I am using Applovin SDk in my flutter app, Banner and Interstitial is working fine but native. I want you to help me implement the native add. Or share some sort of useful links.
thanks in advance.

Sharyer Ilyas khan
- 31
- 4
0
votes
0 answers
Catching exception from native code (Android) in Flutter
If I throw an Exception in Android, it doesn't not catch it on the flutter side. I am using the MethodChannel to trigger methods on Android. Is there a way to accomplish this?

B0r1
- 400
- 3
- 15
0
votes
0 answers
How to use Flutter MethodChannel from FirebaseMessaging.onBackgroundMessage?
I'm using firebase_messaging onBackgroundMessage handler for listening push messages and it works as expected. Now I want to call platform method from this handler, but I'm unable to do this. MethodChannel can only be registered to Android Activity,…

timukasr
- 135
- 9
0
votes
1 answer
Flutter: It's possible to send data from Android module to Flutter project via MethodChannel without close Activity(Still in Android Activity)?
I have screens.
StoryScreen (from Flutter)
MainActivity (from Android Activity, extend to FlutterActivity)
MainUnityActivity (from Android Activity, extend to AppCompatActivity)
The actually screen is only two, StoryScreen and MainUnityActivity.…

R Rifa Fauzi Komara
- 1,915
- 6
- 27
- 54