InitClient<InitParams> typedef

InitClient<InitParams> = Future<TypedLinkWithCacheAndRequestController> Function(InitParams params, SendPort? sendMessageToMessageHandler)

a top-level or static function, which asynchronously creates a ferry client, given a some params. the messageMainPort can be used to send arbitrary messages from the isolate to main from example for token refresh. You can also create a ReceivePort here and send its sendPort to the messageHandler for establishing a two-way communication. if you don't pass a messageHandler, the sendMessageToMessageHandler SendPort will be null.

Implementation

typedef InitClient<InitParams> = Future<TypedLinkWithCacheAndRequestController>
    Function(
  InitParams params,
  SendPort? sendMessageToMessageHandler,
);