markInitCalled method

Future<void> markInitCalled()

You only need to call this method when you call init method in native side instead of Dart side.

Implementation

Future<void> markInitCalled() async {
  await FWMethodChannelUtil.getFirewokSDKChannel().invokeMethod(
    FireworkSDKNativeMethodName.markInitCalled.name,
  );

  final shoppingInitNativeMethodName = ShoppingNativeMethodName.init.name;
  await FWMethodChannelUtil.getShoppingChannel().invokeMethod(
    shoppingInitNativeMethodName,
  );

  final liveStreamInitNativeMethodName = LiveStreamNativeMethodName.init.name;
  await FWMethodChannelUtil.getLiveStreamMethodChannel()
      .invokeMethod(liveStreamInitNativeMethodName);

  FWGlobalState.getInstance().completeSdkInitCalledFuture();
}