当前位置:网站首页>flutter 做底部的三个按键,有叠加,有填充
flutter 做底部的三个按键,有叠加,有填充
2022-07-30 23:13:00 【氤氲息】
//底部三个按键
Widget addBottomSection() {
return Container(
margin: const EdgeInsets.only(bottom: 24, left: 16, right: 16),
child: Row(
children: [
Expanded(
child: Container(
alignment: Alignment.center,//这个很重要
child: Stack(
clipBehavior: Clip.none,
alignment: Alignment.topRight,
children: [
GestureDetector(
onTap: () {
Future.delayed(const Duration(seconds: 1), () {
if (_isCanDrag) {
getBottleSetting();
}
});
setState(() {
_isDragAnimation = true;
});
dragPlay();
},
child: Stack(
clipBehavior: Clip.none,
alignment: Alignment.bottomCenter,
children: [
Container(
height: 102,
width: 102,
decoration: const BoxDecoration(
image: DecorationImage(
image:
AssetImage('assets/images/bg_drift_drag.png'),
fit: BoxFit.fill, // 完全填充
),
),
),
Positioned(
left: 10,
child: Container(
margin: const EdgeInsets.only(bottom: 20),
child: const Image(
image: AssetImage(
'assets/images/icon_drift_net.png'),
width: 100,
fit: BoxFit.fitWidth),
),
),
Container(
padding: const EdgeInsets.only(bottom: 10),
child: Text(
S.current.bottle_grab,
style: const TextStyle(
fontSize: 14,
color: Color(0xFFFFF5F1),
decoration: TextDecoration.none),
)),
],
),
),
Positioned(
right: -5, child: showMessageNumView(remainFishTimes))
],
),
)),
Expanded(
child: Container(
alignment: Alignment.center,
child: Stack(
clipBehavior: Clip.none,
alignment: Alignment.topRight,
children: [
GestureDetector(
onTap: () {
showThrowBottleDialog();
},
child: Stack(
clipBehavior: Clip.none,
alignment: Alignment.bottomCenter,
children: [
Container(
height: 102,
width: 102,
decoration: const BoxDecoration(
image: DecorationImage(
image:
AssetImage('assets/images/bg_drift_throw.png'),
fit: BoxFit.fill, // 完全填充
),
),
),
Positioned(
left: 20,
child: Container(
margin: const EdgeInsets.only(bottom: 35),
child: const Image(
image:
AssetImage('assets/images/icon_bottle.png'),
width: 64,
fit: BoxFit.fitWidth),
),
),
Container(
padding: const EdgeInsets.only(bottom: 10),
child: Text(
S.current.bottle_throw,
style: const TextStyle(
fontSize: 14,
color: const Color(0xFFFFF5F1),
decoration: TextDecoration.none),
)),
],
),
),
Positioned(
right: -5, child: showMessageNumView(remainThrowTimes))
],
),
)),
Expanded(
child: Container(
alignment: Alignment.center,
child: Stack(
clipBehavior: Clip.none,
alignment: Alignment.topRight,
children: [
GestureDetector(
onTap: () {
MyRouter.pushMy(context, const MyBottleNav())
.then((value) => getMessageNum());
},
child: Stack(
clipBehavior: Clip.none,
alignment: Alignment.bottomCenter,
children: [
Container(
height: 102,
width: 102,
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage(
'assets/images/bg_drift_bottles.png'),
fit: BoxFit.fill, // 完全填充
),
),
),
Positioned(
left: 10,
child: Container(
margin: const EdgeInsets.only(bottom: 35),
child: const Image(
image: AssetImage(
'assets/images/icon_drift_bottles.png'),
width: 84,
fit: BoxFit.fitWidth),
),
),
Container(
padding: const EdgeInsets.only(bottom: 10),
child: Text(
S.current.bottle_my,
style: const TextStyle(
fontSize: 14,
color: Color(0xFFFFF5F1),
decoration: TextDecoration.none),
)),
],
),
),
Positioned(right: -5, child: showMessageNumView(MesNum))
],
),
)),
],
),
);
}
边栏推荐
- PhpMetrics usage
- "NIO Cup" 2022 Nioke Summer Multi-School Training Camp 4 DHKLN
- 【无标题】
- ZZULIOJ:1120: 最值交换
- Golang 切片删除指定元素的几种方法
- ML's shap: Based on FIFA 2018 Statistics (2018 Russia World Cup) team match star classification prediction data set using RF random forest + calculating SHAP value single-sample force map/dependency c
- Go语学习笔记 - gorm使用 - gorm处理错误 Web框架Gin(十)
- Go语学习笔记 - gorm使用 - 表增删改查 Web框架Gin(八)
- 【LeetCode】42. 接雨水 - Go 语言题解
- IJCAI2022 Tutorial | Spoken Language Comprehension: Recent Advances and New Fields
猜你喜欢
Go语学习笔记 - gorm使用 - 事务操作 Web框架Gin(十一)
vulnhub靶机AI-Web-1.0渗透笔记
打动中产精英群体,全新红旗H5用产品力跑赢需求
Golang go-redis cluster模式下不断创建新连接,效率下降问题解决
【2022-05-31】JS逆向之易企秀
Kotlin特殊类
Apache Doris系列之:深入认识实时分析型数据库Apache Doris
ML之shap:基于FIFA 2018 Statistics(2018年俄罗斯世界杯足球赛)球队比赛之星分类预测数据集利用RF随机森林+计算SHAP值单样本力图/依赖关系贡献图可视化实现可解释性之攻略
ML's shap: Based on FIFA 2018 Statistics (2018 Russia World Cup) team match star classification prediction data set using RF random forest + calculating SHAP value single-sample force map/dependency c
win10重建索引
随机推荐
JS中? ?和??=和?.和 ||的区别
【LeetCode】64. 最小路径和 - Go 语言题解
2022牛客暑期多校训练营1 J Serval and Essay
第十九周进度(了解物联网基础知识)
grub learning
MySQL进阶sql性能分析
2022.7.27
"NIO Cup" 2022 Nioke Summer Multi-School Training Camp 4 DHKLN
Excel基础学习笔记
“蔚来杯“2022牛客暑期多校训练营4 N.Particle Arts 规律 方差
Week 19 Progress (Understanding IoT Basics)
阿里云视频点播+项目实战
如何在 AWS 中应用 DevOps 方法?
2021GDCPC Guangdong University Student Programming Competition B.Byfibonacci
【Untitled】
DFS题单以及模板汇总
The problem of sticky packets in tcp protocol transmission
StoneDB 为何敢称业界唯一开源的 MySQL 原生 HTAP 数据库?
IJCAI2022 Tutorial | Spoken Language Comprehension: Recent Advances and New Fields
Gxlcms audio novel system/novel listening system source code