Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

Dart / Flutter Support #55

Closed
johnpryan opened this issue Nov 23, 2016 · 154 comments
Closed

Dart / Flutter Support #55

johnpryan opened this issue Nov 23, 2016 · 154 comments

Comments

@johnpryan
Copy link

johnpryan commented Nov 23, 2016

Flutter is a new way to build cross-platform mobile apps using Dart.

It would be great to see a native implementation of Realm for Dart and Flutter. Flutter has access to the dart:io package, which should provide everything necessary to write a native library for Realm.

How much effort / public demand take to get an official client?

Thanks!

@bmunkholm
Copy link
Contributor

Hi @johnpryan,
It would have to be a native extension that uses our realm-core written in C++. The effort required is substantial as we aim for a very idiomatic experience with all the SDKs we write. I havn't done any Dart extensions, so I'm not aware how simple it is, but you can judge the complexity by looking at realm-cocoa or other SDKs we have.
It's hard to give an indication of what interest is needed to get us to prioritize this, but it has to be "significant".
So we can start with encouraging people to +1 this issues (please do that with emoji and not new comments) .

@timahrentlov
Copy link

Is flutter support incoming?

@lukaspili
Copy link

This is now the most upvoted feature request on the github tracker 😃

@hundeva
Copy link

hundeva commented Feb 7, 2018

I would just like to bring up this issue once again, since I think Realm would fit the reactive style of Flutter amazingly. Flutter matures day by day, and while there are now a few decent solutions, it still misses a great storage option, with which I'm willing to commit. Realm could be the one.

@bmunkholm
Copy link
Contributor

It would, of course, be very fluttering to become the chosen one 🥇 ....
Unfortunately, the effort is still significant and we would probably want to see Flutter come out of alpha at least and have a significant adoption before the effort can be justified. Alternatively, have the community step in and help build it.

@hundeva
Copy link

hundeva commented Feb 7, 2018

I understand where you are coming from (and unfortunately even agree :) ). For a good while now, I hope that Google is going to show really soon a real piece of hardware which is going to run Fuchsia, and that Flutter is indeed going to be the first class citizen for that. I think that could shake up the otherwise pretty stale mobile development. But that is just me thinking out loud...

@johnpryan
Copy link
Author

I think a lot of mobile developers are switching to Flutter. It just surpassed 10k stars on Github (in the realm-cocoa ballpark.) Is there a specific feature or milestone you would like to see Flutter support first?

@hundeva
Copy link

hundeva commented Feb 8, 2018

I think "switching" is a strong word. I'd rather say, more and more people are now actively following Flutter, and keeping a closer look. I mean, there are still quite a few reasons why it is not yet production ready for the majority (one reason might be the lack of a great storage option).

Realistically, if we are talking milestones, I'd expect things to really change and improve once Flutter moves to beta by completing the current (3rd) milestone.

@renefloor
Copy link

Last year the Flutter team pushed quite a bit of breaking changes just before the IO and Flutter got some attention on the IO. My guess would be that they try to reach beta stage before the IO and Flutter could grow after that, but we'll have to wait and see.

@PierBover
Copy link

Realistically, if we are talking milestones, I'd expect things to really change and improve once Flutter moves to beta by completing the current (3rd) milestone.

Flutter just moved to beta.

https://medium.com/flutter-io/announcing-flutter-beta-1-build-beautiful-native-apps-dc142aea74c0

@johnpryan
Copy link
Author

johnpryan commented Feb 27, 2018

Last year the Flutter team pushed quite a bit of breaking changes

@renefloor Are there specific breaking changes you are thinking of? Most of the breaking changes are (AFAICT) related to the higher-level pieces like UI and the material library. Dart 2 makes some small changes to the language but I don't think that should inhibit progress on a Realm plugin for Flutter.

Typescript goes through many changes but that doesn't slow down progress for projects like realm-graphql.

@hundeva
Copy link

hundeva commented Feb 27, 2018

Just to note, the enforcement of strong mode (thank god for that) in Dart 2 broke a decent amount of code, albeit those errors are usually easy to fix.

