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篇
你 发表评论:
欢迎- 最近发表
-
- Python 中 必须掌握的 20 个核心函数—len()函数
- 用PLC的指针实现字符串转byte(Codesys平台)一文极简搞懂指针
- EXCEL如何用函数读取复杂字符串中的数据
- 2025-07-19:计算字符串的镜像分数。用go语言,给定一个字符串 s
- 2025-07-10:字符相同的最短子字符串Ⅰ。用go语言,给定一个长度
- 基于物理特征融合与机器学习的多井协同钻井速率实时预测与优化(
- [电子学报文章精选]一种基于特征融合的恶意代码快速检测方法
- 强大的可视化流程图编辑神器 — LogicFlow
- 前端框架太卷了!字节企业级框架Arco Design Mobile开源了
- Vue独立组件——11个最佳Vue.js日期选择器组件
- 标签列表
-
- ifneq (61)
- 字符串长度在线 (61)
- googlecloud (64)
- flutterrun (59)
- powershellfor (73)
- messagesource (71)
- plsql64位 (73)
- vueproxytable (64)
- npminstallsave (63)
- 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)
本文暂时没有评论,来添加一个吧(●'◡'●)