mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-04 20:30:35 +00:00
Bug fixes
This commit is contained in:
parent
665eb5a0c2
commit
d16a3c759e
4 changed files with 4 additions and 4 deletions
|
@ -54,7 +54,7 @@ DhcpStatus dhcpStatusFromJson(String str) => DhcpStatus.fromJson(json.decode(str
|
|||
String dhcpStatusToJson(DhcpStatus data) => json.encode(data.toJson());
|
||||
|
||||
class DhcpStatus {
|
||||
String interfaceName;
|
||||
String? interfaceName;
|
||||
IpVersion v4;
|
||||
IpVersion v6;
|
||||
List<Lease> leases;
|
||||
|
|
|
@ -8,7 +8,7 @@ class DnsInfo {
|
|||
bool ednsCsEnabled;
|
||||
bool dnssecEnabled;
|
||||
bool disableIpv6;
|
||||
String upstreamMode;
|
||||
String? upstreamMode;
|
||||
int cacheSize;
|
||||
int cacheTtlMin;
|
||||
int cacheTtlMax;
|
||||
|
|
|
@ -58,7 +58,7 @@ class _DhcpScreenState extends State<DhcpScreen> {
|
|||
final dhcpProvider = Provider.of<DhcpProvider>(context, listen: false);
|
||||
if (dhcpProvider.dhcp != null) {
|
||||
setState(() {
|
||||
if (dhcpProvider.dhcp!.dhcpStatus.interfaceName != '') {
|
||||
if (dhcpProvider.dhcp!.dhcpStatus.interfaceName != null && dhcpProvider.dhcp!.dhcpStatus.interfaceName != '') {
|
||||
selectedInterface = dhcpProvider.dhcp!.networkInterfaces.firstWhere((iface) => iface.name == dhcpProvider.dhcp!.dhcpStatus.interfaceName);
|
||||
enabled = dhcpProvider.dhcp!.dhcpStatus.enabled;
|
||||
ipv4StartRangeController.text = dhcpProvider.dhcp!.dhcpStatus.v4.rangeStart;
|
||||
|
|
|
@ -59,7 +59,7 @@ class _UpstreamDnsScreenState extends State<UpstreamDnsScreen> {
|
|||
});
|
||||
}
|
||||
}
|
||||
upstreamMode = dnsProvider.dnsInfo!.upstreamMode;
|
||||
upstreamMode = dnsProvider.dnsInfo!.upstreamMode ?? "";
|
||||
validValues = true;
|
||||
super.initState();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue