PollingLocation.fromJson constructor
PollingLocation.fromJson(
- Map json_
Implementation
PollingLocation.fromJson(core.Map json_)
: this(
address: json_.containsKey('address')
? SimpleAddressType.fromJson(
json_['address'] as core.Map<core.String, core.dynamic>)
: null,
endDate: json_.containsKey('endDate')
? json_['endDate'] as core.String
: null,
latitude: json_.containsKey('latitude')
? (json_['latitude'] as core.num).toDouble()
: null,
longitude: json_.containsKey('longitude')
? (json_['longitude'] as core.num).toDouble()
: null,
name: json_.containsKey('name') ? json_['name'] as core.String : null,
notes:
json_.containsKey('notes') ? json_['notes'] as core.String : null,
pollingHours: json_.containsKey('pollingHours')
? json_['pollingHours'] as core.String
: null,
sources: json_.containsKey('sources')
? (json_['sources'] as core.List)
.map((value) => Source.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
startDate: json_.containsKey('startDate')
? json_['startDate'] as core.String
: null,
voterServices: json_.containsKey('voterServices')
? json_['voterServices'] as core.String
: null,
);