parse static method

SignalStatus parse(
  1. Object? value
)

Implementation

static SignalStatus parse(Object? value) => switch (value) {
      'ok' => SignalStatus.ok,
      'unsupported' => SignalStatus.unsupported,
      'blocked' => SignalStatus.blocked,
      'timeout' => SignalStatus.timeout,
      // An unrecognised status is an SDK newer than this binding. Reported as
      // an error rather than thrown on: a Flutter app should not stop working
      // because the native SDK learned a new word.
      _ => SignalStatus.error,
    };