@@ -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' ;
@@ -269,17 +268,9 @@ class TestZulipBinding extends ZulipBinding {
269
268
}
270
269
271
270
void _resetNotifications () {
272
- _notificationsPlugin = null ;
273
271
_androidNotificationHostApi = null ;
274
272
}
275
273
276
- FakeFlutterLocalNotificationsPlugin ? _notificationsPlugin;
277
-
278
- @override
279
- FakeFlutterLocalNotificationsPlugin get notifications {
280
- return (_notificationsPlugin ?? = FakeFlutterLocalNotificationsPlugin ());
281
- }
282
-
283
274
FakeAndroidNotificationHostApi ? _androidNotificationHostApi;
284
275
285
276
@override
@@ -494,39 +485,6 @@ typedef FirebaseMessagingRequestPermissionCall = ({
494
485
bool sound,
495
486
});
496
487
497
- class FakeFlutterLocalNotificationsPlugin extends Fake implements FlutterLocalNotificationsPlugin {
498
- InitializationSettings ? initializationSettings;
499
- DidReceiveNotificationResponseCallback ? onDidReceiveNotificationResponse;
500
- DidReceiveBackgroundNotificationResponseCallback ? onDidReceiveBackgroundNotificationResponse;
501
-
502
- @override
503
- Future <bool ?> initialize (
504
- InitializationSettings initializationSettings, {
505
- DidReceiveNotificationResponseCallback ? onDidReceiveNotificationResponse,
506
- DidReceiveBackgroundNotificationResponseCallback ? onDidReceiveBackgroundNotificationResponse,
507
- }) async {
508
- assert (this .initializationSettings == null );
509
- this .initializationSettings = initializationSettings;
510
- this .onDidReceiveNotificationResponse = onDidReceiveNotificationResponse;
511
- this .onDidReceiveBackgroundNotificationResponse = onDidReceiveBackgroundNotificationResponse;
512
- return true ;
513
- }
514
-
515
- /// The value to be returned by [getNotificationAppLaunchDetails] .
516
- NotificationAppLaunchDetails ? appLaunchDetails;
517
-
518
- @override
519
- Future <NotificationAppLaunchDetails ?> getNotificationAppLaunchDetails () {
520
- return Future .value (appLaunchDetails);
521
- }
522
-
523
- void receiveNotificationResponse (NotificationResponse details) {
524
- if (onDidReceiveNotificationResponse != null ) {
525
- onDidReceiveNotificationResponse !(details);
526
- }
527
- }
528
- }
529
-
530
488
class FakeAndroidNotificationHostApi implements AndroidNotificationHostApi {
531
489
/// Consume the log of calls made to [createNotificationChannel] .
532
490
///
0 commit comments