parseList<T> static method
Implementation
static List<T>? parseList<T>(
{required Object? value,
required String name,
bool throwOnNull = false}) {
if (value == null && !throwOnNull) return null;
try {
return List<T>.from(value as List);
} catch (e) {
if (!throwOnNull) return null;
}
if (value == null) {
throw TronPluginException("Missing parameter: $name.");
}
throw TronPluginException("Invalid List value for parameter: $name.");
}