Merge branch 'develop_sky_liyi' into 'develop_sky'
Develop sky liyi See merge request StarlockTeam/app-starlock!157
This commit is contained in:
commit
9623c542b5
BIN
images/guide/1.png
Normal file
BIN
images/guide/1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
images/guide/2.png
Normal file
BIN
images/guide/2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
BIN
images/guide/3.png
Normal file
BIN
images/guide/3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
BIN
images/guide/4.png
Normal file
BIN
images/guide/4.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
@ -60,6 +60,7 @@ import 'package:star_lock/mine/mineSet/transferSmartLock/transferSmartLockList/t
|
|||||||
import 'package:star_lock/mine/valueAddedServices/advancedFeaturesWeb/advancedFeaturesWeb_page.dart';
|
import 'package:star_lock/mine/valueAddedServices/advancedFeaturesWeb/advancedFeaturesWeb_page.dart';
|
||||||
import 'package:star_lock/mine/valueAddedServices/advancedFunctionRecord/advancedFunctionRecord_page.dart';
|
import 'package:star_lock/mine/valueAddedServices/advancedFunctionRecord/advancedFunctionRecord_page.dart';
|
||||||
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/value_added_services_record_page.dart';
|
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/value_added_services_record_page.dart';
|
||||||
|
import 'package:star_lock/talk/starChart/views/guide/permission_guidance_page.dart';
|
||||||
import 'package:star_lock/talk/starChart/views/native/talk_view_native_decode_page.dart';
|
import 'package:star_lock/talk/starChart/views/native/talk_view_native_decode_page.dart';
|
||||||
import 'package:star_lock/talk/starChart/views/talkView/talk_view_page.dart';
|
import 'package:star_lock/talk/starChart/views/talkView/talk_view_page.dart';
|
||||||
import 'package:star_lock/talk/starChart/webView/h264_web_view.dart';
|
import 'package:star_lock/talk/starChart/webView/h264_web_view.dart';
|
||||||
@ -518,6 +519,8 @@ abstract class Routers {
|
|||||||
static const String h264WebView = '/h264WebView'; //星图对讲页面
|
static const String h264WebView = '/h264WebView'; //星图对讲页面
|
||||||
static const String imageTransmissionView =
|
static const String imageTransmissionView =
|
||||||
'/imageTransmissionView'; //星图对讲页面(图传)
|
'/imageTransmissionView'; //星图对讲页面(图传)
|
||||||
|
static const String permissionGuidancePage =
|
||||||
|
'/permissionGuidancePage'; // 锁屏权限通知引导页面
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class AppRouters {
|
abstract class AppRouters {
|
||||||
@ -1194,6 +1197,10 @@ abstract class AppRouters {
|
|||||||
GetPage<dynamic>(
|
GetPage<dynamic>(
|
||||||
name: Routers.imageTransmissionView,
|
name: Routers.imageTransmissionView,
|
||||||
page: () => ImageTransmissionPage()),
|
page: () => ImageTransmissionPage()),
|
||||||
|
|
||||||
|
GetPage<dynamic>(
|
||||||
|
name: Routers.permissionGuidancePage,
|
||||||
|
page: () => PermissionGuidancePage()),
|
||||||
// 插件播放页面
|
// 插件播放页面
|
||||||
// GetPage<dynamic>(name: Routers.h264WebView, page: () => H264WebView()), // webview播放页面
|
// GetPage<dynamic>(name: Routers.h264WebView, page: () => H264WebView()), // webview播放页面
|
||||||
];
|
];
|
||||||
|
|||||||
@ -128,6 +128,15 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage>
|
|||||||
|
|
||||||
// 限时顶部选择日期
|
// 限时顶部选择日期
|
||||||
Widget keyTimeLimitWidget() {
|
Widget keyTimeLimitWidget() {
|
||||||
|
// 获取当前时间
|
||||||
|
DateTime now = DateTime.now();
|
||||||
|
|
||||||
|
// 获取各个部分
|
||||||
|
int year = now.year;
|
||||||
|
int month = now.month;
|
||||||
|
int day = now.day;
|
||||||
|
int hour = now.hour;
|
||||||
|
int minute = now.minute;
|
||||||
return Column(
|
return Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Obx(() => CommonItem(
|
Obx(() => CommonItem(
|
||||||
@ -139,6 +148,13 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage>
|
|||||||
final PDuration selectDate = PDuration.parse(
|
final PDuration selectDate = PDuration.parse(
|
||||||
DateTime.tryParse(state.timeLimitBeginTime.value));
|
DateTime.tryParse(state.timeLimitBeginTime.value));
|
||||||
Pickers.showDatePicker(context,
|
Pickers.showDatePicker(context,
|
||||||
|
minDate: PDuration(
|
||||||
|
year: year,
|
||||||
|
month: month,
|
||||||
|
day: day,
|
||||||
|
hour: hour,
|
||||||
|
minute: minute,
|
||||||
|
),
|
||||||
selectDate: selectDate,
|
selectDate: selectDate,
|
||||||
mode: DateMode.YMDHM, onConfirm: (PDuration p) {
|
mode: DateMode.YMDHM, onConfirm: (PDuration p) {
|
||||||
state.timeLimitBeginTime.value =
|
state.timeLimitBeginTime.value =
|
||||||
@ -153,6 +169,13 @@ class _AddFingerprintTypePageState extends State<AddFingerprintTypePage>
|
|||||||
final PDuration selectDate = PDuration.parse(
|
final PDuration selectDate = PDuration.parse(
|
||||||
DateTime.tryParse(state.timeLimitEndTime.value));
|
DateTime.tryParse(state.timeLimitEndTime.value));
|
||||||
Pickers.showDatePicker(context,
|
Pickers.showDatePicker(context,
|
||||||
|
minDate: PDuration(
|
||||||
|
year: year,
|
||||||
|
month: month,
|
||||||
|
day: day,
|
||||||
|
hour: hour,
|
||||||
|
minute: minute,
|
||||||
|
),
|
||||||
selectDate: selectDate,
|
selectDate: selectDate,
|
||||||
mode: DateMode.YMDHM, onConfirm: (PDuration p) {
|
mode: DateMode.YMDHM, onConfirm: (PDuration p) {
|
||||||
state.timeLimitEndTime.value =
|
state.timeLimitEndTime.value =
|
||||||
|
|||||||
@ -0,0 +1,3 @@
|
|||||||
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
|
|
||||||
|
class PermissionGuidanceLogic extends BaseGetXController {}
|
||||||
109
lib/talk/starChart/views/guide/permission_guidance_page.dart
Normal file
109
lib/talk/starChart/views/guide/permission_guidance_page.dart
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/app_settings/app_colors.dart';
|
||||||
|
import 'package:star_lock/tools/titleAppBar.dart';
|
||||||
|
|
||||||
|
class PermissionGuidancePage extends StatefulWidget {
|
||||||
|
const PermissionGuidancePage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<PermissionGuidancePage> createState() => _PermissionGuidancePageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _PermissionGuidancePageState extends State<PermissionGuidancePage> {
|
||||||
|
final PageController _pageController = PageController();
|
||||||
|
int _currentPage = 0;
|
||||||
|
|
||||||
|
final List<Map<String, String>> _stepsData = [
|
||||||
|
{
|
||||||
|
'image': 'images/guide/1.png',
|
||||||
|
'text': '步骤1:打开应用信息,点击通知管理选项',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'image': 'images/guide/2.png',
|
||||||
|
'text': '步骤2:下滑点击呼叫提醒的通知选项',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'image': 'images/guide/3.png',
|
||||||
|
'text': '步骤3:选择在锁定屏幕上的选项设置',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'image': 'images/guide/4.png',
|
||||||
|
'text': '步骤4:设置为显示通知及其内容',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: TitleAppBar(
|
||||||
|
barTitle: '锁屏通知开启方式'.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor,
|
||||||
|
backAction: () {
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
body: Column(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: PageView.builder(
|
||||||
|
controller: _pageController,
|
||||||
|
onPageChanged: (index) {
|
||||||
|
setState(() {
|
||||||
|
_currentPage = index;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
itemCount: _stepsData.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Image.asset(
|
||||||
|
_stepsData[index]['image']!,
|
||||||
|
width: 1.sw,
|
||||||
|
height: 0.55.sh,
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
),
|
||||||
|
SizedBox(height: 32.h),
|
||||||
|
Text(
|
||||||
|
_stepsData[index]['text']!,
|
||||||
|
style: TextStyle(fontSize: 28.sp),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 16),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: List.generate(_stepsData.length, (index) {
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.symmetric(horizontal: 4),
|
||||||
|
width: 10,
|
||||||
|
height: 10,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
color: _currentPage == index
|
||||||
|
? AppColors.mainColor
|
||||||
|
: Colors.grey[300],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
SizedBox(height: 24),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_pageController.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
class PermissionGuidanceState {
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,6 +1,9 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.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:star_lock/appRouters.dart';
|
||||||
import 'package:star_lock/app_settings/app_colors.dart';
|
import 'package:star_lock/app_settings/app_colors.dart';
|
||||||
import 'package:star_lock/talk/call/callTalk.dart';
|
import 'package:star_lock/talk/call/callTalk.dart';
|
||||||
import 'package:star_lock/talk/starChart/constant/talk_status.dart';
|
import 'package:star_lock/talk/starChart/constant/talk_status.dart';
|
||||||
@ -64,6 +67,21 @@ class _ImageTransmissionPageState extends State<ImageTransmissionPage>
|
|||||||
backAction: () {
|
backAction: () {
|
||||||
logic.udpHangUpAction();
|
logic.udpHangUpAction();
|
||||||
},
|
},
|
||||||
|
actionsList: [
|
||||||
|
Visibility(
|
||||||
|
visible: state.currentLanguage == 'zh_CN' && Platform.isAndroid,
|
||||||
|
child: IconButton(
|
||||||
|
icon: Icon(
|
||||||
|
Icons.notification_add_sharp,
|
||||||
|
size: 32.w,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
Get.toNamed(Routers.permissionGuidancePage);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
body: Obx(() => Column(
|
body: Obx(() => Column(
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import 'package:star_lock/talk/starChart/constant/talk_status.dart';
|
|||||||
import 'package:star_lock/talk/starChart/handle/other/talk_data_repository.dart';
|
import 'package:star_lock/talk/starChart/handle/other/talk_data_repository.dart';
|
||||||
import 'package:star_lock/talk/starChart/proto/talk_data.pb.dart';
|
import 'package:star_lock/talk/starChart/proto/talk_data.pb.dart';
|
||||||
import 'package:star_lock/talk/starChart/status/star_chart_talk_status.dart';
|
import 'package:star_lock/talk/starChart/status/star_chart_talk_status.dart';
|
||||||
|
import 'package:star_lock/translations/current_locale_tool.dart';
|
||||||
|
|
||||||
import '../../../../tools/storage.dart';
|
import '../../../../tools/storage.dart';
|
||||||
|
|
||||||
@ -91,4 +92,7 @@ class ImageTransmissionState{
|
|||||||
RxBool hasAudioData = false.obs; // 是否有音频数据
|
RxBool hasAudioData = false.obs; // 是否有音频数据
|
||||||
RxInt lastAudioTimestamp = 0.obs; // 最后接收到的音频数据的时间戳
|
RxInt lastAudioTimestamp = 0.obs; // 最后接收到的音频数据的时间戳
|
||||||
Rx<ui.Image?> currentImage = Rx<ui.Image?>(null);
|
Rx<ui.Image?> currentImage = Rx<ui.Image?>(null);
|
||||||
|
|
||||||
|
RxString currentLanguage =
|
||||||
|
CurrentLocaleTool.getCurrentLocaleString().obs; // 当前选择语言
|
||||||
}
|
}
|
||||||
@ -9,6 +9,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
import 'package:star_lock/appRouters.dart';
|
||||||
import 'package:star_lock/flavors.dart';
|
import 'package:star_lock/flavors.dart';
|
||||||
import 'package:star_lock/talk/call/callTalk.dart';
|
import 'package:star_lock/talk/call/callTalk.dart';
|
||||||
import 'package:star_lock/talk/starChart/constant/talk_status.dart';
|
import 'package:star_lock/talk/starChart/constant/talk_status.dart';
|
||||||
@ -332,9 +333,10 @@ class _TalkViewNativeDecodePageState extends State<TalkViewNativeDecodePage>
|
|||||||
color: state.currentQuality.value == q
|
color: state.currentQuality.value == q
|
||||||
? AppColors.mainColor
|
? AppColors.mainColor
|
||||||
: Colors.black,
|
: Colors.black,
|
||||||
fontWeight: state.currentQuality.value == q
|
fontWeight:
|
||||||
? FontWeight.bold
|
state.currentQuality.value == q
|
||||||
: FontWeight.normal,
|
? FontWeight.bold
|
||||||
|
: FontWeight.normal,
|
||||||
fontSize: 28.sp,
|
fontSize: 28.sp,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -350,9 +352,27 @@ class _TalkViewNativeDecodePageState extends State<TalkViewNativeDecodePage>
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
child: Icon(Icons.high_quality_outlined, color: Colors.white, size: 38.w),
|
child: Icon(Icons.high_quality_outlined,
|
||||||
|
color: Colors.white, size: 38.w),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: state.currentLanguage == 'zh_CN' && Platform.isAndroid,
|
||||||
|
child: SizedBox(width: 38.w),
|
||||||
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: state.currentLanguage == 'zh_CN' && Platform.isAndroid,
|
||||||
|
child: IconButton(
|
||||||
|
icon: Icon(
|
||||||
|
Icons.notification_add_sharp,
|
||||||
|
size: 32.w,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
Get.toNamed(Routers.permissionGuidancePage);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import 'package:star_lock/talk/starChart/handle/other/packet_loss_statistics.dar
|
|||||||
import 'package:star_lock/talk/starChart/handle/other/talk_data_repository.dart';
|
import 'package:star_lock/talk/starChart/handle/other/talk_data_repository.dart';
|
||||||
import 'package:star_lock/talk/starChart/proto/talk_data.pb.dart';
|
import 'package:star_lock/talk/starChart/proto/talk_data.pb.dart';
|
||||||
import 'package:star_lock/talk/starChart/status/star_chart_talk_status.dart';
|
import 'package:star_lock/talk/starChart/status/star_chart_talk_status.dart';
|
||||||
|
import 'package:star_lock/translations/current_locale_tool.dart';
|
||||||
import 'package:video_decode_plugin/video_decode_plugin.dart';
|
import 'package:video_decode_plugin/video_decode_plugin.dart';
|
||||||
|
|
||||||
import '../../../../tools/storage.dart';
|
import '../../../../tools/storage.dart';
|
||||||
@ -120,4 +121,7 @@ class TalkViewNativeDecodeState {
|
|||||||
|
|
||||||
// 当前清晰度选项,初始为'高清'
|
// 当前清晰度选项,初始为'高清'
|
||||||
RxString currentQuality = '高清'.obs; // 可选:高清、标清、流畅
|
RxString currentQuality = '高清'.obs; // 可选:高清、标清、流畅
|
||||||
|
|
||||||
|
RxString currentLanguage =
|
||||||
|
CurrentLocaleTool.getCurrentLocaleString().obs; // 当前选择语言
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
import 'dart:io';
|
||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@ -7,6 +8,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
import 'package:star_lock/appRouters.dart';
|
||||||
import 'package:star_lock/flavors.dart';
|
import 'package:star_lock/flavors.dart';
|
||||||
import 'package:star_lock/talk/call/callTalk.dart';
|
import 'package:star_lock/talk/call/callTalk.dart';
|
||||||
import 'package:star_lock/talk/starChart/constant/talk_status.dart';
|
import 'package:star_lock/talk/starChart/constant/talk_status.dart';
|
||||||
@ -405,6 +407,23 @@ class _TalkViewPageState extends State<TalkViewPage>
|
|||||||
image: const AssetImage('images/main/icon_lockDetail_rectangle.png'),
|
image: const AssetImage('images/main/icon_lockDetail_rectangle.png'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: state.currentLanguage == 'zh_CN' && Platform.isAndroid,
|
||||||
|
child: SizedBox(width: 38.w),
|
||||||
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: state.currentLanguage == 'zh_CN' && Platform.isAndroid,
|
||||||
|
child: IconButton(
|
||||||
|
icon: Icon(
|
||||||
|
Icons.notification_add_sharp,
|
||||||
|
size: 32.w,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
Get.toNamed(Routers.permissionGuidancePage);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import 'package:star_lock/talk/starChart/constant/talk_status.dart';
|
|||||||
import 'package:star_lock/talk/starChart/handle/other/talk_data_repository.dart';
|
import 'package:star_lock/talk/starChart/handle/other/talk_data_repository.dart';
|
||||||
import 'package:star_lock/talk/starChart/proto/talk_data.pb.dart';
|
import 'package:star_lock/talk/starChart/proto/talk_data.pb.dart';
|
||||||
import 'package:star_lock/talk/starChart/status/star_chart_talk_status.dart';
|
import 'package:star_lock/talk/starChart/status/star_chart_talk_status.dart';
|
||||||
|
import 'package:star_lock/translations/current_locale_tool.dart';
|
||||||
|
|
||||||
import '../../../../tools/storage.dart';
|
import '../../../../tools/storage.dart';
|
||||||
|
|
||||||
@ -91,4 +92,7 @@ class TalkViewState {
|
|||||||
RxBool hasAudioData = false.obs; // 是否有音频数据
|
RxBool hasAudioData = false.obs; // 是否有音频数据
|
||||||
RxInt lastAudioTimestamp = 0.obs; // 最后接收到的音频数据的时间戳
|
RxInt lastAudioTimestamp = 0.obs; // 最后接收到的音频数据的时间戳
|
||||||
Rx<ui.Image?> currentImage = Rx<ui.Image?>(null);
|
Rx<ui.Image?> currentImage = Rx<ui.Image?>(null);
|
||||||
|
|
||||||
|
RxString currentLanguage =
|
||||||
|
CurrentLocaleTool.getCurrentLocaleString().obs; // 当前选择语言
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user