This commit is contained in:
魏少阳 2024-01-04 18:27:55 +08:00
commit 2b7790f0fe
5 changed files with 68 additions and 2 deletions

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

View File

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.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';
@ -446,7 +447,7 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
listeningAnimations() async {
await Future.delayed(Duration.zero, () {
state.animationController = AnimationController(
duration: const Duration(seconds: 20), vsync: this);
duration: const Duration(seconds: 1), vsync: this);
state.animationController.repeat();
//StatusListener
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
void didChangeDependencies() {
// TODO: implement didChangeDependencies

View File

@ -26,7 +26,7 @@ class _RealTimePicturePageState extends State<RealTimePicturePage>
// 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) {

View File

@ -129,6 +129,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