提交 15e8990e authored 作者: 祁增奎's avatar 祁增奎

外呼功能外部控制是否接入

上级 afbf2e37
...@@ -87,6 +87,7 @@ class CLXLineCodeManageView extends StatelessWidget { ...@@ -87,6 +87,7 @@ class CLXLineCodeManageView extends StatelessWidget {
if (loigc.codeSendType.value == if (loigc.codeSendType.value ==
CodeSendType.notReceiveSmsCode) CodeSendType.notReceiveSmsCode)
NoReceiveSmsView( NoReceiveSmsView(
isAccessOutCall: loigc.isAccessOutbound,
tipsStyle: config.tipsStyle, tipsStyle: config.tipsStyle,
reSendStyle: config.reSendStyle, reSendStyle: config.reSendStyle,
voiceSendStyle: config.voiceSendStyle, voiceSendStyle: config.voiceSendStyle,
...@@ -99,6 +100,7 @@ class CLXLineCodeManageView extends StatelessWidget { ...@@ -99,6 +100,7 @@ class CLXLineCodeManageView extends StatelessWidget {
if (loigc.codeSendType.value == if (loigc.codeSendType.value ==
CodeSendType.notReceiveResendSmsCode) CodeSendType.notReceiveResendSmsCode)
NoReceiveResendSmsView( NoReceiveResendSmsView(
isAccessOutCall: loigc.isAccessOutbound,
tipsStyle: config.tipsStyle, tipsStyle: config.tipsStyle,
reSendStyle: config.reSendStyle, reSendStyle: config.reSendStyle,
sendVoiceCode: loigc.sendVoiceCode, sendVoiceCode: loigc.sendVoiceCode,
......
...@@ -61,6 +61,7 @@ class CLXPageCodeManageView extends StatelessWidget { ...@@ -61,6 +61,7 @@ class CLXPageCodeManageView extends StatelessWidget {
if (loigc.codeSendType.value == if (loigc.codeSendType.value ==
CodeSendType.notReceiveSmsCode) CodeSendType.notReceiveSmsCode)
NoReceiveSmsView( NoReceiveSmsView(
isAccessOutCall: loigc.isAccessOutbound,
tipsStyle: config.tipsStyle, tipsStyle: config.tipsStyle,
reSendStyle: config.reSendStyle, reSendStyle: config.reSendStyle,
voiceSendStyle: config.voiceSendStyle, voiceSendStyle: config.voiceSendStyle,
...@@ -73,6 +74,7 @@ class CLXPageCodeManageView extends StatelessWidget { ...@@ -73,6 +74,7 @@ class CLXPageCodeManageView extends StatelessWidget {
if (loigc.codeSendType.value == if (loigc.codeSendType.value ==
CodeSendType.notReceiveResendSmsCode) CodeSendType.notReceiveResendSmsCode)
NoReceiveResendSmsView( NoReceiveResendSmsView(
isAccessOutCall: loigc.isAccessOutbound,
tipsStyle: config.tipsStyle, tipsStyle: config.tipsStyle,
reSendStyle: config.reSendStyle, reSendStyle: config.reSendStyle,
sendVoiceCode: loigc.sendVoiceCode, sendVoiceCode: loigc.sendVoiceCode,
......
...@@ -4,11 +4,15 @@ import 'package:flutter/widgets.dart'; ...@@ -4,11 +4,15 @@ import 'package:flutter/widgets.dart';
class NoReceiveResendSmsView extends StatelessWidget { class NoReceiveResendSmsView extends StatelessWidget {
const NoReceiveResendSmsView({ const NoReceiveResendSmsView({
super.key, super.key,
required this.isAccessOutCall,
this.reSendStyle, this.reSendStyle,
this.tipsStyle, this.tipsStyle,
this.sendVoiceCode, this.sendVoiceCode,
}); });
/// 是否接入外呼功能
final bool isAccessOutCall;
/// 重新获取文字样式 /// 重新获取文字样式
final TextStyle? reSendStyle; final TextStyle? reSendStyle;
...@@ -30,11 +34,12 @@ class NoReceiveResendSmsView extends StatelessWidget { ...@@ -30,11 +34,12 @@ class NoReceiveResendSmsView extends StatelessWidget {
style: tipsStyle, style: tipsStyle,
), ),
const WidgetSpan(child: SizedBox(width: 5)), const WidgetSpan(child: SizedBox(width: 5)),
TextSpan( if (isAccessOutCall)
text: '获取语音验证码', TextSpan(
style: reSendStyle, text: '获取语音验证码',
recognizer: TapGestureRecognizer()..onTap = sendVoiceCode, style: reSendStyle,
), recognizer: TapGestureRecognizer()..onTap = sendVoiceCode,
),
], ],
), ),
), ),
......
...@@ -5,6 +5,7 @@ class NoReceiveSmsView extends StatelessWidget { ...@@ -5,6 +5,7 @@ class NoReceiveSmsView extends StatelessWidget {
const NoReceiveSmsView({ const NoReceiveSmsView({
super.key, super.key,
required this.isSmallWindow, required this.isSmallWindow,
required this.isAccessOutCall,
this.reSendStyle, this.reSendStyle,
this.tipsStyle, this.tipsStyle,
this.voiceSendStyle, this.voiceSendStyle,
...@@ -12,6 +13,9 @@ class NoReceiveSmsView extends StatelessWidget { ...@@ -12,6 +13,9 @@ class NoReceiveSmsView extends StatelessWidget {
this.sendVoiceCode, this.sendVoiceCode,
}); });
/// 是否接入外呼功能
final bool isAccessOutCall;
/// 重新获取文字样式 /// 重新获取文字样式
final TextStyle? reSendStyle; final TextStyle? reSendStyle;
...@@ -54,14 +58,16 @@ class NoReceiveSmsView extends StatelessWidget { ...@@ -54,14 +58,16 @@ class NoReceiveSmsView extends StatelessWidget {
], ],
), ),
), ),
const SizedBox(height: 4), if (isAccessOutCall) ...[
GestureDetector( const SizedBox(height: 4),
onTap: sendVoiceCode, GestureDetector(
child: Text( onTap: sendVoiceCode,
'获取语音验证码', child: Text(
style: voiceSendStyle, '获取语音验证码',
style: voiceSendStyle,
),
), ),
), ],
], ],
) )
: Row( : Row(
...@@ -82,14 +88,16 @@ class NoReceiveSmsView extends StatelessWidget { ...@@ -82,14 +88,16 @@ class NoReceiveSmsView extends StatelessWidget {
], ],
), ),
), ),
const Spacer(), if (isAccessOutCall) ...[
GestureDetector( const Spacer(),
onTap: sendVoiceCode, GestureDetector(
child: Text( onTap: sendVoiceCode,
'获取语音验证码', child: Text(
style: voiceSendStyle, '获取语音验证码',
style: voiceSendStyle,
),
), ),
), ],
], ],
), ),
); );
......
name: clx_verification_code name: clx_verification_code
description: "A new Flutter package project." description: "A new Flutter package project."
version: 0.0.8 version: 1.0.0
homepage: homepage:
environment: environment:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论