fromJson<T extends SupabaseObject> static method

T fromJson<T extends SupabaseObject>(
  1. Map<String, dynamic> json
)

Implementation

static T fromJson<T extends SupabaseObject>(Map<String, dynamic> json) =>
    switch (T) {
      == Study => Study.fromJson(json) as T,
      == StudySubject => StudySubject.fromJson(json) as T,
      == SubjectProgress => SubjectProgress.fromJson(json) as T,
      == AppConfig => AppConfig.fromJson(json) as T,
      == Repo => Repo.fromJson(json) as T,
      == StudyInvite => StudyInvite.fromJson(json) as T,
      == StudyUUser => StudyUUser.fromJson(json) as T,
      _ => throw ArgumentError('$T is not a supported Supabase type'),
    };