You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support overriding the implementation of a federated plugin #59657
For devices, without GMS we want to override the default implementation of packages like firebase_auth.
To achieve this we want to implement the firebase_auth_platform_interface and use our custom class.
We thought something like this should be possible:
pubspec.yaml
dependencies:
firebase_auth: any
firebase_auth_android_rest: any
And because the Flutter tool knows that firebase_auth_android_rest provides a custom implementation of the firebase_auth_platform_interface/firebase_auth package, it uses firebase_auth_android_rest and not firebase_auth for Android.
What this issue is referring to is overriding implementations of federated plugins. The main pubspec.yaml of a federated plugin specifies the packages that create the platform implementations.
This means that if you want to only override say the Android implementation of a federated plugin, you need to override the main package as well.
What this issue is referring to is overriding implementations of federated plugins. The main pubspec.yaml of a federated plugin specifies the packages that create the platform implementations.
Yes, you can override dependencies of dependencies
creativecreatorormaybenot commented on Jul 11, 2020
@jonahwilliams Of course, but you cannot supply a different package for federated plugins (which is what this issue attempts to describe).
Our use case is the following: we created the firebase_rest_auth plugin and this is supposed to be an Android replacement for the firebase_auth plugin.
If you take a look at the installing guide, you will hopefully see what I mean 🙂
We want to offer a Pub package that only replaces a platform implementation of a federated plugin, however, that is currently not possible without overriding the actual plugin package.
Even if we wanted to override the web implementation, which is in a separate package by default, we cannot do that with a different package.
The only possible way would be a dependency override of firebase_auth_web, however, we cannot publish that on Pub because that obviously already exists.
The section in the document @IchordeDionysos linked seems to indicate that replacing platform implementations should be supported - that is what this issue is about.
I hope I was able to explain the issue better now 😄
changed the title [-]Support overriding the default implementation of a package[/-][+]Support overriding the implementation of a federated plugin[/+]on Jul 11, 2020
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
jonahwilliams commentedon Jul 11, 2020
This can already be done via pub
dependency_overrides: https://dart.dev/tools/pub/dependencies#dependency-overridescreativecreatorormaybenot commentedon Jul 11, 2020
@jonahwilliams No, it cannot - unfortunately.
What this issue is referring to is overriding implementations of federated plugins. The main
pubspec.yamlof a federated plugin specifies the packages that create the platform implementations.This means that if you want to only override say the Android implementation of a federated plugin, you need to override the main package as well.
jonahwilliams commentedon Jul 11, 2020
Yes, you can override dependencies of dependencies
creativecreatorormaybenot commentedon Jul 11, 2020
@jonahwilliams Of course, but you cannot supply a different package for federated plugins (which is what this issue attempts to describe).
Our use case is the following: we created the
firebase_rest_authplugin and this is supposed to be an Android replacement for thefirebase_authplugin.If you take a look at the installing guide, you will hopefully see what I mean 🙂
We want to offer a Pub package that only replaces a platform implementation of a federated plugin, however, that is currently not possible without overriding the actual plugin package.
Even if we wanted to override the web implementation, which is in a separate package by default, we cannot do that with a different package.
The only possible way would be a dependency override of
firebase_auth_web, however, we cannot publish that on Pub because that obviously already exists.The section in the document @IchordeDionysos linked seems to indicate that replacing platform implementations should be supported - that is what this issue is about.
I hope I was able to explain the issue better now 😄
[-]Support overriding the default implementation of a package[/-][+]Support overriding the implementation of a federated plugin[/+]jonahwilliams commentedon Jul 11, 2020
Updated the issue to be clear that this is an issue specifically for federated plugins
1 remaining item
feat: Support overriding native endorsed plugins (#137040)
creativecreatorormaybenot commentedon Jul 11, 2024
🥳
github-actions commentedon Jul 25, 2024
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.