【发布时间】:2020-06-17 09:01:02
【问题描述】:
我试图在按钮的右上角获得一个可点击的图标。我尝试将 FloatingActionButton 添加到行小部件,但它只是将其添加到按钮的右侧。我希望它漂浮在右上角的按钮上。任何帮助,将不胜感激。我有一个屏幕截图,它现在显示在下面。
ButtonTheme (
minWidth: 250.0,
height: 80.0,
buttonColor: Color.fromRGBO(234, 135, 137, 1.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
RaisedButton (
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
side: BorderSide(
color: Colors.transparent,
),
),
child: Text(
'Daily Challenge',
style: TextStyle(
color: Colors.white,
fontSize: 22.0,
fontFamily: 'MuseoSans',
),
),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => DailyMedChallenge(uid: user.uid, qidDC: user.qidDC)),
);
},
),
Container(
width: 35.0,
height: 35.0,
child: FloatingActionButton(
child: Icon(
Icons.help,
),
backgroundColor: Colors.grey,
onPressed: () {
},
),
)
],
),
),
【问题讨论】: