You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
299 B
15 lines
299 B
4 years ago
|
class LoggerData {
|
||
|
static int maxCount = 100;
|
||
|
static List<dynamic> _data = [];
|
||
|
static List<dynamic> get data => _data;
|
||
|
|
||
|
static addData(dynamic item) {
|
||
|
if (_data.length < maxCount)
|
||
|
_data.insert(0, item);
|
||
|
else {
|
||
|
_data.removeLast();
|
||
|
_data.insert(item, 0);
|
||
|
}
|
||
|
}
|
||
|
}
|