-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #164 from vicolo-dev/release/0.4.0-beta1
Release/0.4.0 beta1
- Loading branch information
Showing
154 changed files
with
5,384 additions
and
1,498 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,52 @@ | ||
import 'package:clock_app/alarm/types/alarm.dart'; | ||
import 'package:clock_app/common/types/list_filter.dart'; | ||
import 'package:clock_app/common/types/tag.dart'; | ||
import 'package:clock_app/common/utils/date_time.dart'; | ||
import 'package:clock_app/common/utils/list_storage.dart'; | ||
|
||
final List<ListFilter<Alarm>> alarmListFilters = [ | ||
ListFilter( | ||
'All', | ||
(alarm) => true, | ||
), | ||
ListFilter( | ||
'Today', | ||
(alarm) { | ||
final List<ListFilterItem<Alarm>> alarmListFilters = [ | ||
ListFilterSelect("Date", [ | ||
|
||
ListFilter( | ||
'Today', | ||
(alarm) { | ||
if (alarm.currentScheduleDateTime == null) return false; | ||
return alarm.currentScheduleDateTime!.isToday(); | ||
}, | ||
), | ||
ListFilter('Tomorrow', (alarm) { | ||
if (alarm.currentScheduleDateTime == null) return false; | ||
return alarm.currentScheduleDateTime!.isToday(); | ||
}, | ||
), | ||
ListFilter('Tomorrow', (alarm) { | ||
if (alarm.currentScheduleDateTime == null) return false; | ||
return alarm.currentScheduleDateTime!.isTomorrow(); | ||
return alarm.currentScheduleDateTime!.isTomorrow(); | ||
}), | ||
]), | ||
ListFilterSelect("State", [ | ||
|
||
ListFilter( | ||
'Active', | ||
(alarm) => alarm.isEnabled && !alarm.isFinished, | ||
), | ||
ListFilter( | ||
'Snoozed', | ||
(alarm) => alarm.isSnoozed, | ||
), | ||
ListFilter( | ||
'Disabled', | ||
(alarm) => !alarm.isEnabled, | ||
), | ||
ListFilter( | ||
'Completed', | ||
(alarm) => alarm.isFinished, | ||
), | ||
]), | ||
// | ||
DynamicListFilterMultiSelect("Tags", () { | ||
final tags = loadListSync<Tag>("tags"); | ||
return tags.map((tag) { | ||
return ListFilter<Alarm>( | ||
tag.name, | ||
(alarm) => alarm.tags.any((element) => element.id == tag.id), | ||
id: tag.id, | ||
); | ||
}).toList(); | ||
}), | ||
ListFilter( | ||
'Snoozed', | ||
(alarm) => alarm.isSnoozed, | ||
), | ||
ListFilter( | ||
'Disabled', | ||
(alarm) => !alarm.isEnabled, | ||
), | ||
ListFilter( | ||
'Completed', | ||
(alarm) => alarm.isFinished, | ||
), | ||
]; | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.