tryParse static method

ConsentState? tryParse(
  1. Object? value
)

The state a native bridge named, or null when it named none of the three.

Implementation

static ConsentState? tryParse(Object? value) => switch (value) {
      'granted' => ConsentState.granted,
      'pending' => ConsentState.pending,
      'denied' => ConsentState.denied,
      _ => null,
    };