getUserId static method

Future<String> getUserId()

Implementation

static Future<String> getUserId() async {
  String? userId = await _readUserIdFromPrefs();

  if (userId == null) {
    userId = _generateUserId();
    await _writeUserIdToPrefs(userId);
  }

  return userId;
}