fromJson<T extends SupabaseObject> static method
T
fromJson<
T extends SupabaseObject>( - Map<String, dynamic> json
)
Implementation
static T fromJson<T extends SupabaseObject>(Map<String, dynamic> json) {
switch (T) {
case Study:
return Study.fromJson(json) as T;
case StudySubject:
return StudySubject.fromJson(json) as T;
case SubjectProgress:
return SubjectProgress.fromJson(json) as T;
case AppConfig:
return AppConfig.fromJson(json) as T;
case Repo:
return Repo.fromJson(json) as T;
case StudyInvite:
return StudyInvite.fromJson(json) as T;
default:
print('$T is not a supported Supabase type');
throw TypeError();
}
}