Link Kotlin class to Flutter project

I have a ready-made Kotlin multi-platform library project that performs all the business logic

and initializes platform players.

Accordingly, I compile two libraries: the IOS framework and the APK for Android.

It has functions (including methods of class instances) that return objects as a result.

How can I project these objects to a Dart object?

If I implement a Dart class, with matching fields,

and, via MethodChannel, return the field values ​​in a byte array and then deserialize

into the fields of the Dart class, is there any problem if I initialize each new Dart object

with its own MethodChannel instance? After all, the names of the channels will be the same in each copy

 of this object. Calling methods of the native object instance can also be implemented

 through an instance of MethodChannel initialized in each instance of the Dart class whose names

 will also be the same.

 This is quite painstaking work. Maybe someone will suggest another, easier option.


1 Reply

HK Hariharasudhan Kanagaraj Syncfusion Team October 3, 2023 09:24 AM UTC

Hi Soul Psevdo,


As the query mentioned is general, we suggest you contact the Flutter community through the below link.

Flutter Community - https://flutter.dev/community.


Regards,

Hari Hara Sudhan. K.


Loader.
Up arrow icon