diff --git a/test/model/binding.dart b/test/model/binding.dart index 91a89a6620c..394d89d988f 100644 --- a/test/model/binding.dart +++ b/test/model/binding.dart @@ -392,24 +392,6 @@ class FakeFlutterLocalNotificationsPlugin extends Fake implements FlutterLocalNo } } - /// Consume the log of calls made to [show]. - /// - /// This returns a list of the arguments to all calls made - /// to [show] since the last call to this method. - List takeShowCalls() { - final result = _showCalls; - _showCalls = []; - return result; - } - List _showCalls = []; - - @override - Future show(int id, String? title, String? body, - NotificationDetails? notificationDetails, {String? payload}) async { - assert(initializationSettings != null); - _showCalls.add((id, title, body, notificationDetails, payload: payload)); - } - /// The value to be returned by [getNotificationAppLaunchDetails]. NotificationAppLaunchDetails? appLaunchDetails; @@ -425,11 +407,6 @@ class FakeFlutterLocalNotificationsPlugin extends Fake implements FlutterLocalNo } } -typedef FlutterLocalNotificationsPluginShowCall = ( - int id, String? title, String? body, - NotificationDetails? notificationDetails, {String? payload} -); - class FakeAndroidFlutterLocalNotificationsPlugin extends Fake implements AndroidFlutterLocalNotificationsPlugin { /// Consume the log of calls made to [createNotificationChannel]. /// diff --git a/test/notifications/display_test.dart b/test/notifications/display_test.dart index 5095f86f7dd..6e008c3ccfa 100644 --- a/test/notifications/display_test.dart +++ b/test/notifications/display_test.dart @@ -356,14 +356,6 @@ extension AndroidNotificationChannelChecks on Subject get showBadge => has((x) => x.showBadge, 'showBadge'); } -extension ShowCallChecks on Subject { - Subject get id => has((x) => x.$1, 'id'); - Subject get title => has((x) => x.$2, 'title'); - Subject get body => has((x) => x.$3, 'body'); - Subject get notificationDetails => has((x) => x.$4, 'notificationDetails'); - Subject get payload => has((x) => x.payload, 'payload'); -} - extension on Subject { Subject get tag => has((x) => x.tag, 'tag'); Subject get id => has((x) => x.id, 'id'); @@ -381,49 +373,3 @@ extension on Subject { Subject get intentPayload => has((x) => x.intentPayload, 'intentPayload'); Subject get flags => has((x) => x.flags, 'flags'); } - -extension NotificationDetailsChecks on Subject { - Subject get android => has((x) => x.android, 'android'); - Subject get iOS => has((x) => x.iOS, 'iOS'); - Subject get macOS => has((x) => x.macOS, 'macOS'); - Subject get linux => has((x) => x.linux, 'linux'); -} - -extension AndroidNotificationDetailsChecks on Subject { - // The upstream [AndroidNotificationDetails] has many more properties - // which only apply to creating a channel, or to notifications before - // channels were introduced in Android 8. We ignore those here. - Subject get icon => has((x) => x.icon, 'icon'); - Subject get channelId => has((x) => x.channelId, 'channelId'); - Subject get styleInformation => has((x) => x.styleInformation, 'styleInformation'); - Subject get groupKey => has((x) => x.groupKey, 'groupKey'); - Subject get setAsGroupSummary => has((x) => x.setAsGroupSummary, 'setAsGroupSummary'); - Subject get groupAlertBehavior => has((x) => x.groupAlertBehavior, 'groupAlertBehavior'); - Subject get autoCancel => has((x) => x.autoCancel, 'autoCancel'); - Subject get ongoing => has((x) => x.ongoing, 'ongoing'); - Subject get color => has((x) => x.color, 'color'); - Subject?> get largeIcon => has((x) => x.largeIcon, 'largeIcon'); - Subject get onlyAlertOnce => has((x) => x.onlyAlertOnce, 'onlyAlertOnce'); - Subject get showWhen => has((x) => x.showWhen, 'showWhen'); - Subject get when => has((x) => x.when, 'when'); - Subject get usesChronometer => has((x) => x.usesChronometer, 'usesChronometer'); - Subject get chronometerCountDown => has((x) => x.chronometerCountDown, 'chronometerCountDown'); - Subject get showProgress => has((x) => x.showProgress, 'showProgress'); - Subject get maxProgress => has((x) => x.maxProgress, 'maxProgress'); - Subject get progress => has((x) => x.progress, 'progress'); - Subject get indeterminate => has((x) => x.indeterminate, 'indeterminate'); - Subject get ticker => has((x) => x.ticker, 'ticker'); - Subject get channelAction => has((x) => x.channelAction, 'channelAction'); - Subject get visibility => has((x) => x.visibility, 'visibility'); - Subject get timeoutAfter => has((x) => x.timeoutAfter, 'timeoutAfter'); - Subject get category => has((x) => x.category, 'category'); - Subject get fullScreenIntent => has((x) => x.fullScreenIntent, 'fullScreenIntent'); - Subject get shortcutId => has((x) => x.shortcutId, 'shortcutId'); - Subject get additionalFlags => has((x) => x.additionalFlags, 'additionalFlags'); - Subject?> get actions => has((x) => x.actions, 'actions'); - Subject get subText => has((x) => x.subText, 'subText'); - Subject get tag => has((x) => x.tag, 'tag'); - Subject get colorized => has((x) => x.colorized, 'colorized'); - Subject get number => has((x) => x.number, 'number'); - Subject get audioAttributesUsage => has((x) => x.audioAttributesUsage, 'audioAttributesUsage'); -}