일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Xcode
- Archive
- Apple
- rxswift
- Swift
- Code
- UIButton
- JPA
- darkmode
- error
- 이미지
- Firebase
- Session
- Realm
- iOS16
- FLUTTER
- view
- window
- Notification
- IOS
- 개발자
- appstore
- 한글
- SwiftUI
- Git
- github
- MacOS
- mac
- geofencing
- 웹뷰
- Today
- Total
목록Flutter/Native 코드 호출 (3)
EEYatHo 앱 깎는 이야기
코틀린 코드 호출 포스팅 Flutter -> Kotlin 전달 static const platform = MethodChannel('channelName'); var result = await platform.invokeMethod('methodName', {'param1': [1, 2], 'param2': "stringParam"}); Kotlin 에서 수신 flutterEngine?.dartExecutor?.let { MethodChannel(it, 'channelName').setMethodCallHandler { call, result -> if (call.method == "methodName") { val param1 = call.argument("param1")?.toIntArray val ..
플러터에서 코틀린에 배열을 전달하게되면, java.uril.ArrayList 로 수신하게 된다. 이를 Kotlin 에서 사용하는 IntArray, LongArray 등으로 바꾸려면 아래처럼 하면 된다. call.argument("IntListName")?.toIntArray()
공식 문서는 비교적 쉽게 따라할 수 있게 작성되어있다. 하지만 따라했는데 작동이 안된다.. 플러터 코틀린 호출 공식 문서 공식 문서가 잘못되서 삽질하면서 수정한 부분을 정리한다. import io.flutter.app.FlutterActivity io.flutter.app.FlutterActivity 는 deprecated 되었다. io.flutter.embedding.android.FlutterActivity 를 사용해야한다. // import io.flutter.app.FlutterActivity import io.flutter.embedding.android.FlutterActivity 이에 따라 registerWith 함수도 다르게 사용해야한다. import io.flutter.plugins.Ge..