parse-community / Parse-SDK-Flutter

The Dart/Flutter SDK for Parse Platform
https://parseplatform.org
Apache License 2.0
575 stars 188 forks source link

support angular dart #110

Closed WahdanZ closed 4 years ago

WahdanZ commented 5 years ago

it will be useful if it supports angular dart, so is there any planning to support it.

phillwiggins commented 5 years ago

We potentially could and is being considered. At the moment we rely on shared_preferences which is Flutter dependant. We could swap this with a NoSQL library I am testing but haven't had time to implement yet.

Do you have any time to assist me with this?

On Sat, Mar 9, 2019, 18:05 Ahmed Wahdan notifications@github.com wrote:

it will be useful if it supports angular dart, so is there any planning to support it.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/phillwiggins/flutter_parse_sdk/issues/110, or mute the thread https://github.com/notifications/unsubscribe-auth/AHgn3hb0fU-r1PM9MkdJ-AdPs8p2pknMks5vU_f3gaJpZM4bm0T- .

WahdanZ commented 5 years ago

yes for sure I'm going to use it on a project and I need to support flutter and angular dart

WahdanZ commented 5 years ago

I found this one https://pub.dartlang.org/packages/sembast but I think it will be easy to replace shared_preferences with it but when I try to do this I found another flutter dependances like package_info I think we could separate parse client support dart VM and for flutter, we could like installation, and push notification in another module. because for the push notification if you are going to support it, it will require platform channel

phillwiggins commented 5 years ago

Hey Ahmed,

Your correct in suggesting Sembast, I'm using that in the example project in the repository layer at the moment, it does seem like a possible solution. At the moment, I just haven't had time to implement it.

That's great suggestion with regards to separating packages. I will look into that too, and possible release it as 2 libraries.

Do you have any experience in this type of work? I could definitely use some help?

WahdanZ commented 5 years ago

I don't have much experience in Dart, but I have experience in Android and iOS, I will try to do some investigation on that and back for you

WahdanZ commented 5 years ago

i think this article is useful https://www.toptal.com/cross-platform/code-sharing-angular-dart-flutter-bloc

phillwiggins commented 5 years ago

Hey

Thanks for the article. It's not quite related. That's an explanation to the BLoC pattern, which if your familiar with Android Arch, is extremely similar to Android ViewModel & LiveData.

I can look into this, no worries. I'll probably take so e time but it will be done. I'm working on the release/1.0.17 branch at the moment if you want to keep up to date.

On Sat, Mar 30, 2019, 12:04 Ahmed Wahdan notifications@github.com wrote:

i think this article is useful https://www.toptal.com/cross-platform/code-sharing-angular-dart-flutter-bloc

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/phillwiggins/flutter_parse_sdk/issues/110#issuecomment-478239524, or mute the thread https://github.com/notifications/unsubscribe-auth/AHgn3u7rmdsLJZlbLvZaxYDiKdhH8Jp1ks5vb1LEgaJpZM4bm0T- .

WahdanZ commented 5 years ago

yeah I know bloc and used it an inside project, I just talking about the concept and how he split and used the bloc module for both Flutter and angular also for the interface of [preferences_interface](https://github.com/budo385/todo_bloc_app/blob/master/bloc/lib/src/repository/preferences/preferences_interface.dart and ) ,

okay I cloned the repo and I will keep tracing and thanks for your great job

WahdanZ commented 5 years ago

hello I did some modification the code and make parse code depends only on Dart and I test it on Dart VM and web and it works successfully the only limitation with PraseFile I used sembast as database also I make optional to chose I database you want to depend on shared_preferences or and kind of db just implement the interface and implement DB class with the way you like.

phillwiggins commented 5 years ago

Are you able to create a pull request with some code we can use? I've not had a chance to work on this project for a couple of weeks.

On Wed, 17 Apr 2019 at 07:57, Ahmed Wahdan notifications@github.com wrote:

hello I did some modification the code and make parse code depends only on Dart and I test it on Dart VM and web and it works successfully the only limitation with PraseFile I used sembast as database also I make optional to chose I database you want to depend on shared_preferences or and kind of db just implement the interface and implement DB class with the way you like.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/phillwiggins/flutter_parse_sdk/issues/110#issuecomment-483961952, or mute the thread https://github.com/notifications/unsubscribe-auth/AHgn3tmwlf1TkTmHJ2Pu2PgPVcWGdpnoks5vhsXxgaJpZM4bm0T- .

-- Kind Regards

Phill Wiggins Phill.Wiggins@Gmail.com

WahdanZ commented 5 years ago

yes I will clean and organize the code and make pull request ASAP maybe at the end of the week

phillwiggins commented 5 years ago

Perfect, thank you!

On Wed, Apr 17, 2019, 09:27 Ahmed Wahdan notifications@github.com wrote:

yes I will clean and organize the code and make pull request ASAP maybe at the end of the week

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/phillwiggins/flutter_parse_sdk/issues/110#issuecomment-483988912, or mute the thread https://github.com/notifications/unsubscribe-auth/AHgn3sj334tvjXoa4RsVyfr8L76c3Raeks5vhtr7gaJpZM4bm0T- .

rostopira commented 5 years ago

I think Flutter Web is a better option and requires less work to be done It's merging in flutter master branch already, I was able even to run some simple project shared_preferences can be easily ported to flutter web in 30 minutes or so

WahdanZ commented 5 years ago

I try to test the SDK on sample flutter web app, but it's doesn't work because it depends on some platform channel, that's not supported on flutter web below the errors that I got You have a dependency on flutter which is not supported for flutter_web tech preview. See https://flutter.dev/web for more details. You have a dependency on path_provider which is not supported for flutter_web tech preview. See https://flutter.dev/web for more details. You have a dependency on shared_preferences which is not supported for flutter_web tech preview. See https://flutter.dev/web for more details.

rostopira commented 5 years ago

@WahdanZ I weren't expecting interest in it, but well Current flutter web manual doesn't expect using master branch, but a fork To run using flutter web from master you have to

  1. Create web directory with index.html in it:
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title></title>
    <script defer src="main.dart.js" type="application/javascript"></script>
    </head>
    <body>
    </body>
    </html>
  2. Run export FLUTTER_WEB=true (lin/mac, dunno what to use in windows)
  3. Check that web device appeared in flutter devices
  4. Run flutter run -d web
phillwiggins commented 5 years ago

There's not been much movement on this recently. Are we safe to close?

fischerscode commented 4 years ago

I am now closing this. Feel free to reopen if there is still a problem.