add JumpToEventController to allow jumping to events from the NotificationsPage when it has been pushed from the NotificationController

This commit is contained in:
Henry Hiles 2026-09-26 19:37:47 -04:00
commit 1c1f585362
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
5 changed files with 70 additions and 65 deletions

View file

@ -0,0 +1,15 @@
import "package:flutter_riverpod/flutter_riverpod.dart";
class JumpToEventController extends Notifier<String?> {
@override
String? build() => null;
void set(String? eventId) => state = eventId;
@override
bool updateShouldNotify(_, _) => true;
static final provider = NotifierProvider<JumpToEventController, String?>(
JumpToEventController.new,
);
}

View file

@ -37,7 +37,6 @@ class NotificationController
MaterialPageRoute(
builder: (_) => NotificationsPage(
highlightedEventId: eventId,
jumpToEvent: (eventId) {},
defaultToAllNotifications: true,
),
),
@ -63,7 +62,6 @@ class NotificationController
MaterialPageRoute(
builder: (_) => NotificationsPage(
highlightedEventId: eventId,
jumpToEvent: (eventId) {},
defaultToAllNotifications: true,
),
),