targetPlatformOf static method
The platform whose behaviour applies at context: the preview
frame's platform inside one, else the device's own platform. A host
reads this instead of pinning a platform.
Implementation
static TargetPlatform targetPlatformOf(BuildContext context) =>
maybeOf(context)?.platform.targetPlatform ?? defaultTargetPlatform;