草庐IT

HereSome

全部标签

layout - 在Flutter中,如何使用FittedBox调整行内文本的大小?

我有一行,每边都有一个图标,然后是中间有一个图标的文本:@overrideWidgetbuild(BuildContextcontext){returnRow(children:[Icon(Icons.arrow_back),Expanded(child:SizedBox()),Icon(Icons.account_box),Text("SomeTextHere",maxLines:1),//➜Thisisthetext.Expanded(child:SizedBox()),Icon(Icons.arrow_forward),],);}当文本变得足够大以填满整个空间时,我希望Fitte

layout - 在Flutter中,如何使用FittedBox调整行内文本的大小?

我有一行,每边都有一个图标,然后是中间有一个图标的文本:@overrideWidgetbuild(BuildContextcontext){returnRow(children:[Icon(Icons.arrow_back),Expanded(child:SizedBox()),Icon(Icons.account_box),Text("SomeTextHere",maxLines:1),//➜Thisisthetext.Expanded(child:SizedBox()),Icon(Icons.arrow_forward),],);}当文本变得足够大以填满整个空间时,我希望Fitte