// ignore_for_file: unnecessary_getters_setters import '/backend/schema/util/schema_util.dart'; import 'index.dart'; import '/flutter_flow/flutter_flow_util.dart'; class HorecagelegenheidStruct extends BaseStruct { HorecagelegenheidStruct({ String? nid, String? titel, String? adres, String? plaats, String? logo, List? categorie, }) : _nid = nid, _titel = titel, _adres = adres, _plaats = plaats, _logo = logo, _categorie = categorie != null ? LoggableList(categorie) : null; // "nid" field. String? _nid; String get nid => _nid ?? ''; set nid(String? val) { _nid = val; debugLog(); } bool hasNid() => _nid != null; // "titel" field. String? _titel; String get titel => _titel ?? ''; set titel(String? val) { _titel = val; debugLog(); } bool hasTitel() => _titel != null; // "adres" field. String? _adres; String get adres => _adres ?? ''; set adres(String? val) { _adres = val; debugLog(); } bool hasAdres() => _adres != null; // "plaats" field. String? _plaats; String get plaats => _plaats ?? ''; set plaats(String? val) { _plaats = val; debugLog(); } bool hasPlaats() => _plaats != null; // "logo" field. String? _logo; String get logo => _logo ?? ''; set logo(String? val) { _logo = val; debugLog(); } bool hasLogo() => _logo != null; // "categorie" field. LoggableList? _categorie; List get categorie => (_categorie ?? LoggableList(const []))..logger = logger; set categorie(List? val) { if (val != null) { _categorie = LoggableList(val); } else { _categorie = null; } debugLog(); } void updateCategorie(Function(List) updateFn) { updateFn(_categorie ??= LoggableList([])); debugLog(); } bool hasCategorie() => _categorie != null; static HorecagelegenheidStruct fromMap(Map data) => HorecagelegenheidStruct( nid: data['nid'] as String?, titel: data['titel'] as String?, adres: data['adres'] as String?, plaats: data['plaats'] as String?, logo: data['logo'] as String?, categorie: getDataList(data['categorie']), ); static HorecagelegenheidStruct? maybeFromMap(dynamic data) => data is Map ? HorecagelegenheidStruct.fromMap(data.cast()) : null; Map toMap() => { 'nid': _nid, 'titel': _titel, 'adres': _adres, 'plaats': _plaats, 'logo': _logo, 'categorie': _categorie, }.withoutNulls; @override Map toSerializableMap() => { 'nid': serializeParam( _nid, ParamType.String, ), 'titel': serializeParam( _titel, ParamType.String, ), 'adres': serializeParam( _adres, ParamType.String, ), 'plaats': serializeParam( _plaats, ParamType.String, ), 'logo': serializeParam( _logo, ParamType.String, ), 'categorie': serializeParam( _categorie, ParamType.String, isList: true, ), }.withoutNulls; static HorecagelegenheidStruct fromSerializableMap( Map data) => HorecagelegenheidStruct( nid: deserializeParam( data['nid'], ParamType.String, false, ), titel: deserializeParam( data['titel'], ParamType.String, false, ), adres: deserializeParam( data['adres'], ParamType.String, false, ), plaats: deserializeParam( data['plaats'], ParamType.String, false, ), logo: deserializeParam( data['logo'], ParamType.String, false, ), categorie: deserializeParam( data['categorie'], ParamType.String, true, ), ); @override Map toDebugSerializableMap() => { 'nid': debugSerializeParam( nid, ParamType.String, name: 'String', nullable: false, ), 'titel': debugSerializeParam( titel, ParamType.String, name: 'String', nullable: false, ), 'adres': debugSerializeParam( adres, ParamType.String, name: 'String', nullable: false, ), 'plaats': debugSerializeParam( plaats, ParamType.String, name: 'String', nullable: false, ), 'logo': debugSerializeParam( logo, ParamType.String, name: 'String', nullable: false, ), 'categorie': debugSerializeParam( _categorie, ParamType.String, isList: true, name: 'String', nullable: false, ), }; @override String toString() => 'HorecagelegenheidStruct(${toMap()})'; @override bool operator ==(Object other) { const listEquality = ListEquality(); return other is HorecagelegenheidStruct && nid == other.nid && titel == other.titel && adres == other.adres && plaats == other.plaats && logo == other.logo && listEquality.equals(categorie, other.categorie); } @override int get hashCode => const ListEquality().hash([nid, titel, adres, plaats, logo, categorie]); } HorecagelegenheidStruct createHorecagelegenheidStruct({ String? nid, String? titel, String? adres, String? plaats, String? logo, }) => HorecagelegenheidStruct( nid: nid, titel: titel, adres: adres, plaats: plaats, logo: logo, );