Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use grpc for mobile and grpc-web for browser #1

Open
yehudamakarov opened this issue Jan 9, 2022 · 0 comments
Open

How to use grpc for mobile and grpc-web for browser #1

yehudamakarov opened this issue Jan 9, 2022 · 0 comments

Comments

@yehudamakarov
Copy link

I saw your comment here about using grpc in flutter.

My goal is to have one codebase, deploy it to mobile and browser, and still use grpc. Since grpc-web is the only option for the browser, I'm wondering if I can use both.

I understood this is what you meant by

That means to have a program working in both mobile and web you need to do a conditional import in a file for obtaining a GrpcChannel object.

When you say conditional import, do you mean: what is mentioned in this post?

And would that mean this code in your example would need to be adjusted?

I'm new to flutter and dart and trying to see if this is possible before beginning a project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant