Remake dashboard
Optimize theme Optimize more details Update flutter version
This commit is contained in:
@@ -306,6 +306,7 @@ class AppFlowingState with ChangeNotifier {
|
||||
List<Log> _logs;
|
||||
List<Traffic> _traffics;
|
||||
Traffic _totalTraffic;
|
||||
String? _localIp;
|
||||
|
||||
AppFlowingState()
|
||||
: _logs = [],
|
||||
@@ -350,7 +351,7 @@ class AppFlowingState with ChangeNotifier {
|
||||
|
||||
addTraffic(Traffic traffic) {
|
||||
_traffics = List.from(_traffics)..add(traffic);
|
||||
const maxLength = 60;
|
||||
const maxLength = 30;
|
||||
_traffics = _traffics.safeSublist(_traffics.length - maxLength);
|
||||
notifyListeners();
|
||||
}
|
||||
@@ -363,4 +364,13 @@ class AppFlowingState with ChangeNotifier {
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
|
||||
String? get localIp => _localIp;
|
||||
|
||||
set localIp(String? value) {
|
||||
if (_localIp != value) {
|
||||
_localIp = value;
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user