fromValue static method

HTTPCookieSameSitePolicy? fromValue(
  1. String? value
)

Gets a possible HTTPCookieSameSitePolicy instance from String value.

Implementation

static HTTPCookieSameSitePolicy? fromValue(String? value) {
  if (value != null) {
    try {
      return HTTPCookieSameSitePolicy.values
          .firstWhere((element) => element.toValue() == value);
    } catch (e) {
      return null;
    }
  }
  return null;
}