flutter-ml / google_ml_kit_flutter

A flutter plugin that implements Google's standalone ML Kit
MIT License
990 stars 747 forks source link

Use platform_interface #687

Closed alihassan143 closed 1 month ago

alihassan143 commented 1 month ago

Describe your issue. If applicable, add screenshots to help explain your problem.

Currently, the latest version of Firebase is causing compatibility issues with Google ML Kit because both use different versions of the Google Data Transport library. To resolve this:

•   Use the [Path Provider](https://github.com/flutter/packages/tree/main/packages/path_provider) package like path_provider_platform_interface.
•   For Android, you can use the google_mlkit_android package.
•   For iOS, use the google_mlkit_ios package.

This approach avoids version conflicts and simplifies future development, as you don’t need to do anything else for platform-specific dependencies.

Steps to reproduce.

flutter

What is the expected result?

new version

Did you try our example app?

Yes

Is it reproducible in the example app?

Yes

Reproducible in which OS?

iOS and Android

Flutter/Dart Version?

latest

Plugin Version?

latest

bensonarafat commented 1 month ago

Is this just iOS or both iOS and Android ?? @alihassan143

alihassan143 commented 1 month ago

just move android and ios side code into different packages and using platform interface we can interconnect the both packages and ship as one with this developer can only use mlkit_android for android and mlkit ios for ios and one developer want to use mlkit than he can use that which contain both plugins

bensonarafat commented 1 month ago

duplicate here

alihassan143 commented 1 month ago

kindly don't close it feature related request

alihassan143 commented 1 month ago

we need to change the structure of the plugin system just to make them more compatible that if developer don't want to use one platform side things he can do that

alihassan143 commented 1 month ago
Screenshot 2024-10-01 at 8 29 23 PM Screenshot 2024-10-01 at 8 29 45 PM
alihassan143 commented 1 month ago

just like that

Screenshot 2024-10-01 at 8 30 20 PM

we can connect them using this