flutter-ml / google_ml_kit_flutter

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

Use platform_interface #687

Closed alihassan143 closed 2 hours ago

alihassan143 commented 2 hours 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 2 hours ago

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

alihassan143 commented 2 hours 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 2 hours ago

duplicate here

alihassan143 commented 1 minute ago

kindly don't close it feature related request

alihassan143 commented 1 minute 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