Fakultas Ilmu Komputer UI

lokasi.dart 639 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import 'package:json_annotation/json_annotation.dart';
part 'lokasi.g.dart';
@JsonSerializable()
class LokasiListResponse {
  List<Lokasi> listLokasi;

  LokasiListResponse();
  factory LokasiListResponse.fromJson(List json) => _$LokasiListResponseFromJson(json);
  Map<String, dynamic> toJson() => _$LokasiListResponseToJson(this);
}

@JsonSerializable(nullable: true)
class Lokasi {
  String nama;
  double latitude;
  double longitude;
  String alamat;
  String foto;
  String telp;

  Lokasi();

  factory Lokasi.fromJson(Map<String, dynamic> json) => _$LokasiFromJson(json);
  Map<String, dynamic> toJson() => _$LokasiToJson(this);
}