aurcache/frontend/lib/models/package.dart

29 lines
821 B
Dart
Raw Normal View History

2023-12-29 17:13:51 +00:00
class Package {
final int id, latest_version_id;
2023-12-29 17:13:51 +00:00
final String name;
final bool outofdate;
2023-12-29 17:13:51 +00:00
final int status;
final String latest_version, latest_aur_version;
2023-12-29 17:13:51 +00:00
Package(
{required this.id,
required this.latest_version_id,
2023-12-29 17:13:51 +00:00
required this.name,
required this.status,
required this.latest_version,
required this.latest_aur_version,
required this.outofdate});
2023-12-29 17:13:51 +00:00
factory Package.fromJson(Map<String, dynamic> json) {
return Package(
id: json["id"] as int,
outofdate: json["outofdate"] as bool,
2023-12-29 17:13:51 +00:00
status: json["status"] as int,
name: json["name"] as String,
latest_version: json["latest_version"] as String,
latest_version_id: json["latest_version_id"] as int,
latest_aur_version: json["latest_aur_version"] as String,
2023-12-29 17:13:51 +00:00
);
}
}