A highly responsive, premium personal task management web application built using Flutter Web (Material 3). The application showcases advanced frontend capabilities, featuring custom 3D perspective tilt transforms, custom canvas particle confetti animations, checklist/sub-task progress tracking, light/dark mode toggling, advanced sorting/filtering, and local storage data persistence.
- Git Repository: https://github.com/Sangampal11/veloc_assignment.git
- Live Web Application (Vercel): https://web-ashen-five-14.vercel.app
- Project Flow & Architecture
- Data Persistence & Storage Mechanics
- Premium UI & Animation Engines
- Folder Directory & File Structure
- Setup & Execution Instructions
- Testing & Quality Assurance
The application adopts the Single Source of Truth pattern, separating state management from the UI layer to achieve clean rendering loops and 60fps web performance.
graph TD
UI[User Interface: task_card / task_form_dialog] -->|User Interaction: Toggle/Add/Edit| Provider[State Provider: TaskProvider]
Provider -->|Serialize & Save| Storage[(Local Storage: SharedPreferences)]
Provider -->|Notify Listeners| Builder[ListenableBuilder in main.dart]
Builder -->|Rebuild Widgets| UI
Storage -->|On App Startup: Load & Deserialize| Provider
- State Engine (
TaskProvider):- Implemented as a
ChangeNotifier. It manages the global list of tasks, current search queries, active status filters, category filters, and user theme selections. - Any modification (adding a task, checking a sub-task, deleting, or sorting) mutates the state and triggers
notifyListeners().
- Implemented as a
- Main Application entrypoint (
main.dart):- Instantiates the
TaskProviderand binds the rootMaterialAppusing aListenableBuilder. - When the provider triggers updates (e.g., toggling dark mode or loading saved tasks), the
MaterialAppinstantly adapts and redraws.
- Instantiates the
- Responsive UI assembly (
dashboard_screen.dart):- Builds responsive layouts using the
ResponsiveLayouthelper. It switches between single-column mobile viewports (collapsing sidebars into slide-up bottom sheets and floating action buttons) and tablet/desktop viewports (multi-column grids or structured table layouts).
- Builds responsive layouts using the
Task records and user preferences survive page refreshes, tab closures, and browser restarts. The data lifecycle operates through the following steps:
To write complex Dart structures to local storage, tasks are serialized. In lib/models/task.dart, the Task and SubTask classes define serialization methods:
toJson(): Converted from Dart objects to standard key-value maps (Map<String, dynamic>).fromJson(): Deserialized from raw maps back into structured typed Dart instances.
// Example of nested serialization in task.dart
Map<String, dynamic> toJson() => {
'id': id,
'title': title,
'description': description,
'priority': priority.name,
'status': status.name,
'category': category.name,
'dueDate': dueDate.toIso8601String(),
'subTasks': subTasks.map((st) => st.toJson()).toList(),
};Whenever a user mutates a task, the change propagates to the shared_preferences database key 'veloc_tasks':
- The method
_saveTasksToLocalStorage()is triggered insideTaskProvider. - The entire
List<Task>is converted into a serialized JSON string:final String jsonString = jsonEncode(_tasks.map((t) => t.toJson()).toList());
- The string is saved asynchronously:
await prefs.setString('veloc_tasks', jsonString);
- Dark mode preference is saved similarly under the key
'is_dark_mode'.
- When the app launches,
loadTasksFromLocalStorage()runs asynchronously inside the provider's initialization constructor. - It queries the key
'veloc_tasks'. If data exists, it decodes the raw JSON list string:final List<dynamic> decodedList = jsonDecode(jsonString);
- It maps the decoded list items back into
Taskobjects:_tasks = decodedList.map((item) => Task.fromJson(item)).toList();
isLoadingis set tofalse, andnotifyListeners()updates the screen, transitioning from a loading spinner to the dashboard.
The frontend incorporates professional animations to maximize visual impact:
- Managed in
task_card.dartandstats_card.dartusing a custom interactiveMouseRegion. - Hovering over cards tracks mouse cursor offset relative to the card's bounding center. It translates coordinates into X-axis and Y-axis rotation tilts using a projection transform matrix:
Matrix4.identity() ..setEntry(3, 2, 0.001) // perspective depth index ..rotateX(_tiltX * 0.08) ..rotateY(_tiltY * 0.08)
- This tilts the card in 3D space toward the cursor. A radial gradient spotlight follows the mouse movement, creating a polished glowing glassmorphism effect.
- Built in
confetti_overlay.dartusing a custom particle physics loop. - Completing a task or marking all checklist items as checked launches the confetti overlay:
- Generates dozens of particle vectors with random colors, sizes, rotational velocities, and drag coefficients.
- Implements physics calculations (gravity drag, horizontal wind velocity resistance, and opacity fade-outs) rendered via a high-performance
CustomPainterticker.
- Card content blocks, checklist rows, and filter panels are wrapped with flexible containers, horizontal/vertical
SingleChildScrollViewwidgets, andExpandedgrids. This guarantees zero pixel overflow warnings, regardless of test viewport scales.
lib/
├── models/
│ └── task.dart # Task and SubTask models, JSON serializations
├── providers/
│ └── task_provider.dart # ChangeNotifier managing tasks, filters, and local IO
├── theme/
│ └── app_theme.dart # Styling tokens, glowing neon shadows, light/dark themes
├── widgets/
│ ├── responsive_layout.dart # Mobile/Tablet/Desktop breakpoint handlers
│ ├── task_card.dart # 3D interactive tilt-card with checklist progress indicators
│ ├── task_form_dialog.dart # Validation logic, due date calendar picker, subtask list builder
│ ├── stats_card.dart # Numerical dashboard counters with glowing neon borders
│ ├── empty_state.dart # Floating loop empty illustration graphics
│ └── confetti_overlay.dart # Custom physics particle confetti engine
├── screens/
│ └── dashboard_screen.dart # Master dashboard coordinator
└── main.dart # Root layout bootstrap and theme state listener
Ensure you have the Flutter SDK installed on your machine.
flutter pub getTo launch the application locally in Chrome:
flutter run -d chrome --web-port 8080Open your browser and navigate to: http://localhost:8080
To build a static production package:
flutter build web --releaseThis builds an optimized web bundle inside the build/web/ folder, utilizing the CanvasKit rendering pipeline.
Integrated widget test assertions are located in test/widget_test.dart:
- Automatically sets up a mock browser local storage environment (
SharedPreferences.setMockInitialValues). - Tests core layout elements (Total Tasks, Completed, Pending, High Priority labels).
- Simulates clicking the "Add Task" button and verifies that the validation forms load successfully.
To execute tests:
flutter testOutput:
00:00 +0: loading E:/veloc_assignment/test/widget_test.dart
00:00 +0: Task manager dashboard smoke test
00:01 +1: All tests passed!