diff --git a/star_lock/images/main/unlocked_bg.png b/star_lock/images/main/unlocked_bg.png index 4080c219..fb952c7c 100644 Binary files a/star_lock/images/main/unlocked_bg.png and b/star_lock/images/main/unlocked_bg.png differ diff --git a/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart b/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart index a06cedd3..8cbf5404 100644 --- a/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart +++ b/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart @@ -3,6 +3,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_reactive_ble/flutter_reactive_ble.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import 'package:intl/intl.dart'; import '../../../appRouters.dart'; import '../../../app_settings/app_colors.dart'; @@ -490,6 +491,68 @@ class _LockDetailPageState extends State 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: 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 void didChangeDependencies() { // TODO: implement didChangeDependencies diff --git a/star_lock/lib/main/lockDetail/lockDetail/realTimePicture/realTimePicture_page.dart b/star_lock/lib/main/lockDetail/lockDetail/realTimePicture/realTimePicture_page.dart index fa067dab..1f2f280e 100644 --- a/star_lock/lib/main/lockDetail/lockDetail/realTimePicture/realTimePicture_page.dart +++ b/star_lock/lib/main/lockDetail/lockDetail/realTimePicture/realTimePicture_page.dart @@ -26,7 +26,7 @@ class _RealTimePicturePageState extends State // listeningAnimations(); state.animationController = - AnimationController(duration: const Duration(seconds: 2), vsync: this); + AnimationController(duration: const Duration(seconds: 1), vsync: this); state.animationController.repeat(); //动画开始、结束、向前移动或向后移动时会调用StatusListener state.animationController.addStatusListener((status) { diff --git a/star_lock/pubspec.yaml b/star_lock/pubspec.yaml index bba33406..cbbfa761 100644 --- a/star_lock/pubspec.yaml +++ b/star_lock/pubspec.yaml @@ -128,6 +128,7 @@ dependencies: # ffmpeg_kit_flutter: 5.1.0-LTS fast_gbk: ^1.0.0 flutter_pcm_sound: ^1.1.0 + intl: ^0.18.1 # flutter_audio_capture: <1.1.5 flutter_voice_processor: ^1.1.0