Skip to content

Commit

Permalink
Fix issue in FileItem loading
Browse files Browse the repository at this point in the history
  • Loading branch information
AhsanSarwar45 committed Apr 26, 2024
1 parent 8019459 commit 978ec95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion lib/alarm/logic/alarm_reminder_notifications.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import 'package:clock_app/common/utils/list_storage.dart';
import 'package:clock_app/common/utils/time_of_day.dart';
import 'package:clock_app/notifications/data/notification_channel.dart';
import 'package:clock_app/settings/data/settings_schema.dart';
import 'package:flutter/foundation.dart';

Future<void> cancelAlarmReminderNotification(int id) async {
await AwesomeNotifications().cancel(id);
Expand Down
6 changes: 4 additions & 2 deletions lib/common/types/file_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ class FileItem extends ListItem {
? json['id'] ?? UniqueKey().hashCode
: UniqueKey().hashCode,
_type = json != null
? FileItemType.values
.firstWhere((e) => e.toString() == json['type'])
? json['type'] != null
? FileItemType.values
.firstWhere((e) => e.toString() == json['type'])
: FileItemType.audio
: FileItemType.audio,
name = json != null ? json['title'] ?? 'Unknown' : 'Unknown',
_uri = json != null ? json['uri'] ?? '' : '',
Expand Down

0 comments on commit 978ec95

Please sign in to comment.