我的应用程序中有一个按钮,例如
下面是相同的代码
Widget loginButtonChild = const Text(
"Log in",
style: TextStyle(
color: Colors.white,
fontFamily: "OpenSans-Regular",
),
);
FlatButton.icon(
shape: RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(18.0),
side: BorderSide(color: Colors.red)),
color: Colors.red,
label: loginButtonChild,
icon: Icon(Icons.arrow_forward ),
onPressed: () {
//some function
},
)
Run Code Online (Sandbox Code Playgroud)
我正在尝试创建一个类似的按钮
任何人都可以在这方面提供帮助或任何建议吗?
我的应用程序中有一个底部工作表,对于 5 + 尺寸的手机可以正确显示,但是当我在较小屏幕的手机上运行时,我会得到如下所示的结果
问题在于填充跨越了范围,是否有其他方法来创建底片,并且其内容大小应该特定于设备?如何自动调整字体大小,以及根据设备特定的填充。
下面是相同的代码
showModalBottomSheet<void>(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
context: context,
isScrollControlled: true,
builder: (BuildContext context) {
return FractionallySizedBox(
heightFactor: 0.2,
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 22.0,
vertical: 14.0,
),
child: Column(
children: <Widget>[
ListTile(
leading: Icon(Icons.remove_red_eye),
title: Text(
"View",
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.justify,
maxLines: 1,
style: TextStyle(
fontSize:
ScreenUtil(allowFontScaling: true).setSp(50),
),
),
onTap: () {
Navigator.of(context).pop();
setGenerateReportView(context, count, data);
}),
ListTile(
leading: Icon(Icons.file_download),
title: Text(
"Download",
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.justify,
maxLines: 1,
style: TextStyle(
fontSize: …
Run Code Online (Sandbox Code Playgroud)