refactor: use riverpod for task progress bar #1866
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes various changes aimed at improving the codebase by removing unused imports, refactoring existing classes, and introducing new state management for task progress. The most important changes include the removal of unused methods, the introduction of the
TaskProgressState
class, and the refactoring of theLinkedDuration
widget to use Riverpod for state management.Removal of Unused Methods and Imports:
watchLinkedTotalDuration
method from theJournalDb
class inlib/database/database.dart
.lib/database/database.dart
andlib/features/journal/state/entry_controller.dart
[1] [2].Introduction of Task Progress State:
TaskProgressState
class to manage task progress and estimate durations inlib/features/tasks/model/task_progress_state.dart
.TaskProgressState
using Freezed inlib/features/tasks/model/task_progress_state.freezed.dart
.Refactoring for State Management:
LinkedDuration
widget to use Riverpod for state management, replacing the previous StreamBuilder implementation inlib/features/tasks/ui/linked_duration.dart
[1] [2] [3].TaskSliverAppBar
to use the newLinkedDuration
implementation inlib/features/tasks/ui/task_app_bar.dart
.Task Progress Controller:
TaskProgressController
class to manage task progress state inlib/features/tasks/state/task_progress_controller.dart
.TaskProgressController
using Riverpod inlib/features/tasks/state/task_progress_controller.g.dart
.Version Update:
pubspec.yaml
.