class CustomRoundRectButton extends StatelessWidget {
Function() p;
String text;
Color backgroundColor;
Color txtColor;
double height;
double width;
double borderCircle;
static const Color c = Color.fromARGB(255, 62, 139, 202);
CustomRoundRectButton(
{Key? key,
this.backgroundColor = c,
this.txtColor = Colors.white,
this.height = 30,
this.width = 0,
this.borderCircle = 30,
required this.text,
required this.p})
: super(key: key);
// HexColor("#0073b0")
@override
Widget build(BuildContext context) {
return SizedBox(
width: width == 0 ? MediaQuery.of(context).size.width : width,
child: ElevatedButton(
onPressed: () {
p();
},
style: ElevatedButton.styleFrom(
backgroundColor: backgroundColor,
minimumSize: Size(double.infinity, height),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(borderCircle))),
child: Text(
text,
style: TextStyle(color: txtColor),
),
),
);
}
}
网站首页 > 博客文章 正文
猜你喜欢
- 2024-08-29 Flutter 如何检查一个小部件是否可见 visbilitydetector来帮你实现
- 2024-08-29 Flutter基础widgets教程-FloatingActionButton篇
- 2024-08-29 flutter好用的轮子推荐八-flutter一个超酷动画的底部tab栏
- 2024-08-29 Flutter基础widgets教程-ButtonBar篇
- 2024-08-29 Flutter——状态管理(state)(flutter 状态管理的作用)
- 2024-08-29 android studio 工具创建Flutter项目的方法总结
- 2024-08-29 Flutter实战经验(四):使用原生的调试器
- 2024-08-29 Flutter底部弹窗CupertinoActionSheet 分享、选择都可以用
- 2024-08-29 Flutter中定位功能的实现(flutter positioned)
- 2024-08-29 Flutter基础widgets教程-IconButton篇
你 发表评论:
欢迎- 最近发表
- 标签列表
-
- powershellfor (55)
- messagesource (56)
- aspose.pdf破解版 (56)
- promise.race (63)
- 2019cad序列号和密钥激活码 (62)
- window.performance (66)
- qt删除文件夹 (72)
- mysqlcaching_sha2_password (64)
- ubuntu升级gcc (58)
- nacos启动失败 (64)
- ssh-add (70)
- jwt漏洞 (58)
- macos14下载 (58)
- yarnnode (62)
- abstractqueuedsynchronizer (64)
- source~/.bashrc没有那个文件或目录 (65)
- springboot整合activiti工作流 (70)
- jmeter插件下载 (61)
- 抓包分析 (60)
- idea创建mavenweb项目 (65)
- vue回到顶部 (57)
- qcombobox样式表 (68)
- vue数组concat (56)
- tomcatundertow (58)
- pastemac (61)
本文暂时没有评论,来添加一个吧(●'◡'●)