Skip to content

Commit

Permalink
Add Note feature (#250)
Browse files Browse the repository at this point in the history
* add bottomsheet to google sign in

Revert "add bottomsheet to google sign in"

This reverts commit 454b64c.

* feat: Add note

* fix note padding and background

* fix note visible when empty

* update note alarm view
  • Loading branch information
its-me-abhishek authored Dec 19, 2023
1 parent 16e05b8 commit 11c41a0
Show file tree
Hide file tree
Showing 10 changed files with 428 additions and 42 deletions.
5 changes: 5 additions & 0 deletions lib/app/data/models/alarm_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class AlarmModel {
late bool isOneTime;
late int snoozeDuration;
late String ringtoneName;
late String note;
@ignore
Map? offsetDetails;

Expand Down Expand Up @@ -77,6 +78,7 @@ class AlarmModel {
required this.isOneTime,
required this.snoozeDuration,
required this.ringtoneName,
required this.note,
});

AlarmModel.fromDocumentSnapshot({
Expand Down Expand Up @@ -129,6 +131,7 @@ class AlarmModel {
isShakeEnabled = documentSnapshot['isShakeEnabled'];
shakeTimes = documentSnapshot['shakeTimes'];
ringtoneName = documentSnapshot['ringtoneName'];
note = documentSnapshot['note'];
}

AlarmModel.fromMap(Map<String, dynamic> alarmData) {
Expand Down Expand Up @@ -166,6 +169,7 @@ class AlarmModel {
label = alarmData['label'];
isOneTime = alarmData['isOneTime'];
ringtoneName = alarmData['ringtoneName'];
note = alarmData['note'];
}

AlarmModel.fromJson(String alarmData, UserModel? user) {
Expand Down Expand Up @@ -208,6 +212,7 @@ class AlarmModel {
'shakeTimes': alarmRecord.shakeTimes,
'snoozeDuration': alarmRecord.snoozeDuration,
'ringtoneName': alarmRecord.ringtoneName,
'note': alarmRecord.note,
};

if (alarmRecord.isSharedAlarmEnabled) {
Expand Down
241 changes: 209 additions & 32 deletions lib/app/data/models/alarm_model.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 11c41a0

Please sign in to comment.