我有一个带有图标和标题的图标按钮.按钮的标题来自API,它是两个词的组合,有时甚至超过两个词.即中国餐馆或墨西哥餐馆.有时,如果名称太大,它会 destruct 单词Restaurant;有时,它也会 destruct 名称.那么,有没有办法解决这个问题,这样我就可以在不 destruct 单词的情况下看到完整的名称?我试过用它.
textOverflow: TextOverflow.ellipsis,
and also tried max line to two/three. but I am not getting the desired result.
on large screen its working fine i am having problems only on small devices.
对此有什么帮助或建议吗?谢谢.
IconButton(
icon: Icon(Icon.resutaurant),
title: restaurantname,
textOverflow: TextOverflow.ellipsis,
onPressed: () {},
),