fromJson static method

QpcV4LineType fromJson(
  1. dynamic value
)

Implementation

static QpcV4LineType fromJson(dynamic value) {
  final v = (value ?? '').toString();
  switch (v) {
    case 'surah_name':
      return QpcV4LineType.surahName;
    case 'basmallah':
      return QpcV4LineType.basmallah;
    case 'ayah':
      return QpcV4LineType.ayah;
    default:
      throw FormatException('Unsupported line_type: $v');
  }
}