@@ -29,11 +29,6 @@ import '../test_navigation.dart';
29
29
import '../widgets/message_list_checks.dart' ;
30
30
import '../widgets/page_checks.dart' ;
31
31
32
- FakeAndroidFlutterLocalNotificationsPlugin get notifAndroid =>
33
- testBinding.notifications
34
- .resolvePlatformSpecificImplementation <AndroidFlutterLocalNotificationsPlugin >()
35
- as FakeAndroidFlutterLocalNotificationsPlugin ;
36
-
37
32
MessageFcmMessage messageFcmMessage (
38
33
Message zulipMessage, {
39
34
String ? streamName,
@@ -90,20 +85,13 @@ void main() {
90
85
group ('NotificationChannelManager' , () {
91
86
test ('smoke' , () async {
92
87
await init ();
93
- check (notifAndroid .takeCreatedChannels ()).single
88
+ check (testBinding.androidNotificationHost .takeCreatedChannels ()).single
94
89
..id.equals (NotificationChannelManager .kChannelId)
95
90
..name.equals ('Messages' )
96
- ..description.isNull ()
97
- ..groupId.isNull ()
98
- ..importance.equals (Importance .high)
99
- ..playSound.isTrue ()
100
- ..sound.isNull ()
101
- ..enableVibration.isTrue ()
91
+ ..importance.equals (NotificationImportance .high)
92
+ ..lightsEnabled.equals (true )
102
93
..vibrationPattern.isNotNull ().deepEquals (
103
94
NotificationChannelManager .kVibrationPattern)
104
- ..showBadge.isTrue ()
105
- ..enableLights.isTrue ()
106
- ..ledColor.isNull ()
107
95
;
108
96
});
109
97
});
@@ -462,19 +450,12 @@ void main() {
462
450
});
463
451
}
464
452
465
- extension AndroidNotificationChannelChecks on Subject <AndroidNotificationChannel > {
453
+ extension NotificationChannelChecks on Subject <NotificationChannel > {
466
454
Subject <String > get id => has ((x) => x.id, 'id' );
467
- Subject <String > get name => has ((x) => x.name, 'name' );
468
- Subject <String ?> get description => has ((x) => x.description, 'description' );
469
- Subject <String ?> get groupId => has ((x) => x.groupId, 'groupId' );
470
- Subject <Importance > get importance => has ((x) => x.importance, 'importance' );
471
- Subject <bool > get playSound => has ((x) => x.playSound, 'playSound' );
472
- Subject <AndroidNotificationSound ?> get sound => has ((x) => x.sound, 'sound' );
473
- Subject <bool > get enableVibration => has ((x) => x.enableVibration, 'enableVibration' );
474
- Subject <bool > get enableLights => has ((x) => x.enableLights, 'enableLights' );
455
+ Subject <int > get importance => has ((x) => x.importance, 'importance' );
456
+ Subject <String ?> get name => has ((x) => x.name, 'name' );
457
+ Subject <bool ?> get lightsEnabled => has ((x) => x.lightsEnabled, 'lightsEnabled' );
475
458
Subject <Int64List ?> get vibrationPattern => has ((x) => x.vibrationPattern, 'vibrationPattern' );
476
- Subject <Color ?> get ledColor => has ((x) => x.ledColor, 'ledColor' );
477
- Subject <bool > get showBadge => has ((x) => x.showBadge, 'showBadge' );
478
459
}
479
460
480
461
extension on Subject <AndroidNotificationHostApiNotifyCall > {
0 commit comments