ganti nama model menjadi warga
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
class PenerimaBantuanModel {
|
// warga == penerima bantuan
|
||||||
|
class WargaModel {
|
||||||
final String id;
|
final String id;
|
||||||
final String nama;
|
final String nama;
|
||||||
final String? nik;
|
final String? nik;
|
||||||
@ -16,7 +17,7 @@ class PenerimaBantuanModel {
|
|||||||
final DateTime createdAt;
|
final DateTime createdAt;
|
||||||
final DateTime? updatedAt;
|
final DateTime? updatedAt;
|
||||||
|
|
||||||
PenerimaBantuanModel({
|
WargaModel({
|
||||||
required this.id,
|
required this.id,
|
||||||
required this.nama,
|
required this.nama,
|
||||||
this.nik,
|
this.nik,
|
||||||
@ -33,13 +34,12 @@ class PenerimaBantuanModel {
|
|||||||
this.updatedAt,
|
this.updatedAt,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory PenerimaBantuanModel.fromRawJson(String str) =>
|
factory WargaModel.fromRawJson(String str) =>
|
||||||
PenerimaBantuanModel.fromJson(json.decode(str));
|
WargaModel.fromJson(json.decode(str));
|
||||||
|
|
||||||
String toRawJson() => json.encode(toJson());
|
String toRawJson() => json.encode(toJson());
|
||||||
|
|
||||||
factory PenerimaBantuanModel.fromJson(Map<String, dynamic> json) =>
|
factory WargaModel.fromJson(Map<String, dynamic> json) => WargaModel(
|
||||||
PenerimaBantuanModel(
|
|
||||||
id: json["id"],
|
id: json["id"],
|
||||||
nama: json["nama"],
|
nama: json["nama"],
|
||||||
nik: json["nik"],
|
nik: json["nik"],
|
Reference in New Issue
Block a user