parse-community / Parse-SDK-Flutter

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

fix: Remove flutter version and add `example` and `example_ui` #852

Closed mbfakourii closed 1 year ago

mbfakourii commented 1 year ago

New Pull Request Checklist

Issue Description

In order to reduce conflicts, it was decided to remove the Flutter version, so the following tasks should be done

Closes: #850

Approach

n/a

TODOs before merging

mbfakourii commented 1 year ago

@mtrezza @Nidal-Bakir

I implemented a new method base dynamics that the flutter tasks can only use the following code. what is your opinion ?

import 'package:parse_server_sdk/src/utils/parse_server_sdk_flutter.dart';
import 'dart:ui' as ui;

main() async {
  Parse().initializeFlutter(
      "appId",
      "serverUrl",
      packageInfo: await PackageInfo.fromPlatform(),
      ui: ui,
      connectivity: await Connectivity(),
      pathProvider: pathProvider,
      coreStore:  await CoreStoreSharedPrefsImp.getInstance(
          sharedPreferences: (await SharedPreferences.getInstance())),
  );
}
mtrezza commented 1 year ago

How does this address the concerns that have been voiced?

mbfakourii commented 1 year ago

How does this address the concerns that have been voiced?

In this method, all the initial values that were in the Flutter version are set with this, we actually support the Flutter version in Dart and also use pure Dart codes dynamic variables are actually dynamic, that's why from the point of view of our library, we are using dynamic variables instead of variables created in Flutter.

mtrezza commented 1 year ago

Ok, I think the biggest concern with this PR is the additional code that developers would need to write to adapt a single dart package to their OS specific APIs. What could we do about that?

mbfakourii commented 1 year ago

Ok, I think the biggest concern with this PR is the additional code that developers would need to write to adapt a single dart package to their OS specific APIs. What could we do about that?

I said above that the best way is to explain line by line, I will create a separate document for this topic

mtrezza commented 1 year ago

Could we go back to what the actual pain point is that led to the idea of merging the 2 packages? Is that pain on the developers' side or on the maintainers' side, or both?

mbfakourii commented 1 year ago

Could we go back to what the actual pain point is that led to the idea of merging the 2 packages? Is that pain on the developers' side or on the maintainers' side, or both?

More side maintainers But developers choose a library with more confidence

mtrezza commented 1 year ago

Could you outline what the current difficulties for maintainers are? Apologies if that has been posted already somewhere.

Also, could we look at how others are solving this? If we look at other SDK providers, what do they offer, 2 packages or only dart or only flutter?

Looking at firebase as an example, they seem to offer:

mbfakourii commented 1 year ago

Could you outline what the current difficulties for maintainers are? Apologies if that has been posted already somewhere.

Also, could we look at how others are solving this? If we look at other SDK providers, what do they offer, 2 packages or only dart or only flutter?

Looking at firebase as an example, they seem to offer:

I got it . I think it is better to close this PR

mtrezza commented 1 year ago

Are you sure? You seem to have put a lot of work into the PR. I'm not suggesting either way, I'm just trying to facilitate the conversation to hopefully reach more of a consensus.

mtrezza commented 1 year ago

I think the best way forward is keeping an open mind and trying to find a consensus. With significant changes like these there's always a risk that concerns will come up later on. That's why we encourage to first have a discussion in the GitHub issue, maybe leave it open for some time to get more voices in, before opening a PR. I've offered to reach out to the community during the issue discussion for that reason.

mbfakourii commented 1 year ago

With your examples from other libraries, I also doubted, after the research I did, I think it is better to have a flutter version

mtrezza commented 1 year ago

Alright, so the conclusion is that the status quo is fine, or can we learn anything from the other packages?

mbfakourii commented 1 year ago

Alright, so the conclusion is that the status quo is fine, or can we learn anything from the other packages?

The current situation is good

mtrezza commented 1 year ago

Got it, well thanks for all the work with the PRs, they were surely helpful in realizing the scope of the change and in coming to a conclusion; and thanks to all others for their input into this discussion.