getCustomReplacements static method

Future<Map<String, String>?> getCustomReplacements()

Get the current saved custom replacements. It will be null if no map has been saved

Implementation

static Future<Map<String, String>?> getCustomReplacements() async {
  try {
    dynamic result = await _channel.invokeMethod(
      'get_custom_replacements',
    );

    if (result == null) {
      return result;
    } else if (result is Map<String, String>?) {
      return result;
    } else if (result is Map) {
      return Map<String, String>.from(result);
    } else if (result is String) {
      return json.decode(result);
    }
  } catch (e) {
    rethrow;
  }
  return null;
}