from method

TautulliSectionType? from(
  1. String? type
)

Given a String, will return the correct TautulliSectionType object.

Implementation

TautulliSectionType? from(String? type) {
    switch(type) {
        case 'movie': return TautulliSectionType.MOVIE;
        case 'show': return TautulliSectionType.SHOW;
        case 'artist': return TautulliSectionType.ARTIST;
        case 'photo': return TautulliSectionType.PHOTO;
        case '': return TautulliSectionType.NULL;
    }
    return null;
}