registerCurrentUser method

Future<void> registerCurrentUser(
  1. String userId
)

Register current user's device for notifications

Implementation

Future<void> registerCurrentUser(String userId) async {
  if (_currentService == null) {
    throw Exception('Notification service not configured');
  }

  final token = await _currentService!.getDeviceToken();
  if (token != null) {
    await _currentService!.registerUserToken(
      userId: userId,
      token: token,
    );
  }
}