refact, win, clipboard, notify callback, tmp commit

Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
dignow
2023-06-29 13:47:55 +08:00
parent 1dd599b011
commit fc8db69d9e
4 changed files with 77 additions and 7 deletions

View File

@@ -998,6 +998,16 @@ Widget msgboxIcon(String type) {
// title should be null
Widget msgboxContent(String type, String title, String text) {
String translateText(String text) {
List<String> words = text.split(' ');
if (words.isNotEmpty && words[0].endsWith('_tip')) {
words[0] = translate(words[0]);
return words.join(' ');
} else {
return translate(text);
}
}
return Row(
children: [
msgboxIcon(type),
@@ -1009,7 +1019,7 @@ Widget msgboxContent(String type, String title, String text) {
translate(title),
style: TextStyle(fontSize: 21),
).marginOnly(bottom: 10),
Text(translate(text), style: const TextStyle(fontSize: 15)),
Text(translateText(text), style: const TextStyle(fontSize: 15)),
],
),
),