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