19 lines
358 B
Dart
19 lines
358 B
Dart
import 'task.dart';
|
|
|
|
class TaskManager {
|
|
final List<Task> _tasks = [];
|
|
|
|
void addTask(Task task) {
|
|
_tasks.add(task);
|
|
}
|
|
|
|
List<Task> getTasks() {
|
|
return _tasks;
|
|
}
|
|
|
|
Future<void> simulateTaskProcessing(Task task) async {
|
|
await Future.delayed(const Duration(seconds: 2));
|
|
|
|
print('Задание ${task.title} выполнено');
|
|
}
|
|
} |