Refactor app to focus on match results instead of tasks

- Introduced MatchRepository and MatchResultsViewModel to handle match data.
- Replaced task-related code with match-related functionality in the app.
- Added match results view and updated navigation to reflect changes.
- Removed task-related models, services, and view models.
- Added JSON data for match results and integrated it into the app.
- Updated tests to validate match results loading and UI behavior.
This commit is contained in:
kejaro committed 2026-09-27 19:34:46 +01:00
1 parent ffc2051e20
commit 4d377c1336
17 files changed
+500 -658

No files matched your search

@@ -1,55 +0,0 @@
import '../models/task_item_model.dart';
class MockTaskService {
final List<Map<String, dynamic>> _rawStorage = [
{
'id': '1',
'title': 'Explore Material 3 Layouts',
'description': 'Test responsiveness on both iPhone and Android screen sizes.',
'isCompleted': true,
'category': 'Design',
'createdAt': DateTime.now().subtract(const Duration(hours: 4)).toIso8601String(),
},
{
'id': '2',
'title': 'Test Light & Dark Modes',
'description': 'Ensure contrast and colors look great in both themes.',
'isCompleted': false,
'category': 'Theme',
'createdAt': DateTime.now().subtract(const Duration(hours: 2)).toIso8601String(),
},
{
'id': '3',
'title': 'Verify Accessibility & Touch Targets',
'description': 'Ensure tap targets adhere to >= 48x48 logical pixels with semantic labels.',
'isCompleted': false,
'category': 'A11y',
'createdAt': DateTime.now().subtract(const Duration(minutes: 30)).toIso8601String(),
},
];
Future<List<TaskItemModel>> fetchTasks() async {
// Simulate brief network/storage delay
await Future.delayed(const Duration(milliseconds: 250));
return _rawStorage.map(TaskItemModel.fromJson).toList();
}
Future<TaskItemModel> addTask(TaskItemModel task) async {
await Future.delayed(const Duration(milliseconds: 150));
_rawStorage.insert(0, task.toJson());
return task;
}
Future<void> updateTask(TaskItemModel task) async {
await Future.delayed(const Duration(milliseconds: 150));
final index = _rawStorage.indexWhere((e) => e['id'] == task.id);
if (index != -1) {
_rawStorage[index] = task.toJson();
}
}
Future<void> deleteTask(String id) async {
await Future.delayed(const Duration(milliseconds: 150));
_rawStorage.removeWhere((e) => e['id'] == id);
}
}