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篇
你 发表评论:
欢迎- 08-06nginx 反向代理
- 08-06跨表插入连续的日期,sheetsname函数#excel技巧
- 08-06初中生也能学的编程,不走弯路,先用后学
- 08-06find命令的“七种武器”:远不止-name和-type
- 08-06恶意代码常见的编程方式
- 08-06kali2021ping 外网不通
- 08-06因为一个函数strtok踩坑,我被老工程师无情嘲笑了
- 08-06hadoop集群搭建详细方法
- 15℃nginx 反向代理
- 最近发表
- 标签列表
-
- ifneq (61)
- 字符串长度在线 (61)
- googlecloud (64)
- powershellfor (73)
- messagesource (71)
- plsql64位 (73)
- vueproxytable (64)
- npminstallsave (63)
- #NAME? (61)
- promise.race (63)
- 2019cad序列号和密钥激活码 (62)
- window.performance (66)
- qt删除文件夹 (72)
- mysqlcaching_sha2_password (64)
- nacos启动失败 (64)
- ssh-add (70)
- yarnnode (62)
- abstractqueuedsynchronizer (64)
- source~/.bashrc没有那个文件或目录 (65)
- springboot整合activiti工作流 (70)
- jmeter插件下载 (61)
- 抓包分析 (60)
- idea创建mavenweb项目 (65)
- qcombobox样式表 (68)
- pastemac (61)
本文暂时没有评论,来添加一个吧(●'◡'●)