Bug fixes

This commit is contained in:
Juan Gilsanz Polo 2024-02-04 21:28:08 +01:00
parent c150d2ba23
commit ed0bc65285
3 changed files with 5 additions and 3 deletions

View file

@ -130,7 +130,9 @@ class Client {
ignoreStatistics: json["ignore_statistics"],
upstreamsCacheEnabled: json["upstreams_cache_enabled"],
upstreamsCacheSize: json["upstreams_cache_size"],
blockedServicesSchedule: BlockedServicesSchedule.fromJson(json["blocked_services_schedule"])
blockedServicesSchedule: json["blocked_services_schedule"] != null
? BlockedServicesSchedule.fromJson(json["blocked_services_schedule"])
: null
);
Map<String, dynamic> toJson() => {

View file

@ -66,6 +66,6 @@ class ServerStatus {
safeSearchPixabay: json['safeSearch']['pixabay'],
safeSearchYandex: json['safeSearch']['yandex'],
safeSearchYoutube: json['safeSearch']['youtube'],
dhcpAvailable: json['status']['dhcp_available']
dhcpAvailable: json['status']['dhcp_available'] ?? false
);
}

View file

@ -92,7 +92,7 @@ class LogsConfigOptions extends StatelessWidget {
child: Text(dropdownItemTranslation[item.key]),
)).toList(),
value: retentionTime,
onChanged: (value) => updateRetentionTime(value as double),
onChanged: (value) => updateRetentionTime(double.tryParse(value.toString())),
decoration: InputDecoration(
border: const OutlineInputBorder(
borderRadius: BorderRadius.all(