pinchbv / floor

The typesafe, reactive, and lightweight SQLite abstraction for your Flutter applications
https://pinchbv.github.io/floor/
Apache License 2.0
967 stars 191 forks source link

In the example, a task is created with status: null instead of open #763

Open SEGVeenstra opened 1 year ago

SEGVeenstra commented 1 year ago

This means the filter in the example is set to 'open', new tasks will not be shown.

When the user swipes to update the status, the status will jump to inProgress, thus skipping open.

dkaera commented 1 year ago

@SEGVeenstra in the example I wanted to show that null values are also supported. Your option makes sense if it looks more visual for general understanding.

SEGVeenstra commented 1 year ago

@dkaera I see! Well maybe open should then just be added as an extra step.

So it's starts as uncategorized (should be filter option as well) > open > inProgress > done.

Or maybe remove the open for that matter, but add the filter for the uncategorized (null).

dkaera commented 1 year ago

@SEGVeenstra yes, I agree with you. Adding the uncategorized filter should give more understanding.

SEGVeenstra commented 1 year ago

@dkaera Ok, I will update the PR probably tomorrow.

SEGVeenstra commented 1 year ago

Wasn't able to work on it last week, but I checked it out just now. Adding the uncategorized creates more work than I would like.

Currently the menu items are generated by the possible categories (open, In Progress, Done), with one extra, for showing 'All'.

This is being translated to the selected TaskStatus. For this null is already used for 'All' and thus cannot be used as filter.

I've made some changes to support the uncategorized option in the PR.

I also noticed the unused property: TaskType. Maybe we could think about a more excessive example showing a bit more in the future.

SEGVeenstra commented 1 year ago

The test for the example fails on the analyzer. I've fixed all but the last one, about the library_private_types_in_public_api rule. Also mentioned in: #742