Merge branch 'develop_liyi' of code-internal.star-lock.cn:StarlockTeam/app-starlock into develop_liyi
This commit is contained in:
commit
d9aadc0cd1
@ -6,7 +6,7 @@
|
|||||||
<string>development</string>
|
<string>development</string>
|
||||||
<key>com.apple.developer.associated-domains</key>
|
<key>com.apple.developer.associated-domains</key>
|
||||||
<array>
|
<array>
|
||||||
<string>applinks:lock.skychip.top</string>
|
<string>applinks:lock.xhjcn.ltd</string>
|
||||||
</array>
|
</array>
|
||||||
<key>com.apple.external-accessory.wireless-configuration</key>
|
<key>com.apple.external-accessory.wireless-configuration</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
|||||||
@ -30,10 +30,10 @@
|
|||||||
<key>CFBundleURLIconFile</key>
|
<key>CFBundleURLIconFile</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>CFBundleURLName</key>
|
<key>CFBundleURLName</key>
|
||||||
<string>com.sky.skysmartlock</string>
|
<string>com.xhj.xhjsmartlock</string>
|
||||||
<key>CFBundleURLSchemes</key>
|
<key>CFBundleURLSchemes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>skysmartlock</string>
|
<string>xhjsmartlock</string>
|
||||||
<string></string>
|
<string></string>
|
||||||
<string></string>
|
<string></string>
|
||||||
</array>
|
</array>
|
||||||
@ -45,7 +45,7 @@
|
|||||||
<string>weixin</string>
|
<string>weixin</string>
|
||||||
<key>CFBundleURLSchemes</key>
|
<key>CFBundleURLSchemes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>wxbe340095d2b8fd51</string>
|
<string>wx8e48112e22343817</string>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
|
|||||||
@ -39,6 +39,13 @@ class UmengKey {
|
|||||||
|
|
||||||
typedef dynamic fCallFunction();
|
typedef dynamic fCallFunction();
|
||||||
|
|
||||||
|
class WechatAppInfo {
|
||||||
|
WechatAppInfo({required this.wechatAppId, required this.universalLink});
|
||||||
|
|
||||||
|
String wechatAppId;
|
||||||
|
String universalLink;
|
||||||
|
}
|
||||||
|
|
||||||
class F {
|
class F {
|
||||||
static Flavor? appFlavor;
|
static Flavor? appFlavor;
|
||||||
|
|
||||||
@ -281,6 +288,37 @@ class F {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static WechatAppInfo get wechatAppInfo {
|
||||||
|
switch (appFlavor) {
|
||||||
|
case Flavor.local:
|
||||||
|
return WechatAppInfo(
|
||||||
|
wechatAppId: 'wxbe340095d2b8fd51',
|
||||||
|
universalLink: 'https://apt.skychip.top/');
|
||||||
|
case Flavor.dev:
|
||||||
|
return WechatAppInfo(
|
||||||
|
wechatAppId: 'wxbe340095d2b8fd51',
|
||||||
|
universalLink: 'https://apt.skychip.top/');
|
||||||
|
case Flavor.pre:
|
||||||
|
case Flavor.sky_pre:
|
||||||
|
case Flavor.xhj_pre:
|
||||||
|
return WechatAppInfo(
|
||||||
|
wechatAppId: 'wxbe340095d2b8fd51',
|
||||||
|
universalLink: 'https://apt.skychip.top/');
|
||||||
|
case Flavor.sky:
|
||||||
|
return WechatAppInfo(
|
||||||
|
wechatAppId: 'wxbe340095d2b8fd51',
|
||||||
|
universalLink: 'https://lock.skychip.top/');
|
||||||
|
case Flavor.xhj:
|
||||||
|
case Flavor.xhj_bundle:
|
||||||
|
return WechatAppInfo(
|
||||||
|
wechatAppId: 'wx8e48112e22343817',
|
||||||
|
universalLink: 'https://lock.xhjcn.ltd/');
|
||||||
|
default:
|
||||||
|
return WechatAppInfo(
|
||||||
|
wechatAppId: 'wxbe340095d2b8fd51', universalLink: '');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 是否是生产环境
|
// 是否是生产环境
|
||||||
static bool get isProductionEnv {
|
static bool get isProductionEnv {
|
||||||
switch (appFlavor) {
|
switch (appFlavor) {
|
||||||
|
|||||||
@ -146,13 +146,48 @@ class CatEyeSetLogic extends BaseGetXController {
|
|||||||
|
|
||||||
_getConfigAndGenerateBleData() async {
|
_getConfigAndGenerateBleData() async {
|
||||||
// 假设 state.lockSetInfoData.value.lockSettingInfo!.catEyeConfig![0].catEyeMode 是一个整数
|
// 假设 state.lockSetInfoData.value.lockSettingInfo!.catEyeConfig![0].catEyeMode 是一个整数
|
||||||
int originalCatEyeMode = state
|
|
||||||
.lockSetInfoData.value.lockSettingInfo!.catEyeConfig![0].catEyeMode!;
|
int originalCatEyeMode = 0;
|
||||||
int recordMode = state.lockSetInfoData.value.lockSettingInfo!
|
int recordMode = 0;
|
||||||
.catEyeConfig![0].catEyeModeConfig!.recordMode ==
|
int recordStartTime = 0;
|
||||||
0
|
int recordEndTime = 0;
|
||||||
? 1
|
int recordTime = 0;
|
||||||
: 0;
|
int detectionDistance = 0;
|
||||||
|
int realTimeMode = 0;
|
||||||
|
if (state.lockSetInfoData.value.lockSettingInfo!.catEyeConfig != null &&
|
||||||
|
state.lockSetInfoData.value.lockSettingInfo!.catEyeConfig!.length > 0) {
|
||||||
|
originalCatEyeMode = state
|
||||||
|
.lockSetInfoData.value.lockSettingInfo!.catEyeConfig![0].catEyeMode!;
|
||||||
|
recordMode = state.lockSetInfoData.value.lockSettingInfo!.catEyeConfig![0]
|
||||||
|
.catEyeModeConfig!.recordMode ==
|
||||||
|
0
|
||||||
|
? 1
|
||||||
|
: 0;
|
||||||
|
recordStartTime = _handleTimeToM(state
|
||||||
|
.lockSetInfoData
|
||||||
|
.value
|
||||||
|
.lockSettingInfo!
|
||||||
|
.catEyeConfig![0]
|
||||||
|
.catEyeModeConfig!
|
||||||
|
.recordStartTime!);
|
||||||
|
recordEndTime = _handleTimeToM(state.lockSetInfoData.value
|
||||||
|
.lockSettingInfo!.catEyeConfig![0].catEyeModeConfig!.recordEndTime!);
|
||||||
|
recordTime = _handleGetIntNumber(state.lockSetInfoData.value
|
||||||
|
.lockSettingInfo!.catEyeConfig![0].catEyeModeConfig!.recordTime!);
|
||||||
|
if (state.lockSetInfoData.value.lockSettingInfo!.catEyeConfig![0]!
|
||||||
|
.catEyeModeConfig!.detectionDistance !=
|
||||||
|
null) {
|
||||||
|
detectionDistance = _handleDetectionDistance(state
|
||||||
|
.lockSetInfoData
|
||||||
|
.value
|
||||||
|
.lockSettingInfo!
|
||||||
|
.catEyeConfig![0]
|
||||||
|
.catEyeModeConfig!
|
||||||
|
.detectionDistance!);
|
||||||
|
}
|
||||||
|
realTimeMode = state.lockSetInfoData.value.lockSettingInfo!
|
||||||
|
.catEyeConfig![0].catEyeModeConfig!.realTimeMode!;
|
||||||
|
}
|
||||||
|
|
||||||
int stayWarn = state.lockSetInfoData.value.lockSettingInfo!.stayWarn!;
|
int stayWarn = state.lockSetInfoData.value.lockSettingInfo!.stayWarn!;
|
||||||
int abnormalWarn =
|
int abnormalWarn =
|
||||||
@ -160,30 +195,6 @@ class CatEyeSetLogic extends BaseGetXController {
|
|||||||
int autoLightScreen =
|
int autoLightScreen =
|
||||||
state.lockSetInfoData.value.lockSettingInfo!.autoLightScreen!;
|
state.lockSetInfoData.value.lockSettingInfo!.autoLightScreen!;
|
||||||
|
|
||||||
int recordStartTime = _handleTimeToM(state.lockSetInfoData.value
|
|
||||||
.lockSettingInfo!.catEyeConfig![0].catEyeModeConfig!.recordStartTime!);
|
|
||||||
int recordEndTime = _handleTimeToM(state.lockSetInfoData.value
|
|
||||||
.lockSettingInfo!.catEyeConfig![0].catEyeModeConfig!.recordEndTime!);
|
|
||||||
|
|
||||||
int recordTime = _handleGetIntNumber(state.lockSetInfoData.value
|
|
||||||
.lockSettingInfo!.catEyeConfig![0].catEyeModeConfig!.recordTime!);
|
|
||||||
|
|
||||||
int detectionDistance = 0;
|
|
||||||
if (state.lockSetInfoData.value.lockSettingInfo!.catEyeConfig![0]!
|
|
||||||
.catEyeModeConfig!.detectionDistance !=
|
|
||||||
null) {
|
|
||||||
detectionDistance = _handleDetectionDistance(state
|
|
||||||
.lockSetInfoData
|
|
||||||
.value
|
|
||||||
.lockSettingInfo!
|
|
||||||
.catEyeConfig![0]
|
|
||||||
.catEyeModeConfig!
|
|
||||||
.detectionDistance!);
|
|
||||||
}
|
|
||||||
|
|
||||||
int realTimeMode = state.lockSetInfoData.value.lockSettingInfo!
|
|
||||||
.catEyeConfig![0].catEyeModeConfig!.realTimeMode!;
|
|
||||||
|
|
||||||
// 根据需要调整 catEyeMode 的值
|
// 根据需要调整 catEyeMode 的值
|
||||||
int adjustedCatEyeMode =
|
int adjustedCatEyeMode =
|
||||||
originalCatEyeMode > 0 ? originalCatEyeMode - 1 : originalCatEyeMode;
|
originalCatEyeMode > 0 ? originalCatEyeMode - 1 : originalCatEyeMode;
|
||||||
|
|||||||
@ -49,7 +49,7 @@ class StarLockMinePageState extends State<StarLockMinePage> with BaseWidget {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
WechatManageTool.getAppInfo(() {
|
WechatManageTool.getAppInfo(() {
|
||||||
WxPushWeChatMiniProgramTool.pushWeChatMiniProgram(
|
WxPushWeChatMiniProgramTool.pushWeChatMiniProgram(
|
||||||
'wxbe340095d2b8fd51');
|
F.wechatAppInfo.wechatAppId, F.wechatAppInfo.universalLink);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
|||||||
@ -86,7 +86,8 @@ class _MineSetPageState extends State<MineSetPage>
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
WechatManageTool.getAppInfo(() {
|
WechatManageTool.getAppInfo(() {
|
||||||
WxPushWeChatMiniProgramTool.pushWeChatMiniProgram(
|
WxPushWeChatMiniProgramTool.pushWeChatMiniProgram(
|
||||||
'wxbe340095d2b8fd51');
|
F.wechatAppInfo.wechatAppId,
|
||||||
|
F.wechatAppInfo.universalLink);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
|
|||||||
@ -59,10 +59,15 @@ class UdpRbcuInfoHandler extends ScpMessageBaseHandle
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void handleResp(ScpMessage scpMessage) {
|
void handleResp(ScpMessage scpMessage) {
|
||||||
|
final RbcuInfo rbcuInfo = scpMessage.Payload;
|
||||||
final GenericResp genericResp = scpMessage.Payload;
|
final GenericResp genericResp = scpMessage.Payload;
|
||||||
if (checkGenericRespSuccess(genericResp)) {
|
if (checkGenericRespSuccess(genericResp)) {
|
||||||
// 收到回复之后停止重发
|
// 收到回复之后停止重发
|
||||||
startChartManage.stopSendingRbcuInfoMessages();
|
startChartManage.stopSendingRbcuInfoMessages();
|
||||||
|
if (rbcuInfo.isResp) {
|
||||||
|
// 如果是回复的消息
|
||||||
|
_handleResultRbcuInfo(rbcuInfo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,5 +75,6 @@ class UdpRbcuInfoHandler extends ScpMessageBaseHandle
|
|||||||
void _handleResultRbcuInfo(RbcuInfo rbcuInfo) {
|
void _handleResultRbcuInfo(RbcuInfo rbcuInfo) {
|
||||||
startChartManage.rbcuInfo = rbcuInfo;
|
startChartManage.rbcuInfo = rbcuInfo;
|
||||||
startChartManage.stopSendingRbcuInfoMessages();
|
startChartManage.stopSendingRbcuInfoMessages();
|
||||||
|
startChartManage.startSendingRbcuProbeTMessages();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,6 +40,9 @@ class UdpTalkAcceptHandler extends ScpMessageBaseHandle
|
|||||||
// 同意接听之后,停止对讲请求超时监听定时器
|
// 同意接听之后,停止对讲请求超时监听定时器
|
||||||
talkeRequestOverTimeTimerManager.renew();
|
talkeRequestOverTimeTimerManager.renew();
|
||||||
talkeRequestOverTimeTimerManager.cancel();
|
talkeRequestOverTimeTimerManager.cancel();
|
||||||
|
// 启动发送rbcuInfo数据
|
||||||
|
startChartManage.startSendingRbcuInfoMessages(
|
||||||
|
ToPeerId: startChartManage.lockPeerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,9 @@ class UdpTalkDataHandler extends ScpMessageBaseHandle
|
|||||||
factory UdpTalkDataHandler() {
|
factory UdpTalkDataHandler() {
|
||||||
return _instance;
|
return _instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
UdpTalkDataHandler._internal();
|
UdpTalkDataHandler._internal();
|
||||||
|
|
||||||
static final UdpTalkDataHandler _instance = UdpTalkDataHandler._internal();
|
static final UdpTalkDataHandler _instance = UdpTalkDataHandler._internal();
|
||||||
|
|
||||||
int _recentRecvDataRate = 0;
|
int _recentRecvDataRate = 0;
|
||||||
@ -157,7 +159,7 @@ class UdpTalkDataHandler extends ScpMessageBaseHandle
|
|||||||
final TalkDataH264Frame talkDataH264Frame = TalkDataH264Frame();
|
final TalkDataH264Frame talkDataH264Frame = TalkDataH264Frame();
|
||||||
talkDataH264Frame.mergeFromBuffer(talkData.content);
|
talkDataH264Frame.mergeFromBuffer(talkData.content);
|
||||||
// AppLog.log('H264 TalkData :$talkDataH264Frame');
|
// AppLog.log('H264 TalkData :$talkDataH264Frame');
|
||||||
talkDataRepository.addTalkData(talkData);
|
// talkDataRepository.addTalkData(talkData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 处理图片数据
|
/// 处理图片数据
|
||||||
|
|||||||
@ -34,6 +34,8 @@ class UdpTalkHangUpHandler extends ScpMessageBaseHandle
|
|||||||
talkDataOverTimeTimerManager.cancel();
|
talkDataOverTimeTimerManager.cancel();
|
||||||
|
|
||||||
EasyLoading.showToast('已挂断'.tr);
|
EasyLoading.showToast('已挂断'.tr);
|
||||||
|
startChartManage.stopSendingRbcuInfoMessages();
|
||||||
|
startChartManage.stopSendingRbcuProBeMessages();
|
||||||
Get.back();
|
Get.back();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -49,6 +51,8 @@ class UdpTalkHangUpHandler extends ScpMessageBaseHandle
|
|||||||
talkeRequestOverTimeTimerManager.cancel();
|
talkeRequestOverTimeTimerManager.cancel();
|
||||||
talkePingOverTimeTimerManager.cancel();
|
talkePingOverTimeTimerManager.cancel();
|
||||||
talkDataOverTimeTimerManager.cancel();
|
talkDataOverTimeTimerManager.cancel();
|
||||||
|
startChartManage.stopSendingRbcuInfoMessages();
|
||||||
|
startChartManage.stopSendingRbcuProBeMessages();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@ -31,6 +31,8 @@ class UdpTalkRejectHandler extends ScpMessageBaseHandle
|
|||||||
talkeRequestOverTimeTimerManager.cancel();
|
talkeRequestOverTimeTimerManager.cancel();
|
||||||
talkePingOverTimeTimerManager.cancel();
|
talkePingOverTimeTimerManager.cancel();
|
||||||
talkDataOverTimeTimerManager.cancel();
|
talkDataOverTimeTimerManager.cancel();
|
||||||
|
startChartManage.stopSendingRbcuInfoMessages();
|
||||||
|
startChartManage.stopSendingRbcuProBeMessages();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -43,6 +45,8 @@ class UdpTalkRejectHandler extends ScpMessageBaseHandle
|
|||||||
talkeRequestOverTimeTimerManager.cancel();
|
talkeRequestOverTimeTimerManager.cancel();
|
||||||
talkePingOverTimeTimerManager.cancel();
|
talkePingOverTimeTimerManager.cancel();
|
||||||
talkDataOverTimeTimerManager.cancel();
|
talkDataOverTimeTimerManager.cancel();
|
||||||
|
startChartManage.stopSendingRbcuInfoMessages();
|
||||||
|
startChartManage.stopSendingRbcuProBeMessages();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@ -33,6 +33,8 @@ class TalkDataOverTimeTimerManager {
|
|||||||
StartChartManage().sendTalkHangupMessage();
|
StartChartManage().sendTalkHangupMessage();
|
||||||
StartChartManage().stopTalkPingMessageTimer();
|
StartChartManage().stopTalkPingMessageTimer();
|
||||||
StartChartManage().stopTalkExpectMessageTimer();
|
StartChartManage().stopTalkExpectMessageTimer();
|
||||||
|
StartChartManage().stopSendingRbcuInfoMessages();
|
||||||
|
StartChartManage().stopSendingRbcuProBeMessages();
|
||||||
talkStatus.setNotTalkData();
|
talkStatus.setNotTalkData();
|
||||||
talkStatus.setEnd();
|
talkStatus.setEnd();
|
||||||
AudioPlayerManager().stopRingtone();
|
AudioPlayerManager().stopRingtone();
|
||||||
|
|||||||
@ -37,6 +37,8 @@ class TalkePingOverTimeTimerManager {
|
|||||||
StartChartManage().stopTalkExpectMessageTimer();
|
StartChartManage().stopTalkExpectMessageTimer();
|
||||||
// 如果通话异常,则发送通话中挂断
|
// 如果通话异常,则发送通话中挂断
|
||||||
StartChartManage().sendTalkHangupMessage();
|
StartChartManage().sendTalkHangupMessage();
|
||||||
|
StartChartManage().stopSendingRbcuInfoMessages();
|
||||||
|
StartChartManage().stopSendingRbcuProBeMessages();
|
||||||
talkStatus.setNotTalkPing();
|
talkStatus.setNotTalkPing();
|
||||||
talkStatus.setEnd();
|
talkStatus.setEnd();
|
||||||
Get.back();
|
Get.back();
|
||||||
|
|||||||
@ -32,6 +32,8 @@ class TalkeRequestOverTimeTimerManager {
|
|||||||
EasyLoading.showToast('通话未接通,已挂断'.tr, duration: 2000.milliseconds);
|
EasyLoading.showToast('通话未接通,已挂断'.tr, duration: 2000.milliseconds);
|
||||||
// 超时未接听,发送挂断请求
|
// 超时未接听,发送挂断请求
|
||||||
StartChartManage().sendTalkRejectMessage();
|
StartChartManage().sendTalkRejectMessage();
|
||||||
|
StartChartManage().stopSendingRbcuInfoMessages();
|
||||||
|
StartChartManage().stopSendingRbcuProBeMessages();
|
||||||
talkStatus.setInitializationCompleted();
|
talkStatus.setInitializationCompleted();
|
||||||
Get.back();
|
Get.back();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -314,9 +314,10 @@ class StartChartManage {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
final info = rbcuInfo = RbcuInfo(address: ['119.137.55.161:62289']);
|
if (rbcuInfo != null &&
|
||||||
if (info != null && info.address != null && info.address.length > 0) {
|
rbcuInfo!.address != null &&
|
||||||
info.address.forEach((element) {
|
rbcuInfo!.address.length > 0) {
|
||||||
|
rbcuInfo!.address.forEach((element) {
|
||||||
// 拆分 element 字符串
|
// 拆分 element 字符串
|
||||||
final parts = element.split(':');
|
final parts = element.split(':');
|
||||||
final host = parts[0]; // IP 地址
|
final host = parts[0]; // IP 地址
|
||||||
@ -345,6 +346,7 @@ class StartChartManage {
|
|||||||
rbcuInfoTimer ??=
|
rbcuInfoTimer ??=
|
||||||
Timer.periodic(Duration(seconds: _defaultIntervalTime), (timer) {
|
Timer.periodic(Duration(seconds: _defaultIntervalTime), (timer) {
|
||||||
// 发送RbcuInfo 地址交换消息
|
// 发送RbcuInfo 地址交换消息
|
||||||
|
_log(text: '发送RbcuInfo 地址交换消息');
|
||||||
_sendRbcuInfoMessage(ToPeerId: ToPeerId);
|
_sendRbcuInfoMessage(ToPeerId: ToPeerId);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -585,6 +587,8 @@ class StartChartManage {
|
|||||||
stopTalkExpectMessageTimer();
|
stopTalkExpectMessageTimer();
|
||||||
stopTalkPingMessageTimer();
|
stopTalkPingMessageTimer();
|
||||||
stopCallRequestMessageTimer();
|
stopCallRequestMessageTimer();
|
||||||
|
stopSendingRbcuInfoMessages();
|
||||||
|
stopSendingRbcuProBeMessages();
|
||||||
// 取消定时器
|
// 取消定时器
|
||||||
|
|
||||||
talkePingOverTimeTimerManager.cancel();
|
talkePingOverTimeTimerManager.cancel();
|
||||||
@ -665,6 +669,8 @@ class StartChartManage {
|
|||||||
stopTalkExpectMessageTimer();
|
stopTalkExpectMessageTimer();
|
||||||
stopTalkPingMessageTimer();
|
stopTalkPingMessageTimer();
|
||||||
stopCallRequestMessageTimer();
|
stopCallRequestMessageTimer();
|
||||||
|
stopSendingRbcuInfoMessages();
|
||||||
|
stopSendingRbcuProBeMessages();
|
||||||
// 取消定时器
|
// 取消定时器
|
||||||
talkePingOverTimeTimerManager.cancel();
|
talkePingOverTimeTimerManager.cancel();
|
||||||
talkDataOverTimeTimerManager.cancel();
|
talkDataOverTimeTimerManager.cancel();
|
||||||
@ -1101,7 +1107,7 @@ class StartChartManage {
|
|||||||
bluetoothDeviceName: bluetoothDeviceName,
|
bluetoothDeviceName: bluetoothDeviceName,
|
||||||
bleStructData: bleStructData,
|
bleStructData: bleStructData,
|
||||||
);
|
);
|
||||||
await _sendMessage(message: message);
|
await _sendMessage(message: message);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 销毁资源
|
/// 销毁资源
|
||||||
|
|||||||
@ -58,6 +58,7 @@ class _TalkViewPageState extends State<TalkViewPage>
|
|||||||
|
|
||||||
// _latencyStream = measureServerLatencyStream(F.apiPrefix); // 替换为你的服务器地址
|
// _latencyStream = measureServerLatencyStream(F.apiPrefix); // 替换为你的服务器地址
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Stream<int> measureServerLatencyStream(String url) async* {
|
// Stream<int> measureServerLatencyStream(String url) async* {
|
||||||
// while (true) {
|
// while (true) {
|
||||||
@ -155,7 +156,7 @@ class _TalkViewPageState extends State<TalkViewPage>
|
|||||||
),
|
),
|
||||||
Obx(() => state.listData.value.isEmpty
|
Obx(() => state.listData.value.isEmpty
|
||||||
? Positioned(
|
? Positioned(
|
||||||
bottom: 300.h,
|
bottom: 310.h,
|
||||||
child: Text(
|
child: Text(
|
||||||
'正在创建安全连接...'.tr,
|
'正在创建安全连接...'.tr,
|
||||||
style: TextStyle(color: Colors.black, fontSize: 26.sp),
|
style: TextStyle(color: Colors.black, fontSize: 26.sp),
|
||||||
@ -509,13 +510,17 @@ class _TalkViewPageState extends State<TalkViewPage>
|
|||||||
onLongPress: longPress,
|
onLongPress: longPress,
|
||||||
onLongPressUp: longPressUp,
|
onLongPressUp: longPressUp,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 140.h,
|
height: 160.w,
|
||||||
|
width: 140.w,
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Container(
|
Container(
|
||||||
width: wh,
|
width: wh,
|
||||||
height: wh,
|
height: wh,
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
minWidth: wh,
|
||||||
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: backgroundColor,
|
color: backgroundColor,
|
||||||
borderRadius: BorderRadius.circular((wh + 10.w * 2) / 2),
|
borderRadius: BorderRadius.circular((wh + 10.w * 2) / 2),
|
||||||
@ -524,10 +529,11 @@ class _TalkViewPageState extends State<TalkViewPage>
|
|||||||
child: Image.asset(iconUrl, fit: BoxFit.fitWidth),
|
child: Image.asset(iconUrl, fit: BoxFit.fitWidth),
|
||||||
),
|
),
|
||||||
SizedBox(height: 20.w),
|
SizedBox(height: 20.w),
|
||||||
Expanded(
|
Text(
|
||||||
child: Text(name,
|
name,
|
||||||
style: TextStyle(fontSize: 20.sp, color: Colors.white),
|
style: TextStyle(fontSize: 20.sp, color: Colors.white),
|
||||||
textAlign: TextAlign.center),
|
textAlign: TextAlign.center, // 当文本超出指定行数时,使用省略号表示
|
||||||
|
maxLines: 2, // 设置最大行数为1
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@ -23,10 +23,9 @@ class WxPushWeChatMiniProgramTool {
|
|||||||
doOnIOS: true);
|
doOnIOS: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<void> pushWeChatMiniProgram(String appId) async {
|
static Future<void> pushWeChatMiniProgram(String appId,String _associationUrl) async {
|
||||||
if (!isInit) {
|
if (!isInit) {
|
||||||
isInit = true;
|
isInit = true;
|
||||||
final String _associationUrl = await Storage.getAssociationUrl();
|
|
||||||
await initWeChatMiniProgram(appId, _associationUrl);
|
await initWeChatMiniProgram(appId, _associationUrl);
|
||||||
|
|
||||||
final MiniProgram miniProgram = MiniProgram(
|
final MiniProgram miniProgram = MiniProgram(
|
||||||
|
|||||||
12
pubspec.yaml
12
pubspec.yaml
@ -109,12 +109,12 @@ version: 1.0.85+2025010802
|
|||||||
environment:
|
environment:
|
||||||
sdk: '>=2.12.0 <3.0.0'
|
sdk: '>=2.12.0 <3.0.0'
|
||||||
|
|
||||||
fluwx:
|
#fluwx:
|
||||||
app_id: 'wxbe340095d2b8fd51'
|
# app_id: 'wxbe340095d2b8fd51'
|
||||||
debug_logging: true
|
# debug_logging: true
|
||||||
android:
|
# android:
|
||||||
ios:
|
# ios:
|
||||||
universal_link: https://lock.skychip.top/apple-app-site-association.json
|
# universal_link: https://lock.skychip.top/apple-app-site-association.json
|
||||||
|
|
||||||
# Dependencies specify other packages that your package needs in order to work.
|
# Dependencies specify other packages that your package needs in order to work.
|
||||||
# To automatically upgrade your package dependencies to the latest versions
|
# To automatically upgrade your package dependencies to the latest versions
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user