Anyway, with Flutter moving to beta, Dart moving to Dart 2, I really hope things will start to pick up some serious pace. Hopefully, we will see some interesting stuff at IO '18. 🤞

@renefloor
Copy link

@johnpryan I don't think this is really the place to discuss that (as it is not realm related), but there where mainly changes in naming so everything followed the same convention. Especially last winter there where bigger changes in how you could interact with the platform (Android/iOS). You can see some of these in the mailinglist, mostly around april last year. In my experience since last I/O the API is pretty stable. Dart 2 is not really breaking for most of the code.

@MarkOSullivan94
Copy link

Is there anyway people can contribute to help get Realm for Dart / Flutter?

@garretyoder
Copy link

Flutter is now out of alpha and in beta. Is this something we can look at doing now? It seems from here on out they're going to do monthly updates and try to avoid breaking changes.

@renefloor
Copy link

@bmunkholm You talk about binding the C++ realm-core. Currently Flutter apps that want to use C++ code have to go through Java / Objc-C of Android / iOS. I guess that it would be easier to go directly to C++. If this is the case we could at least upvote this Flutter issue: flutter/flutter#7053

@bmunkholm
Copy link
Contributor

Yeah going through JNI is wasteful/slow enough in itself for Java. Going through JNI and back again to call C++ code from C++ is ......

@charlesburks
Copy link

+1 How can we get an update on Realm for Flutter?

@wendrawang
Copy link

+1 Still waiting for Realm for Flutter

@rodydavis
Copy link

Realm + Flutter = ❤️

@MarkOSullivan94
Copy link

have the community step in and help build it.

I'd love to see a community movement to help implement Realm for Flutter but I would have no idea where to start myself and would need a lot of guidance, coming from an Android background the best way for me to get my head around it would be perhaps to look at realm-java but I have no idea how that links up with realm-core.

Is there any chance the Realm team could provide some documents on how all the SDKs link with Realm Core? Means we can have people from a wide variety of backgrounds with an interest in Flutter being able to contribute.

Perhaps with enough guidance, we can make a start on making this possible.

@rodydavis
Copy link

I agree if there was some documentation I could help build the iOS side of the plugin.

@cjarman
Copy link

cjarman commented May 19, 2018

Has there been any comment from the Realm team? A lack of Realm support is the only stopper I have before embracing Flutter. All else is good to go, although the lack of support for including a C-library directly is a hinderance.

@aryunaabhay
Copy link

aryunaabhay commented May 24, 2018

Just in case @bmunkholm, flutter has reached Beta 3 stage and that version has been marked as ready for production. https://flutter.io

@lukaspili
Copy link

I guess everyone is still waiting on: flutter/flutter#7053

@bmunkholm
Copy link
Contributor

@lukaspili Yes that's a prerequisite for sure.

@ChaseGuru
Copy link

Yeah I already mentioned Hive. Haven't seen moor. I think realm is a bit more involved than those projects, but I do think people are stepping in to try and fill the need.

@de1mat
Copy link

de1mat commented Oct 9, 2020

How do these alternatives help with syncing user data across devices. Or are you using something different for that?

@leecommamichael
Copy link

How do these alternatives help with syncing user data across devices. Or are you using something different for that?

Firebase is probably your only option with Flutter that has out-of-the-box syncing. Personally, I have a service with a database and use moor table-watchers to automatically make requests to push the data up.

@doc-rj-celltrak
Copy link

@de1mat FWIW, we're using AppSync through our own plugin, and we may eventually move to AWS' official Flutter solution, though no idea when DataStore will be done: https://github.com/aws-amplify/amplify-flutter

@allanwolski
Copy link

@jlavyan
Copy link

jlavyan commented Oct 16, 2020

There are also another library only for iOS where used latest mongodb prerelease

https://pub.dev/packages/flutterrealm_light

@mdrideout
Copy link

Not that this thread should turn into a discussion of alternatives, but I've been weighing my options as I patiently await Realm on Flutter.

