Merge branch 'master' of https://gitee.com/starlock-cn/app-starlock
This commit is contained in:
commit
2b7790f0fe
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 45 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 58 KiB |
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
import '../../../appRouters.dart';
|
import '../../../appRouters.dart';
|
||||||
import '../../../app_settings/app_colors.dart';
|
import '../../../app_settings/app_colors.dart';
|
||||||
@ -446,7 +447,7 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
|
|||||||
listeningAnimations() async {
|
listeningAnimations() async {
|
||||||
await Future.delayed(Duration.zero, () {
|
await Future.delayed(Duration.zero, () {
|
||||||
state.animationController = AnimationController(
|
state.animationController = AnimationController(
|
||||||
duration: const Duration(seconds: 20), vsync: this);
|
duration: const Duration(seconds: 1), vsync: this);
|
||||||
state.animationController.repeat();
|
state.animationController.repeat();
|
||||||
//动画开始、结束、向前移动或向后移动时会调用StatusListener
|
//动画开始、结束、向前移动或向后移动时会调用StatusListener
|
||||||
state.animationController.addStatusListener((status) {
|
state.animationController.addStatusListener((status) {
|
||||||
@ -488,6 +489,70 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//开锁成功弹出的小界面
|
||||||
|
void _showFullScreenOverlay(BuildContext context) {
|
||||||
|
showModalBottomSheet(
|
||||||
|
context: context,
|
||||||
|
isScrollControlled: true,
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.of(context).pop(); // 关闭底部表单
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
height: MediaQuery.of(context).size.height,
|
||||||
|
width: MediaQuery.of(context).size.width,
|
||||||
|
color: Colors.black.withOpacity(0.5),
|
||||||
|
child: unlockSuccessWidget(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget unlockSuccessWidget() {
|
||||||
|
return Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
children: [
|
||||||
|
Image.asset(
|
||||||
|
'images/main/unlocked_bg.png',
|
||||||
|
width: 358.w,
|
||||||
|
height: 348.h,
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: ScreenUtil().screenHeight / 2 - 10.h,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
widget.lockListInfoItemEntity.lockAlias!,
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.placeholderTextColor, fontSize: 26.sp),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10.h,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
getCurrentFormattedTime(),
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.darkGrayTextColor, fontSize: 26.sp),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
))
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
String getCurrentFormattedTime() {
|
||||||
|
// 获取当前时间
|
||||||
|
DateTime now = DateTime.now();
|
||||||
|
|
||||||
|
// 格式化日期和时间
|
||||||
|
String formattedTime = DateFormat('MM/dd HH:mm').format(now);
|
||||||
|
|
||||||
|
return formattedTime;
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didChangeDependencies() {
|
void didChangeDependencies() {
|
||||||
// TODO: implement didChangeDependencies
|
// TODO: implement didChangeDependencies
|
||||||
|
|||||||
@ -26,7 +26,7 @@ class _RealTimePicturePageState extends State<RealTimePicturePage>
|
|||||||
|
|
||||||
// listeningAnimations();
|
// listeningAnimations();
|
||||||
state.animationController =
|
state.animationController =
|
||||||
AnimationController(duration: const Duration(seconds: 2), vsync: this);
|
AnimationController(duration: const Duration(seconds: 1), vsync: this);
|
||||||
state.animationController.repeat();
|
state.animationController.repeat();
|
||||||
//动画开始、结束、向前移动或向后移动时会调用StatusListener
|
//动画开始、结束、向前移动或向后移动时会调用StatusListener
|
||||||
state.animationController.addStatusListener((status) {
|
state.animationController.addStatusListener((status) {
|
||||||
|
|||||||
@ -129,6 +129,7 @@ dependencies:
|
|||||||
# ffmpeg_kit_flutter: 5.1.0-LTS
|
# ffmpeg_kit_flutter: 5.1.0-LTS
|
||||||
fast_gbk: ^1.0.0
|
fast_gbk: ^1.0.0
|
||||||
flutter_pcm_sound: ^1.1.0
|
flutter_pcm_sound: ^1.1.0
|
||||||
|
intl: ^0.18.1
|
||||||
# flutter_audio_capture: <1.1.5
|
# flutter_audio_capture: <1.1.5
|
||||||
|
|
||||||
flutter_voice_processor: ^1.1.0
|
flutter_voice_processor: ^1.1.0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user