Skip to content

Commit 89ee2b9

Browse files
committed
Comment awesome notification plugin
1 parent fe71aab commit 89ee2b9

File tree

4 files changed

+830
-831
lines changed

4 files changed

+830
-831
lines changed

lib/mobile_app_notifications.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ library mobile_app_notifications;
55
import 'dart:io';
66

77
import 'package:android_alarm_manager_plus/android_alarm_manager_plus.dart';
8-
import 'package:awesome_notifications/awesome_notifications.dart';
98
import 'package:flutter/material.dart';
109
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
1110
import 'package:flutter_timezone/flutter_timezone.dart';

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies:
1111
flutter:
1212
sdk: flutter
1313
android_alarm_manager_plus: 4.0.2
14-
awesome_notifications: ^0.8.2
14+
# awesome_notifications: ^0.8.2
1515
intl:
1616
shared_preferences: 2.2.1
1717
json_annotation: 4.9.0
Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import 'package:awesome_notifications/awesome_notifications.dart';
1+
// import 'package:awesome_notifications/awesome_notifications.dart';
22
import 'package:flutter/material.dart';
33
import 'package:flutter_test/flutter_test.dart';
44
import 'package:mobile_app_notifications/mobile_app_notifications.dart';
@@ -7,35 +7,35 @@ import 'package:mockito/mockito.dart';
77

88
import 'mobile_app_notifications_test.mocks.dart';
99

10-
@GenerateMocks([AwesomeNotifications, ScheduleAdhan])
10+
// @GenerateMocks([AwesomeNotifications, ScheduleAdhan])
1111
void main() {
1212
TestWidgetsFlutterBinding.ensureInitialized();
1313
group('ringAlarm', () {
14-
late MockAwesomeNotifications mockAwesomeNotifications;
15-
late MockScheduleAdhan mockScheduleAdhan;
14+
// late MockAwesomeNotifications mockAwesomeNotifications;
15+
// late MockScheduleAdhan mockScheduleAdhan;
1616
setUp(() {
17-
mockAwesomeNotifications = MockAwesomeNotifications();
18-
mockScheduleAdhan = MockScheduleAdhan();
19-
AwesomeNotifications().initialize(
20-
'resource://drawable/logo',
21-
[
22-
NotificationChannel(
23-
channelKey: 'pre_notif',
24-
channelName: 'mawaqit',
25-
channelDescription: 'mawaqit_channel',
26-
importance: NotificationImportance.Max,
27-
defaultColor: const Color(0xFF9D50DD),
28-
ledColor: Colors.white,
29-
playSound: true,
30-
soundSource: null,
31-
enableVibration: false,
32-
icon: 'resource://drawable/logo',
33-
onlyAlertOnce: true,
34-
criticalAlerts: true,
35-
defaultRingtoneType: DefaultRingtoneType.Notification,
36-
)
37-
],
38-
);
17+
// mockAwesomeNotifications = MockAwesomeNotifications();
18+
// mockScheduleAdhan = MockScheduleAdhan();
19+
// AwesomeNotifications().initialize(
20+
// 'resource://drawable/logo',
21+
// [
22+
// NotificationChannel(
23+
// channelKey: 'pre_notif',
24+
// channelName: 'mawaqit',
25+
// channelDescription: 'mawaqit_channel',
26+
// importance: NotificationImportance.Max,
27+
// defaultColor: const Color(0xFF9D50DD),
28+
// ledColor: Colors.white,
29+
// playSound: true,
30+
// soundSource: null,
31+
// enableVibration: false,
32+
// icon: 'resource://drawable/logo',
33+
// onlyAlertOnce: true,
34+
// criticalAlerts: true,
35+
// defaultRingtoneType: DefaultRingtoneType.Notification,
36+
// )
37+
// ],
38+
// );
3939
});
4040

4141
test('should handle pre-notification correctly', () async {
@@ -50,22 +50,22 @@ void main() {
5050
'notificationBeforeShuruq': 0,
5151
};
5252

53-
when(mockAwesomeNotifications.createNotification(
54-
content: anyNamed('content'),
55-
)).thenAnswer((_) async => true);
56-
57-
ringAlarm(1, data);
58-
59-
verifyNever(mockAwesomeNotifications.createNotification(
60-
content: argThat(
61-
isA<NotificationContent>().having(
62-
(content) => content.title,
63-
'title',
64-
'10 minutes Test Prayer',
65-
),
66-
named: 'content',
67-
),
68-
));
53+
// when(mockAwesomeNotifications.createNotification(
54+
// content: anyNamed('content'),
55+
// )).thenAnswer((_) async => true);
56+
//
57+
// ringAlarm(1, data);
58+
//
59+
// verifyNever(mockAwesomeNotifications.createNotification(
60+
// content: argThat(
61+
// isA<NotificationContent>().having(
62+
// (content) => content.title,
63+
// 'title',
64+
// '10 minutes Test Prayer',
65+
// ),
66+
// named: 'content',
67+
// ),
68+
// ));
6969
});
7070

7171
test('should handle adhan notification correctly', () async {
@@ -79,25 +79,25 @@ void main() {
7979
'minutesToAthan': '10 minutes',
8080
'notificationBeforeShuruq': 0,
8181
};
82-
83-
when(mockAwesomeNotifications.createNotification(
84-
content: anyNamed('content'),
85-
)).thenAnswer((_) async => true);
86-
87-
when(mockScheduleAdhan.schedule()).thenReturn(true);
88-
89-
ringAlarm(1, data);
90-
91-
verifyNever(mockAwesomeNotifications.createNotification(
92-
content: argThat(
93-
isA<NotificationContent>().having(
94-
(content) => content.title,
95-
'title',
96-
'Test Prayer 10',
97-
),
98-
named: 'content',
99-
),
100-
));
82+
//
83+
// when(mockAwesomeNotifications.createNotification(
84+
// content: anyNamed('content'),
85+
// )).thenAnswer((_) async => true);
86+
//
87+
// when(mockScheduleAdhan.schedule()).thenReturn(true);
88+
//
89+
// ringAlarm(1, data);
90+
//
91+
// verifyNever(mockAwesomeNotifications.createNotification(
92+
// content: argThat(
93+
// isA<NotificationContent>().having(
94+
// (content) => content.title,
95+
// 'title',
96+
// 'Test Prayer 10',
97+
// ),
98+
// named: 'content',
99+
// ),
100+
// ));
101101
});
102102
});
103103
}

0 commit comments

Comments
 (0)