It appears to me that many solutions for true offline-first performant realtime databases are waiting for some dart improvements for full implementation. Perhaps this is a reason Firestore uses the dumbed-down caching method for offline mode. I would suggest to stick with Firestore until Realm (or AWS's solution) is available, unless you actually need the additional offline-first feature set NOW that firestore doesn't provide. In that case, you either have to build your own sync solution, or use something like couchbase - which in my opinion has a steep learning curve and isn't as well suited to lower-cost simpler apps (compared to how simple Firestore is to implement, and how cheap it is to use on small stuff).

Firestore offline does work very well, but with limited offline querying abilities, and performance degrades if you start queuing up thousands of offline writes.

I've dabbled with Hive and Sembast that manually sync to the cloud - and it's a lot of extra development to build a sync solution that tests well in a wide variety of use cases.

I'm very much looking forward to Realm for some projects I have that require true offline-first implementation (better offline querying and performance for heavy offline data collection).

@ianpward
Copy link

ianpward commented Nov 5, 2020

Hey All, Product from Realm here, we have approved a Dart/Flutter SDK preview. Stay tuned.

@timahrentlov
Copy link

Woot!

@sultanmyrza
Copy link

@ianpward have initial repo for Real Dart/Flutter SDK?

@hardiksachan
Copy link

@ianpward when is it going to be released?

@leecommamichael
Copy link

Ian knew to let us know in the thread, he’ll know to announce it here later, let’s give ‘em a break. 😂

@Pushplaybang
Copy link

Can't wait!!

@renefloor
Copy link

Please, for following you don't need to comment and give everybody in this thread a notification. I prefer if everybody keeps this thread clean so people don't have to unfollow this thread when they are sick of notifications.

It is great news that the realm team is working on a Flutter implementation and let's all wait patiently.

If you want to follow this thread, just subscribe with the button:
image

@rolkon
Copy link

rolkon commented Jan 5, 2021

Hello! Don't know if this is a bit off-topic, but I just found a rather recent (unofficial) mongodb realm plugin for flutter:
https://pub.dev/packages/flutter_mongodb_realm

@thomas4Bitcraft
Copy link

Any updates?

@adrianvintu
Copy link

4 years and still no implementation? How many customers and $$$ have they lost already?!

@ianpward
Copy link

Soon. Soon. Keep an eye on our next newsletter

@saeed-golshan
Copy link

Hi @ianpward why you are not working officially Realm project but say about soon newsletter? Is your project third party library?

@cedvdb
Copy link

cedvdb commented Mar 30, 2021

@saeed-golshan he said he was the product manager

@saeed-golshan
Copy link

saeed-golshan commented Mar 31, 2021

Ok I found him on this issue answer. I think that will introduce in MongoDB.live conference July 13–14, 2021

@listepo
Copy link

listepo commented Apr 1, 2021

It happened realm-dart

@saeed-golshan
Copy link

saeed-golshan commented Apr 1, 2021

It's appeared but in preview mode with some config needed and just local realm but make us happy

@SatyamKr07
Copy link

Just a question... Is this unofficial realm package https://pub.dev/packages/flutter_mongodb_realm worth it? And can't the official realm dart team take the help of this package in some way ?

@ianpward
Copy link

ianpward commented Apr 7, 2021

Hey Folks -

We've recently released the Alpha of our Flutter SDK here -
https://github.com/realm/realm-dart

Please try it out and let us know what you think!

-Ian

@ianpward ianpward closed this as completed Apr 7, 2021
@alexvinidiktov
Copy link

alexvinidiktov commented Apr 7, 2021 via email

@RandalSchwartz
Copy link

RandalSchwartz commented May 16, 2021

Has the need to patch to the Dart engine been removed, been completed, or is still under consideration by the Dart team? Is there a tracking issue on dartlang/sdk somewhere?

@bmunkholm
Copy link
Contributor

We are working on implementing an FFI implementation to replace the current alpha version. That will eventually include sync. You can better follow the progress in the https://github.com/realm/realm-dart repo, so I'm going to lock this issue to direct any issues there. Thanks!

@realm realm locked and limited conversation to collaborators May 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests