getDeviceId static method

String getDeviceId(
  1. SharedPreferences prefs
)

Implementation

static String getDeviceId(SharedPreferences prefs) {
  var deviceId = prefs.getString(Application.uuidKey);

  if (deviceId == null) {
    var uuid = const Uuid();
    deviceId = uuid.v4();
  }

  return deviceId;
}