feat:修改开锁按钮 ui
This commit is contained in:
parent
c40a95641a
commit
6f97b6812e
BIN
star_lock/images/icon_circle_dotted.png
Normal file
BIN
star_lock/images/icon_circle_dotted.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.3 KiB |
BIN
star_lock/images/icon_lock_err.png
Normal file
BIN
star_lock/images/icon_lock_err.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.3 KiB |
BIN
star_lock/images/icon_lock_fill.png
Normal file
BIN
star_lock/images/icon_lock_fill.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
@ -232,8 +232,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
Obx(() {
|
GestureDetector(
|
||||||
return GestureDetector(
|
|
||||||
onTap: state.openDoorBtnisUneable.value == true
|
onTap: state.openDoorBtnisUneable.value == true
|
||||||
? () {
|
? () {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -249,6 +248,8 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
}
|
}
|
||||||
: null,
|
: null,
|
||||||
child: Container(
|
child: Container(
|
||||||
|
width: 100.r,
|
||||||
|
height: 100.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white.withOpacity(0.9),
|
color: Colors.white.withOpacity(0.9),
|
||||||
borderRadius: BorderRadius.circular(100.w),
|
borderRadius: BorderRadius.circular(100.w),
|
||||||
@ -262,49 +263,47 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
]),
|
]),
|
||||||
margin: EdgeInsets.only(left: 35.w, bottom: 15.h),
|
margin: EdgeInsets.only(left: 35.w, bottom: 15.h),
|
||||||
child: Stack(
|
child: Stack(
|
||||||
|
alignment: AlignmentDirectional.center,
|
||||||
children: [
|
children: [
|
||||||
FlavorsImg(
|
|
||||||
child: Image.asset(
|
|
||||||
state.openDoorBtnisUneable.value == false
|
state.openDoorBtnisUneable.value == false
|
||||||
? 'images/main/icon_main_openLockBtn_grey.png'
|
? Icon(
|
||||||
: (state.isOpenPassageMode.value == 1
|
Icons.bluetooth_searching,
|
||||||
? 'images/main/icon_main_normallyOpenMode_center.png'
|
size: 48.r,
|
||||||
: 'images/main/icon_main_openLockBtn_center.png'),
|
color: AppColors.mainColor,
|
||||||
width: 96.r,
|
)
|
||||||
height: 96.r,
|
: Image.asset(
|
||||||
// color: AppColors.primaryTopColor,
|
state.isOpenPassageMode.value == 1
|
||||||
),
|
? 'images/icon_lock_err.png'
|
||||||
|
: 'images/icon_lock_fill.png',
|
||||||
|
width: 38.r,
|
||||||
|
height: 38.r,
|
||||||
|
color: AppColors.mainColor,
|
||||||
),
|
),
|
||||||
state.openDoorBtnisUneable.value == false
|
state.openDoorBtnisUneable.value == false
|
||||||
? Positioned(
|
? Positioned(
|
||||||
child: FlavorsImg(
|
child: Icon(
|
||||||
child: Image.asset(
|
Icons.bluetooth_searching,
|
||||||
'images/main/icon_main_openLockBtn_grey.png',
|
size: 96.r,
|
||||||
width: 96.r,
|
|
||||||
height: 96.r,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: state.openLockBtnState.value == 1
|
: state.openLockBtnState.value == 1
|
||||||
? buildRotationTransition(
|
? xhjBuildRotationTransition(
|
||||||
width: 96.r,
|
width: 88.r,
|
||||||
height: 96.r,
|
height: 88.r,
|
||||||
)
|
)
|
||||||
: Positioned(
|
: Positioned(
|
||||||
child: FlavorsImg(
|
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
state.isOpenPassageMode.value == 1
|
'images/icon_circle_dotted.png',
|
||||||
? 'images/main/icon_main_normallyOpenMode_circle.png'
|
width: 88.r,
|
||||||
: 'images/main/icon_main_openLockBtn_circle.png',
|
height: 88.r,
|
||||||
width: 96.r,
|
color: state.isOpenPassageMode.value == 1
|
||||||
height: 96.r,
|
? Colors.red
|
||||||
),
|
: AppColors.mainColor,
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
),
|
||||||
}),
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(left: 15.w, right: 00.w, bottom: 15.h),
|
padding: EdgeInsets.only(left: 15.w, right: 00.w, bottom: 15.h),
|
||||||
child: Row(
|
child: Row(
|
||||||
@ -735,6 +734,28 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//旋转动画
|
||||||
|
Widget xhjBuildRotationTransition(
|
||||||
|
{required double width, required double height}) {
|
||||||
|
return Positioned(
|
||||||
|
child: RotationTransition(
|
||||||
|
//设置动画的旋转中心
|
||||||
|
alignment: Alignment.center,
|
||||||
|
//动画控制器
|
||||||
|
turns: state.animationController!,
|
||||||
|
//将要执行动画的子view
|
||||||
|
child: Image.asset(
|
||||||
|
'images/icon_circle_dotted.png',
|
||||||
|
width: width,
|
||||||
|
height: height,
|
||||||
|
color: state.isOpenPassageMode.value == 1
|
||||||
|
? Colors.red
|
||||||
|
: AppColors.mainColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
//旋转动画
|
//旋转动画
|
||||||
Widget buildRotationTransition(
|
Widget buildRotationTransition(
|
||||||
{required double width, required double height}) {
|
{required double width, required double height}) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user