when<HostPlatformTypeResult extends Object?> method
HostPlatformTypeResult
when<HostPlatformTypeResult extends Object?>({
- required HostPlatformTypeResult io(),
- required HostPlatformTypeResult web(),
Run callback on specific host platform
Implementation
HostPlatformTypeResult when<HostPlatformTypeResult extends Object?>({
required HostPlatformTypeResult Function() io,
required HostPlatformTypeResult Function() web,
}) =>
this == HostPlatformType.web ? web() : io();