flutter-form-builder-ecosystem / phone_number

Flutter plugin for parsing, formatting and validating international phone numbers.
https://pub.dev/packages/phone_number
BSD 3-Clause "New" or "Revised" License
81 stars 63 forks source link

Critical: Migration to Federated Plugin [Action plan] #86

Open iamsahilsonawane opened 2 years ago

iamsahilsonawane commented 2 years ago

Description

Firstly, before implementing web support for the plugin. It needs platform separation.

The main package should be platform agnostic. Three different platform-specific packages need to be created instead, along with the platform interface.

So the new package structure should be:

@deandreamatias I need your help here. You can create those remaining repositories on flutter-form-builder-ecosystem.

Roadmap:

  1. Create required subdivision folders
  2. Working out platform interface
  3. Migrating old platform code to platform-specific repos.
  4. Testing (Android, iOS)
  5. Merging the changes into main in actual phone_number repo.
  6. Publishing (platform-specific -> unlisted packages) (@deandreamatias)
iamsahilsonawane commented 2 years ago

We need to do this before web support. It will benefit very much in the long run.

For more information: Article

deandreamatias commented 2 years ago

I agree with almost with exception of create new repositories. We can create new folder for each package, like flutter plugins.

And all work about web support, I would move to existent issue #44

We need use this official doc to this process (that include your linked Article)

deandreamatias commented 2 years ago

https://fluttervikings.com/power-of-federated-plugins-in-flutters-ecosystem

iamsahilsonawane commented 2 years ago

@deandreamatias Let's start on this soon.

deandreamatias commented 1 year ago

Maybe can reuse this package https://pub.dev/packages/libphonenumber_plugin

deandreamatias commented 1 year ago

Take a look on this discussion. I think that we need think more about the maintain of this package

https://github.com/natintosh/intl_phone_number_input/discussions/201#discussioncomment-5743946

VictorUvarov commented 1 year ago

How much effort is involved in migrating this plugin to a federated plugin? I would definitely also use pigeon to generate the native code bindings

deandreamatias commented 1 year ago

I don't know if make sense still maintain this plugin. Had some other solutions with the same functionality like:

I wrote about this, here https://github.com/acoutts/flutter_libphonenumber/issues/44 and here https://github.com/natintosh/intl_phone_number_input/discussions/201#discussioncomment-5743946

Also, I don't have time to support this plugin.