mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-13 19:47:17 +00:00
make errorText of DialogTextField selectable (#11013)
Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
@@ -412,7 +412,9 @@ class DialogTextField extends StatelessWidget {
|
|||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: TextField(
|
child: Column(
|
||||||
|
children: [
|
||||||
|
TextField(
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText: title,
|
labelText: title,
|
||||||
hintText: hintText,
|
hintText: hintText,
|
||||||
@@ -420,8 +422,6 @@ class DialogTextField extends StatelessWidget {
|
|||||||
suffixIcon: suffixIcon,
|
suffixIcon: suffixIcon,
|
||||||
helperText: helperText,
|
helperText: helperText,
|
||||||
helperMaxLines: 8,
|
helperMaxLines: 8,
|
||||||
errorText: errorText,
|
|
||||||
errorMaxLines: 8,
|
|
||||||
),
|
),
|
||||||
controller: controller,
|
controller: controller,
|
||||||
focusNode: focusNode,
|
focusNode: focusNode,
|
||||||
@@ -430,6 +430,20 @@ class DialogTextField extends StatelessWidget {
|
|||||||
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(),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user