GameWebViewHost constructor

const GameWebViewHost({
  1. Key? key,
  2. required GameURLPolicy policy,
  3. required String html,
  4. required GameBridge bridge,
  5. required GameBridgeSession createSession(
    1. void send(
      1. String json
      )
    ),
  6. required String sdkVersion,
  7. required void onViewport(
    1. double width,
    2. double height,
    3. GameSafeArea safeArea,
    4. double keyboardInset,
    ),
  8. required void onDevice(
    1. GameDeviceInfo info
    ),
  9. required VoidCallback onShown,
  10. required void onFailure(
    1. GameFailureReason reason
    ),
  11. required void onUserClose(
    1. String json
    ),
  12. required void onForeground(
    1. bool foreground
    ),
  13. bool showMute = false,
  14. bool showClose = true,
  15. void onMuteChanged(
    1. bool muted
    )?,
})

Implementation

const GameWebViewHost({
  super.key,
  required this.policy,
  required this.html,
  required this.bridge,
  required this.createSession,
  required this.sdkVersion,
  required this.onViewport,
  required this.onDevice,
  required this.onShown,
  required this.onFailure,
  required this.onUserClose,
  required this.onForeground,
  this.showMute = false,
  this.showClose = true,
  this.onMuteChanged,
});