Yogesh
Yogesh

Reputation: 343

Skipping compiling flutter_web|web/main.dart] because some of its libraries have sdk dependencies that not supported on this platform

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!!

Upvotes: 0

Views: 502

Answers (1)

Richard Heap
Richard Heap

Reputation: 51751

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.)

Upvotes: 2

Related Questions