@@ -3,7 +3,6 @@ import 'dart:async';
3
3
import 'package:firebase_core/firebase_core.dart' ;
4
4
import 'package:firebase_messaging/firebase_messaging.dart' ;
5
5
import 'package:flutter/foundation.dart' ;
6
- import 'package:flutter_local_notifications/flutter_local_notifications.dart' hide Person;
7
6
import 'package:test/fake.dart' ;
8
7
import 'package:url_launcher/url_launcher.dart' as url_launcher;
9
8
import 'package:zulip/host/android_notifications.dart' ;
@@ -273,17 +272,9 @@ class TestZulipBinding extends ZulipBinding {
273
272
}
274
273
275
274
void _resetNotifications () {
276
- _notificationsPlugin = null ;
277
275
_androidNotificationHostApi = null ;
278
276
}
279
277
280
- FakeFlutterLocalNotificationsPlugin ? _notificationsPlugin;
281
-
282
- @override
283
- FakeFlutterLocalNotificationsPlugin get notifications {
284
- return (_notificationsPlugin ?? = FakeFlutterLocalNotificationsPlugin ());
285
- }
286
-
287
278
FakeAndroidNotificationHostApi ? _androidNotificationHostApi;
288
279
289
280
@override
@@ -512,39 +503,6 @@ typedef FirebaseMessagingRequestPermissionCall = ({
512
503
bool sound,
513
504
});
514
505
515
- class FakeFlutterLocalNotificationsPlugin extends Fake implements FlutterLocalNotificationsPlugin {
516
- InitializationSettings ? initializationSettings;
517
- DidReceiveNotificationResponseCallback ? onDidReceiveNotificationResponse;
518
- DidReceiveBackgroundNotificationResponseCallback ? onDidReceiveBackgroundNotificationResponse;
519
-
520
- @override
521
- Future <bool ?> initialize (
522
- InitializationSettings initializationSettings, {
523
- DidReceiveNotificationResponseCallback ? onDidReceiveNotificationResponse,
524
- DidReceiveBackgroundNotificationResponseCallback ? onDidReceiveBackgroundNotificationResponse,
525
- }) async {
526
- assert (this .initializationSettings == null );
527
- this .initializationSettings = initializationSettings;
528
- this .onDidReceiveNotificationResponse = onDidReceiveNotificationResponse;
529
- this .onDidReceiveBackgroundNotificationResponse = onDidReceiveBackgroundNotificationResponse;
530
- return true ;
531
- }
532
-
533
- /// The value to be returned by [getNotificationAppLaunchDetails] .
534
- NotificationAppLaunchDetails ? appLaunchDetails;
535
-
536
- @override
537
- Future <NotificationAppLaunchDetails ?> getNotificationAppLaunchDetails () {
538
- return Future .value (appLaunchDetails);
539
- }
540
-
541
- void receiveNotificationResponse (NotificationResponse details) {
542
- if (onDidReceiveNotificationResponse != null ) {
543
- onDidReceiveNotificationResponse !(details);
544
- }
545
- }
546
- }
547
-
548
506
class FakeAndroidNotificationHostApi implements AndroidNotificationHostApi {
549
507
/// Lists currently active channels, result is aggregated from calls made to
550
508
/// [createNotificationChannel] and [deleteNotificationChannel] ,
0 commit comments