18 lines
334 B
Dart
18 lines
334 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() async {
|
|
await Future.delayed(const Duration(seconds: 2));
|
|
print('Задание выполнено');
|
|
}
|
|
} |