【发布时间】:2020-10-11 16:16:41
【问题描述】:
我有一个颤振的网络应用程序。当我在我的电脑上使用它时,一切正常。但是如果我在我的手机浏览器上使用它,文本的部分就会丢失。文本或框的边界无关紧要,它只是丢失了。只有当我按下它时,它才会显示整个文本。有谁知道为什么会这样?哦,当我缩短文本时,它是一样的。最后一部分不见了。
已经尝试使用 FittedBox 作为文本,但不起作用。谢谢
alertBoxes 的代码:
void showCustomDialog(BuildContext context, String message) {
showDialog(
context: context,
child: AlertDialog(
title: FittedBox(
fit: BoxFit.scaleDown,
child: Text(
message,
style: TextStyle(color: Colors.red),
),
),
actions: [
FlatButton(
onPressed: () {
Navigator.of(context).pop();
},
child: Text(
"Abbrechen",
style: TextStyle(color: Colors.red),
),
),
]));
}
对话的第一部分:
Widget dialog(BuildContext context) {
return AlertDialog(
title: Text("Kategorie Hinzufügen?"),
content: TextFormField(
controller: textEditingController,
decoration: InputDecoration(
labelText: "Namen eingeben",
prefixIcon: Icon(Icons.category_outlined)),
onChanged: (String val) {},
),
actions: [
FlatButton(
onPressed: () {
Navigator.of(context).pop();
},
child: Text(
"Abbrechen",
style: TextStyle(color: Colors.red),
),
),
【问题讨论】: