// To parse this JSON data, do // // final welcome = welcomeFromJson(jsonString); import 'dart:convert'; ScopeModel welcomeFromJson(String str) => ScopeModel.fromJson(json.decode(str)); String welcomeToJson(ScopeModel data) => json.encode(data.toJson()); class ScopeModel { List therapeutics; ScopeModel({ required this.therapeutics, }); factory ScopeModel.fromJson(Map json) => ScopeModel( therapeutics: List.from( json["therapeutics"].map((x) => Therapeutic.fromJson(x))), ); Map toJson() => { "therapeutics": List.from(therapeutics.map((x) => x.toJson())), }; } class Therapeutic { String id; String clientId; String therapeuticName; Therapeutic({ required this.id, required this.clientId, required this.therapeuticName, }); factory Therapeutic.fromJson(Map json) => Therapeutic( id: json["id"], clientId: json["client_id"], therapeuticName: json["therapeutic_name"], ); Map toJson() => { "id": id, "client_id": clientId, "therapeutic_name": therapeuticName, }; }