create method

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

Probe? create(String type) {
  switch (type) {
    case PHONE_LOG:
      return (Platform.isAndroid) ? PhoneLogProbe() : null;
    case TEXT_MESSAGE_LOG:
      return (Platform.isAndroid) ? TextMessageLogProbe() : null;
    case TEXT_MESSAGE:
      return (Platform.isAndroid) ? TextMessageProbe() : null;
    // case TELEPHONY:
    //   throw "Not implemented yet";
    case CALENDAR:
      return CalendarProbe();
    default:
      return null;
  }
}