Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx_verification_code
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
clx_verification_code
Commits
f78a6fde
提交
f78a6fde
authored
4月 28, 2025
作者:
祁增奎
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
适配小窗模式
上级
e4d3f202
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
143 行增加
和
62 行删除
+143
-62
clx_code_manage_logic.dart
lib/code_manage/clx_code_manage_logic.dart
+2
-0
line_code_manage_config.dart
lib/utils/line_code_manage_config.dart
+4
-0
clx_line_code_manage_view.dart
lib/views/clx_line_code_manage_view.dart
+2
-0
clx_page_code_manage_view.dart
lib/views/clx_page_code_manage_view.dart
+2
-0
no_receive_resend_sms_view.dart
lib/widgets/tips_widget/no_receive_resend_sms_view.dart
+0
-1
no_receive_sms_view.dart
lib/widgets/tips_widget/no_receive_sms_view.dart
+57
-24
no_receive_voice_view.dart
lib/widgets/tips_widget/no_receive_voice_view.dart
+75
-36
pubspec.yaml
pubspec.yaml
+1
-1
没有找到文件。
lib/code_manage/clx_code_manage_logic.dart
浏览文件 @
f78a6fde
...
...
@@ -99,6 +99,7 @@ class CLXCodeManageLogic extends GetxController {
return
;
}
final
result
=
await
getSmsVerificationCode
?.
call
();
canSend
=
true
;
if
(
result
==
true
)
{
handleCodeSendType
();
_startCountdown
();
...
...
@@ -115,6 +116,7 @@ class CLXCodeManageLogic extends GetxController {
return
;
}
final
result
=
await
obtainVoiceVerificationCode
?.
call
();
canSend
=
true
;
if
(
result
==
true
)
{
handleCodeSendType
(
isSmsSend:
false
);
_startCountdown
(
isSmsSend:
false
);
...
...
lib/utils/line_code_manage_config.dart
浏览文件 @
f78a6fde
...
...
@@ -13,6 +13,9 @@ class LineCodeManageConfig {
/// 输入框是否紧贴
bool
isCollapsed
;
/// 是否小窗口模式
bool
isSmallWindow
;
/// 提示文字
String
?
hintText
;
...
...
@@ -51,6 +54,7 @@ class LineCodeManageConfig {
this
.
margin
=
const
EdgeInsets
.
symmetric
(
horizontal:
30
),
this
.
padding
=
const
EdgeInsets
.
symmetric
(
horizontal:
30
),
this
.
isCollapsed
=
false
,
this
.
isSmallWindow
=
false
,
this
.
hintText
,
this
.
hintStyle
=
const
TextStyle
(
color:
Color
(
0xffC9CDD4
),
fontSize:
14
,
fontWeight:
FontWeight
.
w400
),
...
...
lib/views/clx_line_code_manage_view.dart
浏览文件 @
f78a6fde
...
...
@@ -90,6 +90,7 @@ class CLXLineCodeManageView extends StatelessWidget {
tipsStyle:
config
.
tipsStyle
,
reSendStyle:
config
.
reSendStyle
,
voiceSendStyle:
config
.
voiceSendStyle
,
isSmallWindow:
config
.
isSmallWindow
,
sendSmsCode:
loigc
.
sendSmsCode
,
sendVoiceCode:
loigc
.
sendVoiceCode
,
),
...
...
@@ -109,6 +110,7 @@ class CLXLineCodeManageView extends StatelessWidget {
loigc
.
codeSendType
.
value
==
CodeSendType
.
notReceiveResendVoiceCode
)
NoReceiveVoiceView
(
isSmallWindow:
config
.
isSmallWindow
,
tipsStyle:
config
.
tipsStyle
,
reSendStyle:
config
.
reSendStyle
,
contactStyle:
config
.
contactStyle
,
...
...
lib/views/clx_page_code_manage_view.dart
浏览文件 @
f78a6fde
...
...
@@ -64,6 +64,7 @@ class CLXPageCodeManageView extends StatelessWidget {
tipsStyle:
config
.
tipsStyle
,
reSendStyle:
config
.
reSendStyle
,
voiceSendStyle:
config
.
voiceSendStyle
,
isSmallWindow:
false
,
sendSmsCode:
loigc
.
sendSmsCode
,
sendVoiceCode:
loigc
.
sendVoiceCode
,
),
...
...
@@ -86,6 +87,7 @@ class CLXPageCodeManageView extends StatelessWidget {
tipsStyle:
config
.
tipsStyle
,
reSendStyle:
config
.
reSendStyle
,
contactStyle:
config
.
contactStyle
,
isSmallWindow:
false
,
sendVoiceCode:
loigc
.
sendVoiceCode
,
contactService:
loigc
.
contactService
,
isShowContact:
loigc
.
codeSendType
.
value
==
...
...
lib/widgets/tips_widget/no_receive_resend_sms_view.dart
浏览文件 @
f78a6fde
import
'package:clx_verification_code/clx_verification_code.dart'
;
import
'package:flutter/gestures.dart'
;
import
'package:flutter/widgets.dart'
;
...
...
lib/widgets/tips_widget/no_receive_sms_view.dart
浏览文件 @
f78a6fde
import
'package:clx_verification_code/clx_verification_code.dart'
;
import
'package:flutter/gestures.dart'
;
import
'package:flutter/widgets.dart'
;
class
NoReceiveSmsView
extends
StatelessWidget
{
const
NoReceiveSmsView
({
super
.
key
,
required
this
.
isSmallWindow
,
this
.
reSendStyle
,
this
.
tipsStyle
,
this
.
voiceSendStyle
,
...
...
@@ -21,6 +21,9 @@ class NoReceiveSmsView extends StatelessWidget {
/// 语音发送文字样式
final
TextStyle
?
voiceSendStyle
;
/// 是否小窗模式
final
bool
isSmallWindow
;
/// 发送短信验证码
final
GestureTapCallback
?
sendSmsCode
;
...
...
@@ -31,34 +34,64 @@ class NoReceiveSmsView extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
return
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
10
),
child:
Row
(
children:
[
RichText
(
text:
TextSpan
(
child:
isSmallWindow
?
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
TextSpan
(
text:
'没有收到短信?'
,
style:
tipsStyle
,
RichText
(
text:
TextSpan
(
children:
[
TextSpan
(
text:
'没有收到短信?'
,
style:
tipsStyle
,
),
const
WidgetSpan
(
child:
SizedBox
(
width:
5
)),
TextSpan
(
text:
'重新获取'
,
style:
reSendStyle
,
recognizer:
TapGestureRecognizer
()..
onTap
=
sendSmsCode
,
),
],
),
),
const
WidgetSpan
(
child:
SizedBox
(
width:
5
)),
TextSpan
(
text:
'重新获取'
,
style:
reSendStyle
,
recognizer:
TapGestureRecognizer
()..
onTap
=
sendSmsCode
,
const
SizedBox
(
height:
4
),
GestureDetector
(
onTap:
sendVoiceCode
,
child:
Text
(
'获取语音验证码'
,
style:
voiceSendStyle
,
),
),
],
)
:
Row
(
children:
[
RichText
(
text:
TextSpan
(
children:
[
TextSpan
(
text:
'没有收到短信?'
,
style:
tipsStyle
,
),
const
WidgetSpan
(
child:
SizedBox
(
width:
5
)),
TextSpan
(
text:
'重新获取'
,
style:
reSendStyle
,
recognizer:
TapGestureRecognizer
()..
onTap
=
sendSmsCode
,
),
],
),
),
const
Spacer
(),
GestureDetector
(
onTap:
sendVoiceCode
,
child:
Text
(
'获取语音验证码'
,
style:
voiceSendStyle
,
),
),
],
),
),
const
Spacer
(),
GestureDetector
(
onTap:
sendVoiceCode
,
child:
Text
(
'获取语音验证码'
,
style:
voiceSendStyle
,
),
),
],
),
);
}
}
lib/widgets/tips_widget/no_receive_voice_view.dart
浏览文件 @
f78a6fde
...
...
@@ -3,14 +3,16 @@ import 'package:flutter/gestures.dart';
import
'package:flutter/widgets.dart'
;
class
NoReceiveVoiceView
extends
StatelessWidget
{
const
NoReceiveVoiceView
(
{
super
.
key
,
this
.
reSendStyle
,
this
.
tipsStyle
,
this
.
contactStyle
,
required
this
.
isShowContact
,
this
.
contactService
,
this
.
sendVoiceCode
});
const
NoReceiveVoiceView
({
super
.
key
,
required
this
.
isShowContact
,
required
this
.
isSmallWindow
,
this
.
reSendStyle
,
this
.
tipsStyle
,
this
.
contactStyle
,
this
.
contactService
,
this
.
sendVoiceCode
,
});
/// 重新获取文字样式
final
TextStyle
?
reSendStyle
;
...
...
@@ -21,6 +23,9 @@ class NoReceiveVoiceView extends StatelessWidget {
/// 联系客服文字样式
final
TextStyle
?
contactStyle
;
/// 是否小窗模式
final
bool
isSmallWindow
;
/// 是否显示联系客服
final
bool
isShowContact
;
...
...
@@ -34,38 +39,72 @@ class NoReceiveVoiceView extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
return
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
10
),
child:
Row
(
children:
[
Expanded
(
child:
RichText
(
text:
TextSpan
(
children:
[
TextSpan
(
text:
'没有收到语音?'
,
style:
tipsStyle
,
child:
isSmallWindow
?
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
RichText
(
text:
TextSpan
(
children:
[
TextSpan
(
text:
'没有收到语音?'
,
style:
tipsStyle
,
),
const
WidgetSpan
(
child:
SizedBox
(
width:
5
)),
TextSpan
(
text:
'重新获取'
,
style:
reSendStyle
,
recognizer:
TapGestureRecognizer
()
..
onTap
=
sendVoiceCode
,
),
],
),
const
WidgetSpan
(
child:
SizedBox
(
width:
5
)),
TextSpan
(
text:
'重新获取'
,
style:
reSendStyle
,
recognizer:
TapGestureRecognizer
()..
onTap
=
sendVoiceCode
,
),
if
(
isShowContact
)
...[
const
SizedBox
(
height:
4
),
GestureDetector
(
onTap:
contactService
,
child:
Text
(
'联系人工服务'
,
style:
contactStyle
,
),
),
],
),
),
),
if
(
isShowContact
)
...[
const
SizedBox
(
width:
10
),
GestureDetector
(
onTap:
contactService
,
child:
Text
(
'联系人工服务'
,
style:
contactStyle
,
),
],
)
:
Row
(
children:
[
Expanded
(
child:
RichText
(
text:
TextSpan
(
children:
[
TextSpan
(
text:
'没有收到语音?'
,
style:
tipsStyle
,
),
const
WidgetSpan
(
child:
SizedBox
(
width:
5
)),
TextSpan
(
text:
'重新获取'
,
style:
reSendStyle
,
recognizer:
TapGestureRecognizer
()
..
onTap
=
sendVoiceCode
,
),
],
),
),
),
if
(
isShowContact
)
...[
const
SizedBox
(
width:
10
),
GestureDetector
(
onTap:
contactService
,
child:
Text
(
'联系人工服务'
,
style:
contactStyle
,
),
),
],
],
),
],
],
),
);
}
}
pubspec.yaml
浏览文件 @
f78a6fde
name
:
clx_verification_code
description
:
"
A
new
Flutter
package
project."
version
:
0.0.
4
version
:
0.0.
5
homepage
:
environment
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论