getFields<T> method
Implementation
List<T> getFields<T>(int tag, {bool allowNull = true}) {
final result = where((element) => element.tagNumber == tag);
if (result.isEmpty && !allowNull) {
throw TronPluginException("field id does not exist.",
details: {"fieldIds": map((e) => e.tagNumber).join(", "), "id": tag});
}
return result.map((e) => e.get<T>()).toList();
}