Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 맥
- Code
- Firebase
- iOS16
- Git
- geofencing
- appstore
- error
- Session
- darkmode
- 개발자
- MacOS
- Xcode
- IOS
- github
- 웹뷰
- UIButton
- window
- Realm
- rxswift
- FLUTTER
- Apple
- SwiftUI
- Swift
- shorebird
- Archive
- 한글
- mac
- 이미지
- JPA
Archives
- Today
- Total
EEYatHo 앱 깎는 이야기
Flutter ) Kotlin 코드 호출할 때 파라미터 넘기기 - EEYatHo Flutter 본문
Flutter/Native 코드 호출
Flutter ) Kotlin 코드 호출할 때 파라미터 넘기기 - EEYatHo Flutter
EEYatHo 2022. 10. 28. 16:52
Flutter -> Kotlin 전달
static const platform = MethodChannel('channelName');
var result = await platform.invokeMethod('methodName', <String, dynamic>{'param1': [1, 2], 'param2': "stringParam"});
Kotlin 에서 수신
flutterEngine?.dartExecutor?.let {
MethodChannel(it, 'channelName').setMethodCallHandler { call, result ->
if (call.method == "methodName") {
val param1 = call.argument<ArrayList<Int>>("param1")?.toIntArray
val param2 = call.argument<String>("param2")
}
}
}

'Flutter > Native 코드 호출' 카테고리의 다른 글
| Flutter ) java.util.ArrayList - EEYatHo Flutter (0) | 2022.10.28 |
|---|---|
| Flutter ) Kotlin 코드 호출 - EEYatHo Flutter (0) | 2022.10.28 |
Comments