use selectableText for some errors (#8862)

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages 2024-07-28 11:13:19 +08:00 committed by GitHub
parent 7e8d3bd2ac
commit ee5314de20
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1214,7 +1214,8 @@ Widget msgboxContent(String type, String title, String text) {
translate(title),
style: TextStyle(fontSize: 21),
).marginOnly(bottom: 10),
Text(translateText(text), style: const TextStyle(fontSize: 15)),
SelectableText(translateText(text),
style: const TextStyle(fontSize: 15)),
],
),
),
@ -2813,7 +2814,7 @@ Widget buildErrorBanner(BuildContext context,
alignment: Alignment.centerLeft,
child: Tooltip(
message: translate(err.value),
child: Text(
child: SelectableText(
translate(err.value),
),
)).marginSymmetric(vertical: 2),
@ -3502,7 +3503,7 @@ Widget netWorkErrorWidget() {
onPressed: gFFI.userModel.refreshCurrentUser,
child: Text(translate("Retry")))
.marginSymmetric(vertical: 16),
Text(gFFI.userModel.networkError.value,
SelectableText(gFFI.userModel.networkError.value,
style: TextStyle(fontSize: 11, color: Colors.red)),
],
));