passo_mobile_app/lib/model/utils/eligibility.dart

40 lines
852 B
Dart
Raw Permalink Normal View History

2023-02-15 03:40:12 +00:00
// To parse this JSON data, do
//
// final eligibilities = eligibilitiesFromJson(jsonString);
import 'package:meta/meta.dart';
import 'dart:convert';
2023-02-20 07:48:24 +00:00
Eligibility eligibilitiesFromJson(String str) => Eligibility.fromJson(json.decode(str));
2023-02-15 03:40:12 +00:00
2023-02-20 07:48:24 +00:00
String eligibilitiesToJson(Eligibility data) => json.encode(data.toJson());
2023-02-15 03:40:12 +00:00
2023-02-20 07:48:24 +00:00
class Eligibility {
Eligibility({
2023-02-15 03:40:12 +00:00
required this.id,
required this.title,
required this.type,
});
final int id;
final String title;
final String type;
2023-02-20 07:48:24 +00:00
factory Eligibility.fromJson(Map<String, dynamic> json) => Eligibility(
2023-02-15 03:40:12 +00:00
id: json["id"],
title: json["title"],
type: json["type"],
);
Map<String, dynamic> toJson() => {
"id": id,
"title": title,
"type": type,
};
2023-02-27 06:26:27 +00:00
@override
String toString() {
return title;
}
2023-02-15 03:40:12 +00:00
}