platform static method

TargetPlatform platform(
  1. BuildContext context
)

The simulated target platform for the currently selected device.

Implementation

static TargetPlatform platform(BuildContext context) {
  final platform = context.select(
    (DevicePreviewStore store) => store.deviceInfo.identifier.platform,
  );
  return platform;
}