mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-11-10 02:43:12 +00:00
00545c34b4
listing scroll performance fix, uniform code and widget UI for different log item types, dialog data can now be selected & copy-pasted
17 lines
409 B
Dart
17 lines
409 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:selfprivacy/logic/models/console_log.dart';
|
|
|
|
class ConsoleModel extends ChangeNotifier {
|
|
final List<ConsoleLog> _logs = [];
|
|
List<ConsoleLog> get logs => _logs;
|
|
|
|
void log(final ConsoleLog newLog) {
|
|
logs.add(newLog);
|
|
notifyListeners();
|
|
// Make sure we don't have too many
|
|
if (logs.length > 500) {
|
|
logs.removeAt(0);
|
|
}
|
|
}
|
|
}
|