Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
ChatGPT
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
关振斌
ChatGPT
Commits
ac4c07fb
Commit
ac4c07fb
authored
Apr 17, 2023
by
skeyboy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订阅修改、登录页输入框键盘样式优化
parent
e795f058
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
151 additions
and
103 deletions
+151
-103
lib/common/utils/multi_click_util.dart
lib/common/utils/multi_click_util.dart
+20
-0
lib/common/utils/utils.dart
lib/common/utils/utils.dart
+1
-0
lib/pages/frame/android_pay_list/widgets/helloword.dart
lib/pages/frame/android_pay_list/widgets/helloword.dart
+128
-102
lib/pages/frame/sign_in/view.dart
lib/pages/frame/sign_in/view.dart
+2
-1
No files found.
lib/common/utils/multi_click_util.dart
0 → 100644
View file @
ac4c07fb
class
MultiClickUtil
{
const
MultiClickUtil
.
_
();
static
DateTime
?
_lastClickTime
;
/*
* 判断是否为重复点击
* 可用于Gesture的onTap函数中拦截
* */
static
bool
isMultiClick
({
int
intervalMilliseconds
=
500
})
{
if
(
_lastClickTime
==
null
||
DateTime
.
now
().
difference
(
_lastClickTime
!)
>
Duration
(
milliseconds:
intervalMilliseconds
))
{
_lastClickTime
=
DateTime
.
now
();
return
false
;
}
else
{
return
true
;
}
}
}
lib/common/utils/utils.dart
View file @
ac4c07fb
...
@@ -7,3 +7,4 @@ export 'iconfont.dart';
...
@@ -7,3 +7,4 @@ export 'iconfont.dart';
export
'date.dart'
;
export
'date.dart'
;
export
'logger.dart'
;
export
'logger.dart'
;
export
'loading.dart'
;
export
'loading.dart'
;
export
'multi_click_util.dart'
;
lib/pages/frame/android_pay_list/widgets/helloword.dart
View file @
ac4c07fb
...
@@ -195,14 +195,14 @@ class PayItemWidget extends GetView<AndroidPayListController> {
...
@@ -195,14 +195,14 @@ class PayItemWidget extends GetView<AndroidPayListController> {
Obx
(
Obx
(
()
=>
Container
(
()
=>
Container
(
width:
Get
.
width
,
width:
Get
.
width
,
height:
150
,
margin:
const
EdgeInsets
.
all
(
10
),
margin:
const
EdgeInsets
.
all
(
10
),
child:
ListView
(
child:
SingleChildScrollView
(
shrinkWrap:
true
,
scrollDirection:
Axis
.
horizontal
,
scrollDirection:
Axis
.
horizontal
,
children:
controller
.
state
.
items
child:
IntrinsicHeight
(
child:
Row
(
children:
controller
.
state
.
items
.
reversed
.
map
((
element
)
=>
Container
(
.
map
((
element
)
=>
Container
(
margin:
const
EdgeInsets
.
only
(
right:
2
0
),
margin:
const
EdgeInsets
.
only
(
right:
1
0
),
child:
InkWell
(
child:
InkWell
(
borderRadius:
BorderRadius
.
circular
(
10
),
borderRadius:
BorderRadius
.
circular
(
10
),
onTap:
()
{
onTap:
()
{
...
@@ -212,22 +212,23 @@ class PayItemWidget extends GetView<AndroidPayListController> {
...
@@ -212,22 +212,23 @@ class PayItemWidget extends GetView<AndroidPayListController> {
},
},
child:
Ink
(
child:
Ink
(
padding:
const
EdgeInsets
.
symmetric
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
2
0
),
horizontal:
5
,
vertical:
1
0
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
10
),
borderRadius:
BorderRadius
.
circular
(
10
),
// border: ,Color.argb(255, 62, 67, 95)
// border: ,Color.argb(255, 62, 67, 95)
border:
Border
.
all
(
border:
Border
.
all
(
width:
1
,
width:
1
,
color:
(
controller
.
state
.
selectedItem
color:
(
controller
.
state
.
id
??
.
selectedItem
.
id
??
0
)
==
0
)
==
(
element
.
id
??
0
)
(
element
.
id
??
0
)
?
const
Color
.
fromARGB
(
0
,
0
,
0
,
0
)
?
const
Color
.
fromARGB
(
0
,
0
,
0
,
0
)
:
const
Color
.
fromARGB
(
:
const
Color
.
fromARGB
(
255
,
90
,
82
,
91
)),
255
,
90
,
82
,
91
)),
gradient:
LinearGradient
(
gradient:
LinearGradient
(
colors:
colors:
(
controller
.
state
.
selectedItem
(
controller
.
state
.
selectedItem
.
id
??
.
id
??
0
)
==
0
)
==
(
element
.
id
??
0
)
(
element
.
id
??
0
)
?
[
?
[
...
@@ -247,37 +248,63 @@ class PayItemWidget extends GetView<AndroidPayListController> {
...
@@ -247,37 +248,63 @@ class PayItemWidget extends GetView<AndroidPayListController> {
end:
Alignment
.
bottomCenter
,
end:
Alignment
.
bottomCenter
,
)),
)),
child:
Column
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
children:
[
Text
(
Text
(
element
.
goodsName
!,
element
.
goodsName
!,
style:
TextStyle
(
style:
TextStyle
(
fontWeight:
FontWeight
.
bold
,
fontWeight:
FontWeight
.
bold
,
color:
controller
.
state
.
selectedItem
.
id
==
color:
controller
.
state
.
selectedItem
.
id
==
element
.
id
element
.
id
?
Color
.
fromARGB
(
255
,
23
,
17
,
7
)
?
Color
.
fromARGB
(
255
,
23
,
17
,
7
)
:
Colors
.
white
),
:
Colors
.
white
),
),
),
Text
(
Text
(
'¥
${element.amount!}
'
,
'¥
${element.amount!}
'
,
style:
TextStyle
(
style:
TextStyle
(
fontWeight:
FontWeight
.
bold
,
fontWeight:
FontWeight
.
bold
,
color:
controller
.
state
.
selectedItem
.
id
==
color:
controller
.
state
.
selectedItem
.
id
==
element
.
id
element
.
id
?
Color
.
fromARGB
(
255
,
230
,
31
,
32
)
?
const
Color
.
fromARGB
(
:
Color
.
fromARGB
(
255
,
230
,
31
,
32
)
:
const
Color
.
fromARGB
(
255
,
241
,
197
,
131
)),
255
,
241
,
197
,
131
)),
),
),
Container
(
Container
(
width:
Get
.
width
*
0.6
,
width:
Get
.
width
/
3.5
,
child:
Text
(
child:
Column
(
element
.
goodsDesc
!,
children:
element
.
goodsDesc
!
.
split
(
'、'
)
.
map
((
e
)
=>
Text
(
e
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
style:
TextStyle
(
fontWeight:
FontWeight
.
bold
,
fontWeight:
color:
controller
.
state
.
selectedItem
.
id
==
FontWeight
.
bold
,
color:
controller
.
state
.
selectedItem
.
id
==
element
.
id
element
.
id
?
Color
.
fromARGB
(
255
,
230
,
31
,
32
)
?
const
Color
:
Color
.
fromARGB
(
.
fromARGB
(
255
,
241
,
197
,
131
)),
255
,
230
,
31
,
32
)
:
const
Color
.
fromARGB
(
255
,
241
,
197
,
131
)),
))
.
toList
(),
),
),
),
),
// Text(
// Text(
...
@@ -304,8 +331,6 @@ class PayItemWidget extends GetView<AndroidPayListController> {
...
@@ -304,8 +331,6 @@ class PayItemWidget extends GetView<AndroidPayListController> {
// ]),
// ]),
// ))
// ))
],
],
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
),
),
),
),
),
),
...
@@ -314,6 +339,8 @@ class PayItemWidget extends GetView<AndroidPayListController> {
...
@@ -314,6 +339,8 @@ class PayItemWidget extends GetView<AndroidPayListController> {
),
),
),
),
),
),
),
),
Container
(
Container
(
margin:
const
EdgeInsets
.
only
(
top:
10
,
bottom:
10
),
margin:
const
EdgeInsets
.
only
(
top:
10
,
bottom:
10
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
),
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
),
...
@@ -514,7 +541,6 @@ class PayItemWidget extends GetView<AndroidPayListController> {
...
@@ -514,7 +541,6 @@ class PayItemWidget extends GetView<AndroidPayListController> {
child:
Column
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
spaceEvenly
,
mainAxisAlignment:
MainAxisAlignment
.
spaceEvenly
,
children:
[
children:
[
Row
(
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
children:
[
...
...
lib/pages/frame/sign_in/view.dart
View file @
ac4c07fb
...
@@ -641,7 +641,7 @@ class SignInPage extends GetView<SignInController> {
...
@@ -641,7 +641,7 @@ class SignInPage extends GetView<SignInController> {
children:
[
children:
[
TextFormField
(
TextFormField
(
controller:
controller
.
mobileMemberController
,
controller:
controller
.
mobileMemberController
,
keyboardType:
TextInputType
.
emailAddress
,
keyboardType:
TextInputType
.
phone
,
textInputAction:
TextInputAction
.
next
,
textInputAction:
TextInputAction
.
next
,
cursorColor:
kPrimaryColor
,
cursorColor:
kPrimaryColor
,
onSaved:
(
email
)
{},
onSaved:
(
email
)
{},
...
@@ -658,6 +658,7 @@ class SignInPage extends GetView<SignInController> {
...
@@ -658,6 +658,7 @@ class SignInPage extends GetView<SignInController> {
vertical:
defaultPadding
),
vertical:
defaultPadding
),
child:
TextFormField
(
child:
TextFormField
(
controller:
controller
.
codeController
,
controller:
controller
.
codeController
,
keyboardType:
TextInputType
.
number
,
textInputAction:
TextInputAction
.
done
,
textInputAction:
TextInputAction
.
done
,
obscureText:
true
,
obscureText:
true
,
cursorColor:
kPrimaryColor
,
cursorColor:
kPrimaryColor
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment