notif error fix?

This commit is contained in:
julian 2023-07-25 12:12:10 -06:00
parent 7d1d7cb804
commit 590717560e

View file

@ -13,6 +13,7 @@ import 'dart:async';
import 'package:event_bus/event_bus.dart'; import 'package:event_bus/event_bus.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:stackwallet/providers/global/prefs_provider.dart';
import 'package:stackwallet/services/notifications_api.dart'; import 'package:stackwallet/services/notifications_api.dart';
import 'package:stackwallet/themes/coin_icon_provider.dart'; import 'package:stackwallet/themes/coin_icon_provider.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart';
@ -84,6 +85,7 @@ class _CryptoNotificationsState extends ConsumerState<CryptoNotifications> {
@override @override
void initState() { void initState() {
NotificationApi.prefs = ref.read(prefsChangeNotifierProvider);
_streamSubscription = CryptoNotificationsEventBus.instance _streamSubscription = CryptoNotificationsEventBus.instance
.on<CryptoNotificationEvent>() .on<CryptoNotificationEvent>()
.listen( .listen(