parseMap<K, V> static method
Implementation
static Map<K, V>? parseMap<K, V>(
{required Object? value, required String name, throwOnNull = false}) {
try {
return Map<K, V>.from(value as Map);
} catch (e) {
if (!throwOnNull) return null;
}
if (value == null) {
throw TronPluginException('Missing parameter: $name.');
}
throw TronPluginException('Invalid value for parameter: $name.');
}