getUserId static method

Future<String?> getUserId()

Implementation

static Future<String?> getUserId() async {
  try {
    return await _channel.invokeMethod<String?>('getUserId');
  } on PlatformException catch (e) {
    // ignore: avoid_print
    print('Failed to get user ID: ${e.message}');
    return null;
  }
}