mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-04-22 14:59:12 +00:00
29 lines
No EOL
604 B
Dart
29 lines
No EOL
604 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'package:adguard_home_manager/constants/enums.dart';
|
|
import 'package:adguard_home_manager/models/dhcp.dart';
|
|
|
|
class DhcpProvider with ChangeNotifier {
|
|
LoadStatus _loadStatus = LoadStatus.loading;
|
|
DhcpModel? _dhcp;
|
|
|
|
DhcpModel? get dhcp {
|
|
return _dhcp;
|
|
}
|
|
|
|
LoadStatus get loadStatus {
|
|
return _loadStatus;
|
|
}
|
|
|
|
void setDhcpData(DhcpModel data) {
|
|
_dhcp = data;
|
|
notifyListeners();
|
|
}
|
|
|
|
void setDhcpLoadStatus(LoadStatus status, bool notify) {
|
|
_loadStatus = status;
|
|
if (notify == true) {
|
|
notifyListeners();
|
|
}
|
|
}
|
|
} |