fromValue static method

PNNotificationActionType fromValue(
  1. String type
)

Implementation

static PNNotificationActionType fromValue(String type) {
  return values.firstWhere((element) {
    if (Platform.isAndroid) {
      return element.androidValue == type;
    } else if (Platform.isIOS) {
      return element.iOSValue == type;
    }
    return false;
  }, orElse: () => PNNotificationActionType.openUrl);
}