getUserCurrency function

Future<String?> getUserCurrency()

Implementation

Future<String?> getUserCurrency() async {
  try {
    final res = await _platform.getUserCurrency();
    if (res == null) {
      throw Exception('Unable to get user currency.');
    }
    return res;
  } catch (error, stackTrace) {
    Error.throwWithStackTrace(error, stackTrace);
  }
}