fromString static method

CPDFAlignment fromString(
  1. String typeStr
)

Implementation

static CPDFAlignment fromString(String typeStr) {
  return CPDFAlignment.values.firstWhere(
    (e) => e.name == typeStr.toLowerCase(),
    orElse: () => throw Exception('Unknown alignment type: $typeStr'),
  );
}