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
153beb76
Commit
153beb76
authored
Apr 17, 2023
by
skeyboy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
android 订阅样式修改
parent
ac4c07fb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
41 deletions
+95
-41
lib/common/entities/good.dart
lib/common/entities/good.dart
+16
-0
lib/pages/frame/android_pay_list/widgets/helloword.dart
lib/pages/frame/android_pay_list/widgets/helloword.dart
+69
-34
lib/pages/frame/sign_in/view.dart
lib/pages/frame/sign_in/view.dart
+10
-7
No files found.
lib/common/entities/good.dart
View file @
153beb76
...
...
@@ -6,6 +6,8 @@ class GoodEntity {
String
?
_goodsName
;
String
?
_goodsDesc
;
double
?
_amount
;
double
?
_originalPrice
;
String
?
_dayDesc
;
int
?
_integral
;
String
?
_createTime
;
String
?
_updateTime
;
...
...
@@ -17,8 +19,10 @@ class GoodEntity {
GoodEntity
(
{
int
?
id
,
String
?
goodsName
,
String
?
dayDesc
,
String
?
goodsDesc
,
double
?
amount
,
double
?
originalPrice
,
int
?
integral
,
String
?
createTime
,
String
?
updateTime
,
...
...
@@ -38,6 +42,9 @@ class GoodEntity {
if
(
amount
!=
null
)
{
this
.
_amount
=
amount
;
}
if
(
originalPrice
!=
null
)
{
_originalPrice
=
originalPrice
;
}
if
(
integral
!=
null
)
{
this
.
_integral
=
integral
;
}
...
...
@@ -59,6 +66,9 @@ class GoodEntity {
if
(
count
!=
null
)
{
this
.
_count
=
count
;
}
if
(
dayDesc
!=
null
){
_dayDesc
=
dayDesc
;
}
}
int
?
get
id
=>
_id
;
...
...
@@ -69,6 +79,10 @@ class GoodEntity {
set
goodsDesc
(
String
?
goodsDesc
)
=>
_goodsDesc
=
goodsDesc
;
double
?
get
amount
=>
_amount
;
set
amount
(
double
?
amount
)
=>
_amount
=
amount
;
double
?
get
originalPrice
=>
_originalPrice
;
set
originalPrice
(
double
?
originalPrice
)
=>
_originalPrice
=
originalPrice
;
String
?
get
dayDesc
=>
_dayDesc
;
set
dayDesc
(
String
?
dayDesc
)
=>
_dayDesc
=
dayDesc
;
int
?
get
integral
=>
_integral
;
set
integral
(
int
?
integral
)
=>
_integral
=
integral
;
String
?
get
createTime
=>
_createTime
;
...
...
@@ -97,6 +111,8 @@ class GoodEntity {
_isShelf
=
json
[
'isShelf'
];
_goodsType
=
json
[
'goodsType'
];
_count
=
json
[
'count'
];
_originalPrice
=
json
[
'originalPrice'
];
_dayDesc
=
json
[
'dayDesc'
]
??
"限时特惠"
;
}
Map
<
String
,
dynamic
>
toJson
()
{
...
...
lib/pages/frame/android_pay_list/widgets/helloword.dart
View file @
153beb76
import
'dart:math'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_barrage/flutter_barrage.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
import
'package:flutter_vibrate/flutter_vibrate.dart'
;
import
'package:get/get.dart'
;
import
'package:glassy/glassy_button.dart'
;
...
...
@@ -200,8 +203,10 @@ class PayItemWidget extends GetView<AndroidPayListController> {
scrollDirection:
Axis
.
horizontal
,
child:
IntrinsicHeight
(
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
controller
.
state
.
items
.
reversed
.
map
((
element
)
=>
Container
(
width:
min
(
Get
.
width
,
375
).
w
/
4
,
margin:
const
EdgeInsets
.
only
(
right:
10
),
child:
InkWell
(
borderRadius:
BorderRadius
.
circular
(
10
),
...
...
@@ -212,7 +217,7 @@ class PayItemWidget extends GetView<AndroidPayListController> {
},
child:
Ink
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
1
0
),
horizontal:
5
,
vertical:
2
0
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
10
),
// border: ,Color.argb(255, 62, 67, 95)
...
...
@@ -249,10 +254,11 @@ class PayItemWidget extends GetView<AndroidPayListController> {
)),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
s
paceBetween
,
MainAxisAlignment
.
s
tart
,
children:
[
Text
(
element
.
goodsName
!,
maxLines:
1
,
style:
TextStyle
(
fontWeight:
FontWeight
.
bold
,
color:
controller
.
state
...
...
@@ -264,6 +270,7 @@ class PayItemWidget extends GetView<AndroidPayListController> {
),
Text
(
'¥
${element.amount!}
'
,
maxLines:
1
,
style:
TextStyle
(
fontWeight:
FontWeight
.
bold
,
color:
controller
.
state
...
...
@@ -274,39 +281,67 @@ class PayItemWidget extends GetView<AndroidPayListController> {
:
const
Color
.
fromARGB
(
255
,
241
,
197
,
131
)),
),
Container
(
width:
Get
.
width
/
3.5
,
child:
Column
(
children:
element
.
goodsDesc
!
.
split
(
'、'
)
.
map
((
e
)
=>
Text
(
e
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontWeight:
FontWeight
.
bold
,
color:
controller
.
state
.
selectedItem
.
id
==
element
.
id
?
const
Color
.
fromARGB
(
255
,
230
,
31
,
32
)
:
const
Color
.
fromARGB
(
255
,
241
,
197
,
131
)),
))
.
toList
(),
if
(
element
.
originalPrice
!=
null
)
Text
(
'¥
${element.originalPrice!}
'
,
maxLines:
1
,
style:
TextStyle
(
decoration:
TextDecoration
.
combine
([
// TextDecoration.underline,
TextDecoration
.
lineThrough
]),
fontWeight:
FontWeight
.
bold
,
color:
Color
.
fromARGB
(
255
,
140
,
145
,
151
)),
),
),
if
(
element
.
dayDesc
!=
null
)
Text
(
element
.
dayDesc
!,
maxLines:
1
,
style:
TextStyle
(
fontWeight:
FontWeight
.
bold
,
color:
controller
.
state
.
selectedItem
.
id
==
element
.
id
?
const
Color
.
fromARGB
(
255
,
230
,
31
,
32
)
:
const
Color
.
fromARGB
(
255
,
241
,
197
,
131
)),
),
// Container(
// width: Get.width / 3.5,
// child: Column(
// children: element.goodsDesc!
// .split('、')
// .map((e) => Text(
// e,
// textAlign:
// TextAlign.center,
// style: TextStyle(
// fontWeight:
// FontWeight.bold,
// color: controller
// .state
// .selectedItem
// .id ==
// element.id
// ? const Color
// .fromARGB(
// 255,
// 230,
// 31,
// 32)
// : const Color
// .fromARGB(
// 255,
// 241,
// 197,
// 131)),
// ))
// .toList(),
// ),
// ),
// Text(
// '¥${(double.parse(element.goodsDesc!) * 1.2).toStringAsFixed(2)}',
// style: TextStyle(
...
...
lib/pages/frame/sign_in/view.dart
View file @
153beb76
...
...
@@ -690,13 +690,16 @@ class SignInPage extends GetView<SignInController> {
child:
Container
(
width:
Get
.
width
-
40
,
height:
45
,
child:
ElevatedButton
(
// style: ButtonStyle(backgroundColor: MaterialStateProperty.all(Color(0xFF6F35A5))),
onPressed:
()
{
controller
.
handleSignIn
();
},
child:
Text
(
"登录"
.
toUpperCase
(),
child:
Padding
(
padding:
const
EdgeInsets
.
all
(
8.0
),
child:
ElevatedButton
(
// style: ButtonStyle(backgroundColor: MaterialStateProperty.all(Color(0xFF6F35A5))),
onPressed:
()
{
controller
.
handleSignIn
();
},
child:
Text
(
"登录"
.
toUpperCase
(),
),
),
),
),
...
...
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