getErrorText method
Implementation
String? getErrorText(BlocXTextFieldOptions options) {
int errorIndex = bloc.state.errors.keys.toList().indexWhere((e) => e == widget.formKey);
if (errorIndex >= 0) {
return BlocXLocalizations.localizations.errorCodeMessage(
bloc.state.errors.values.toList()[errorIndex].first,
);
}
return options.errorText;
}