create method

  1. @override
Probe? create(
  1. String type
)
override

Creates a new Probe of the specified type. Returns null if a probe cannot be created for this type.

Implementation

@override
Probe? create(String type) {
  switch (type) {
    case DEVICE:
      return DeviceProbe();
    case MEMORY:
      return MemoryProbe();
    case BATTERY:
      return BatteryProbe();
    case SCREEN:
      return (Platform.isAndroid) ? ScreenProbe() : null;
    case TIMEZONE:
      return TimezoneProbe();
    default:
      return null;
  }
}