errors method
Check if any error entries are present in the stack. Returns a list of error strings if any are found, null if none are found.
Implementation
List<String>? errors() {
if (_stack.isEmpty) {
return null;
}
return _stack.toList
.where((e) => e.hint == dataHints.error)
.map((e) => e.data)
.toList()
.cast<String>();
}