acoutts / flutter_libphonenumber

Leverages libphonenumber to allow for asynchronous and synchronous formatting of phone numbers in Flutter apps. Includes a TextInputFormatter to allow real-time AsYouType formatting.
MIT License
59 stars 72 forks source link

Add flutter sdk 3.24 support #81

Open DmitryGaimaldinov opened 4 weeks ago

DmitryGaimaldinov commented 4 weeks ago

Adding compileOptions and kotlinOptions fixes https://github.com/acoutts/flutter_libphonenumber/issues/79. Upgrading compileSdk fixes https://github.com/acoutts/flutter_libphonenumber/issues/78

Similar issues in another libs: https://github.com/OneSignal/OneSignal-Flutter-SDK/issues/930

richardradics commented 4 weeks ago

@DmitryGaimaldinov is it possible to try this branch in my project before it's merged? If I add your branch like this:

  flutter_libphonenumber:
    git:
      url: https://github.com/DmitryGaimaldinov/flutter_libphonenumber.git
      ref: support/flutter_3.24.0

I receive the following error:

Resolving dependencies...
Error on line 1, column 7: "name" field doesn't match expected name "flutter_libphonenumber".
  ╷
1 │ name: flutter_libphonenumber_workspace
DmitryGaimaldinov commented 4 weeks ago

@richardradics this error happens because flutter_libphonenumber uses melos for packaging. Original package from pub dev is in https://github.com/acoutts/flutter_libphonenumber/packages/flutter_libphonenumber directory (internal directory of https://github.com/acoutts/flutter_libphonenumber). And it's name flutter_libphonenumber. At the same time the main repo https://github.com/acoutts/flutter_libphonenumber has name flutter_libphonenumber_workspace.

I've changed build.gradle inside flutter_libphonenumber_android folder but the package refers internally to flutter_libphonenumber_android: ^1.0.2 which will be next version of https://pub.dev/packages/flutter_libphonenumber_android. So it doesn't use flutter_libphonenumber_android from this fork.

If you want to use this fork before merge I've made another branch for you. But I don't suggest using it. It's better to remain on flutter 3.22 and wait for response.

  flutter_libphonenumber:
    git:
      url: https://github.com/DmitryGaimaldinov/flutter_libphonenumber.git
      ref: support/flutter_3.24.0_fork
      path: packages/flutter_libphonenumber
acoutts commented 3 weeks ago

this should be fixed now as of 2.3.1