mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-05-11 10:26:19 +02:00
make errorText of DialogTextField selectable (#11013)
Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
parent
7305b6bd1c
commit
171d178b09
1 changed files with 32 additions and 18 deletions
|
@ -412,24 +412,38 @@ class DialogTextField extends StatelessWidget {
|
||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: TextField(
|
child: Column(
|
||||||
decoration: InputDecoration(
|
children: [
|
||||||
labelText: title,
|
TextField(
|
||||||
hintText: hintText,
|
decoration: InputDecoration(
|
||||||
prefixIcon: prefixIcon,
|
labelText: title,
|
||||||
suffixIcon: suffixIcon,
|
hintText: hintText,
|
||||||
helperText: helperText,
|
prefixIcon: prefixIcon,
|
||||||
helperMaxLines: 8,
|
suffixIcon: suffixIcon,
|
||||||
errorText: errorText,
|
helperText: helperText,
|
||||||
errorMaxLines: 8,
|
helperMaxLines: 8,
|
||||||
),
|
),
|
||||||
controller: controller,
|
controller: controller,
|
||||||
focusNode: focusNode,
|
focusNode: focusNode,
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
obscureText: obscureText,
|
obscureText: obscureText,
|
||||||
keyboardType: keyboardType,
|
keyboardType: keyboardType,
|
||||||
inputFormatters: inputFormatters,
|
inputFormatters: inputFormatters,
|
||||||
maxLength: maxLength,
|
maxLength: maxLength,
|
||||||
|
),
|
||||||
|
if (errorText != null)
|
||||||
|
Align(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: SelectableText(
|
||||||
|
errorText!,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Theme.of(context).colorScheme.error,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.left,
|
||||||
|
).paddingOnly(top: 8, left: 12),
|
||||||
|
),
|
||||||
|
],
|
||||||
).workaroundFreezeLinuxMint(),
|
).workaroundFreezeLinuxMint(),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue