google / google/googleapis.dart
[googleapis_auth] support running both io and browser in the same app
- Dominant language
- Dart
- Stars
- 419
- Forks
- 136
- Avg merge
- 1h 21m
- Merged PRs (30d)
- 5
Description
i would like to share a proposal for adding new apis that do nothing but make sure that io and browser parts can work together.
i am not an expert on the matter but with trial and error i got to know about the if directive thing in dart.
my use case is an app that has google sign in, i want it to work on desktop and web simultaneously.
the problem is that i am not able to run the code when i import web things to io host and vice versa. this is understandable since they are not made for each other.
i would like to add `fake apis`, if that is a thing, that mimic apis that are not found in io and browser together.
i would also add it to the README so that is so clear how to use it since you will need to use `kIsWeb` to make sure the compiled code runs.
i know this is unsafe in runtime if the developer forgets about `kIsWeb`, but that is my proposed solution.
if you have a better one share it so we can reach a solution.
i can open a PR so we can discuss the possibilities
Contributor guide
Assessment
This issue has not been assessed yet.