0

I am working on flutter web for some application. I am using grpc for some service requests. While running only dart client program I can fetch data. But when using with my application it shows the following error.

build_web_compilers:entrypoint on web/main.dart: Skipping compiling flutter_web_app|web/main.dart with ddc because some of its transitive libraries have sdk dependencies that not supported on this platform:

grpc|lib/src/client/transport/http2_credentials.dart
grpc|lib/src/client/http2_connection.dart
grpc|lib/src/server/server.dart
grpc|lib/src/shared/security.dart
http2|lib/transport.dart
http2|lib/src/hpack/huffman.dart
http2|lib/src/hpack/hpack.dart
http2|lib/src/async_utils/async_utils.dart
googleapis_auth|lib/src/oauth2_flows/metadata_server.dart
googleapis_auth|lib/src/oauth2_flows/auth_code.dart

Can anyone resolve this issue?

Thankyou!!

1 Answer 1

2

They rely on dart:io which isn't available when targeting web. You'll need to use a web-based grpc client. If one doesn't already exist, you need to make a plugin to interface with the native code. (Unlike traditional plugins where you use Kotlin and Swift, you write the 'native' code in Dart when targeting web.)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.