123456789101112131415161718192021222324252627282930313233 |
- /// school_id : 22
- /// school_name : "Temasek Polytechnic"
- class SchoolBean {
- SchoolBean({
- int? schoolId,
- String? schoolName,}){
- _schoolId = schoolId;
- _schoolName = schoolName;
- }
- SchoolBean.fromJson(dynamic json) {
- _schoolId = json['school_id'];
- _schoolName = json['school_name'];
- }
- int? _schoolId;
- String? _schoolName;
- SchoolBean copyWith({ int? schoolId,
- String? schoolName,
- }) => SchoolBean( schoolId: schoolId ?? _schoolId,
- schoolName: schoolName ?? _schoolName,
- );
- int? get schoolId => _schoolId;
- String? get schoolName => _schoolName;
- Map<String, dynamic> toJson() {
- final map = <String, dynamic>{};
- map['school_id'] = _schoolId;
- map['school_name'] = _schoolName;
- return map;
- }
- }
|