@@ -4,7 +4,6 @@ import 'package:firebase_core/firebase_core.dart';
4
4
import 'package:firebase_messaging/firebase_messaging.dart' ;
5
5
import 'package:flutter/foundation.dart' ;
6
6
import 'package:flutter_local_notifications/flutter_local_notifications.dart' hide Person;
7
- import 'package:flutter_local_notifications_platform_interface/flutter_local_notifications_platform_interface.dart' ;
8
7
import 'package:test/fake.dart' ;
9
8
import 'package:url_launcher/url_launcher.dart' as url_launcher;
10
9
import 'package:zulip/host/android_notifications.dart' ;
@@ -513,34 +512,6 @@ class FakeFlutterLocalNotificationsPlugin extends Fake implements FlutterLocalNo
513
512
return true ;
514
513
}
515
514
516
- FlutterLocalNotificationsPlatform ? _platform;
517
-
518
- @override
519
- T ? resolvePlatformSpecificImplementation <T extends FlutterLocalNotificationsPlatform >() {
520
- // This follows the logic of the base class's implementation,
521
- // but supplies our fakes for the per-platform classes.
522
- assert (initializationSettings != null );
523
- assert (T != FlutterLocalNotificationsPlatform );
524
- if (kIsWeb) return null ;
525
- switch (defaultTargetPlatform) {
526
- case TargetPlatform .android:
527
- assert (_platform == null || _platform is FakeAndroidFlutterLocalNotificationsPlugin );
528
- if (T != AndroidFlutterLocalNotificationsPlugin ) return null ;
529
- return (_platform ?? = FakeAndroidFlutterLocalNotificationsPlugin ()) as T ? ;
530
-
531
- case TargetPlatform .iOS:
532
- assert (_platform == null || _platform is FakeIOSFlutterLocalNotificationsPlugin );
533
- if (T != IOSFlutterLocalNotificationsPlugin ) return null ;
534
- return (_platform ?? = FakeIOSFlutterLocalNotificationsPlugin ()) as T ? ;
535
-
536
- case TargetPlatform .linux:
537
- case TargetPlatform .macOS:
538
- case TargetPlatform .windows:
539
- case TargetPlatform .fuchsia:
540
- return null ;
541
- }
542
- }
543
-
544
515
/// The value to be returned by [getNotificationAppLaunchDetails] .
545
516
NotificationAppLaunchDetails ? appLaunchDetails;
546
517
@@ -557,21 +528,6 @@ class FakeFlutterLocalNotificationsPlugin extends Fake implements FlutterLocalNo
557
528
}
558
529
559
530
class FakeAndroidFlutterLocalNotificationsPlugin extends Fake implements AndroidFlutterLocalNotificationsPlugin {
560
- /// Consume the log of calls made to [createNotificationChannel] .
561
- ///
562
- /// This returns a list of the arguments to all calls made
563
- /// to [createNotificationChannel] since the last call to this method.
564
- List <AndroidNotificationChannel > takeCreatedChannels () {
565
- final result = _createdChannels;
566
- _createdChannels = [];
567
- return result;
568
- }
569
- List <AndroidNotificationChannel > _createdChannels = [];
570
-
571
- @override
572
- Future <void > createNotificationChannel (AndroidNotificationChannel notificationChannel) async {
573
- _createdChannels.add (notificationChannel);
574
- }
575
531
}
576
532
577
533
class FakeIOSFlutterLocalNotificationsPlugin extends Fake implements IOSFlutterLocalNotificationsPlugin {
0 commit comments