hyzp_ybqx-Commit143:用 Expanded 解决Text内容展示越界問題

This commit is contained in:
WinUser01
2022-05-03 23:00:58 +08:00
parent 0aea1358f2
commit f09362e635
3 changed files with 13 additions and 786 deletions
+7 -3
View File
@@ -11,6 +11,7 @@ import 'package:keyboard_avoider/keyboard_avoider.dart';
//
import '../../../components/commonFun.dart';
//import 'package:hyzp_ybqx/widget/player_pro_new.dart';
import '../../../components/dioFun.dart';
import '../../../components/doJSON.dart';
@@ -112,7 +113,8 @@ class _FhycxPageState extends State<FhycxContentNew> {
_mapTsjjGetTsStatus = await tsjjGetTsStatus(widget.id);
// 获取网络图片尺寸
await flustars.WidgetUtil.getImageWH(url: getMediaUrl(_mapGetTsjjGetData['pic_url'])).then((rect) {
await flustars.WidgetUtil.getImageWH(url: getMediaUrl(_mapGetTsjjGetData['pic_url']))
.then((rect) {
if (null != rect) {
_radioImage = rect.height / rect.width;
}
@@ -618,8 +620,10 @@ class _FhycxPageState extends State<FhycxContentNew> {
width: ScreenUtil().setWidth(1022) / _radio,
child: Row(mainAxisAlignment: MainAxisAlignment.start, children: <Widget>[
SizedBox(width: ScreenUtil().setWidth(_marginLeft)),
Text('$_hyshlx用户:' + _hyshMap['uname'],
textAlign: TextAlign.left, overflow: TextOverflow.ellipsis),
// Flutter 解决Text内容展示越界
Expanded(
child: Text('$_hyshlx用户:' + _hyshMap['uname'],
textAlign: TextAlign.left, overflow: TextOverflow.ellipsis)),
]),
),
SizedBox(width: ScreenUtil().setWidth(_marginLeft)),