getDeviceRegistration method

Future<DeviceRegistration?> getDeviceRegistration()

Implementation

Future<DeviceRegistration?> getDeviceRegistration() async {
  Map<String, String> deviceInfo = await _getDeviceDetails();
  String? deviceId = deviceInfo['identifier'];

  var res = await Invoker.get<List<DeviceRegistration>?>(
      '/messaging/registrations/$deviceId');

  return res != null ? res[0] : null;
}