I try to implemnt the validation error message but, Based on on my UI i need to implement the text with icon, i search online i fond errorborder but not icon besed of errortext. How to implement the validation error text with icon?
TextField(
autocorrect: true,
autofocus: false,
controller: reasonController,
style: textfieldlableStyle,
textInputAction: TextInputAction.done,
textCapitalization: TextCapitalization.sentences,
keyboardType: TextInputType.multiline,
maxLines: 10,
maxLength: null,
decoration: InputDecoration(
isDense: true,
hintText: "I’m canceling because",
hintStyle: TextStyle(
fontFamily: "regular",
color: MyColors.fieldLabel,
fontSize: 16),
focusedBorder: null,
errorBorder:OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(4)),
borderSide: BorderSide(
width: 1,
color: Colors.red,
)),
errorText: _cancelValidate ? 'Details can\'t be Empty' : null,
contentPadding:
EdgeInsets.only(bottom: 4, top: 0),
)),
你可以在这里使用 unicode<\/p>
errorText: _cancelValidate ? '\u24d8 Details can\'t be Empty' : null,
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.