LicenseUsecase.from constructor

LicenseUsecase.from(
  1. String value
)

Builds a LicenseUsecase from value

Implementation

factory LicenseUsecase.from(String value) {
  try {
    LicenseUsecaseEnum usecase = LicenseUsecaseEnum.fromValue(value);
    return LicenseUsecase(usecase);
  } catch (e) {
    return LicenseUsecase.custom(value.replaceFirst('custom:', ''));
  }
}