我有以下小部件:
Widget get _animatedButtonUI => Container(
height: 60,
width: 290,
decoration: BoxDecoration(
border: Border.all(
color: Color(0xFF9EC33B),
),
borderRadius: BorderRadius.circular(100.0),
color: Colors.white,
),
child: Center(
child: Text(
'COTINUE WITH GOOGLE',
style: TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.bold,
color: Color(0xFF9EC33B),
),
),
),
);
如下图所示:
现在,我需要在左侧添加图标Text
,如下图所示:
那我该怎么做...
您只需要在容器内插入一行,就像这样:
Container(
height: 60,
width: 290,
decoration: BoxDecoration(
border: Border.all(
color: Color(0xFF9EC33B),
),
borderRadius: BorderRadius.circular(100.0),
color: Colors.white,
),
child: Row(
children: <Widget>[
Image.asset(yourImage),
Center(
child: Text(
'COTINUE WITH GOOGLE',
style: TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.bold,
color: Color(0xFF9EC33B),
),
),
),
],
);
编辑:请确保您修正了该拼写错误(“与Google合并” =>“与GOOGLE合并”)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句