mobile-sdk icon indicating copy to clipboard operation
mobile-sdk copied to clipboard

Flutter Integration

Open lasyakoechlin opened this issue 4 years ago • 10 comments

Hi,

I was wondering if you had any thoughts on Flutter integration. I was that there was a react-native build at one point, but Flutter supports direct integration with C/C++, as shown below, so I was wondering if that would make it even easier?

https://flutter.dev/docs/development/platform-integration/c-interop https://flutter.dev/docs/development/platform-integration/platform-channels

Any thoughts/suggestions/concerns/recommendations would be much appreciated.

Thanks!

lasyakoechlin avatar Aug 27 '20 17:08 lasyakoechlin

Hi. Flutter has come up a few times, but I can not say there has been a real interest. We provide Xamarin for cross-platform development and that is probably the best documented, most stable and most mature (especially considering dev-tools) cross-platform framework available. Adding another platform would require serious interest from out commercial customers, which is frankly not there.

At technical level having a C/C++ level interop is a necessary requirement but not sufficient. We do all wrapping via custom SWIG build that currently has no support for Flutter. Adding another platform would require a lot of work.

mtehver avatar Aug 31 '20 08:08 mtehver

I successfully use the Carto Mobile SDK in one of my apps. For this purpose I have natively integrated the iOS SDK and the Android SDK and then displayed it via UIKitView or AndroidView and communicate with MChannels between Flutter and the native code.

felixjunghans avatar Sep 10 '20 08:09 felixjunghans

I successfully use the Carto Mobile SDK in one of my apps. For this purpose I have natively integrated the iOS SDK and the Android SDK and then displayed it via UIKitView or AndroidView and communicate with MChannels between Flutter and the native code.

Awesome, how did it behave? Did it feel very similar to the native experience? What version of Carto did you use?

How long did it take to build the wrapper?

lasyakoechlin avatar Oct 30 '20 03:10 lasyakoechlin

Sorry for the late reply. I am using the latest version of Carto (4.3.3).

On newer devices (especially iOS devices) I can't notice any performance difference. Only on older Android smartphones (mainly Android 6) I notice a poor performance especially with Vector maps. I'm not sure how much of this is due to Flutter.

All in all, it works very stable and reliable. In the future I will try to provide a package that makes working with Flutter and the Carto SDK easier.

felixjunghans avatar Jan 12 '21 11:01 felixjunghans

I'm excitedly waiting for you to provide a package. How can we do it? Can you give brief information about it?

mrcnserkan avatar Jan 18 '21 06:01 mrcnserkan

I'm very interested in supporting vector tiles from OSM on Flutter. Currently, we use flutter_plugin - with png files however vector tile will be very very wanted. To be honest I would also prefer to have native Dart implementation comparing to channels to native plugins, so one implementation can work on iOS/Android/Desktop and maybe web. This will simplify a lot of things in development, however, I understand the need of implementing a lot from the scratch.

tajchert avatar Mar 15 '21 12:03 tajchert

@felixjunghans would it be possible for me to get in touch? Your Flutter-Carto wrapper could be very helpful for me. I was in the process of implementing a similar interface; however, I am relatively new to Flutter so it's likely that my implementation would be sub-optimal.

Did you provide a complete wrapper? Or just various core functionalities?

Thanks!

lasyakoechlin avatar Jul 16 '21 11:07 lasyakoechlin

@felixjunghans I am interested in that plugin and waiting for the plugin to be released soon. :)

gemarkalmacen avatar Nov 12 '22 09:11 gemarkalmacen