Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
gm_flutter
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林生雨
gm_flutter
Commits
a0a0bbdf
Commit
a0a0bbdf
authored
Jul 02, 2020
by
朱璇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对比详情
parent
d1df55f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
76 additions
and
85 deletions
+76
-85
PlanCompareDetailPage.dart
...ueModel/page/PlanCompareDetail/PlanCompareDetailPage.dart
+76
-85
No files found.
lib/ClueModel/page/PlanCompareDetail/PlanCompareDetailPage.dart
View file @
a0a0bbdf
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: zx
* @Author: zx
* @Date: 2020-06-30 17:40:43
* @Date: 2020-06-30 17:40:43
* @Last Modified by: zx
* @Last Modified by: zx
* @Last Modified time: 2020-07-02
18:44:20
* @Last Modified time: 2020-07-02
21:43:07
*/
*/
import
'package:cached_network_image/cached_network_image.dart'
;
import
'package:cached_network_image/cached_network_image.dart'
;
...
@@ -91,7 +91,7 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
...
@@ -91,7 +91,7 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
if
(
data
.
data
.
first
==
FAIL
)
{
if
(
data
.
data
.
first
==
FAIL
)
{
return
errorItem
(
MediaQuery
.
of
(
context
).
size
.
width
,
return
errorItem
(
MediaQuery
.
of
(
context
).
size
.
width
,
MediaQuery
.
of
(
context
).
size
.
height
,
()
{
MediaQuery
.
of
(
context
).
size
.
height
,
()
{
//TODO
_model
.
init
([
1
,
2
]);
});
});
}
}
return
ListView
.
builder
(
return
ListView
.
builder
(
...
@@ -113,9 +113,10 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
...
@@ -113,9 +113,10 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
Widget
widget
;
Widget
widget
;
if
(
group
.
groupType
==
'hot'
)
{
if
(
group
.
groupType
==
'hot'
)
{
widget
=
Container
(
widget
=
Container
(
height:
100
,
child:
planPopularityView
(
group
),
alignment:
Alignment
.
center
,
// height: 100,
child:
baseText
(
"第一个"
,
15
,
Colors
.
black
),
// alignment: Alignment.center,
// child: baseText("第一个", 15, Colors.black),
);
);
}
else
if
(
group
.
groupType
==
'normal_attrs'
)
{
}
else
if
(
group
.
groupType
==
'normal_attrs'
)
{
widget
=
Container
(
widget
=
Container
(
...
@@ -164,6 +165,7 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
...
@@ -164,6 +165,7 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
if
(
data
.
data
==
null
)
{
if
(
data
.
data
==
null
)
{
return
Container
();
return
Container
();
}
}
PlansInfo
planinfo
=
data
.
data
.
second
[
index
];
return
Container
(
return
Container
(
child:
Stack
(
children:
<
Widget
>[
child:
Stack
(
children:
<
Widget
>[
Positioned
(
Positioned
(
...
@@ -173,7 +175,7 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
...
@@ -173,7 +175,7 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
height:
75
,
height:
75
,
width:
(
screenWidth
-
30
-
11
)
/
2
,
width:
(
screenWidth
-
30
-
11
)
/
2
,
child:
ClipRRect
(
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
15
),
borderRadius:
BorderRadius
.
circular
(
7
),
child:
Image
.
asset
(
'assets/plan_compare_detail_info_bg.png'
,
child:
Image
.
asset
(
'assets/plan_compare_detail_info_bg.png'
,
fit:
BoxFit
.
cover
),
fit:
BoxFit
.
cover
),
),
),
...
@@ -181,12 +183,15 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
...
@@ -181,12 +183,15 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
Positioned
(
Positioned
(
left:
12
,
left:
12
,
top:
24
,
top:
24
,
child:
baseText
(
'11111'
,
15
,
Color
(
0xff333333
),
bold:
true
),
child:
baseText
(
planinfo
.
planName
,
15
,
Color
(
0xff333333
),
bold:
true
),
),
),
Positioned
(
Positioned
(
left:
12
,
left:
12
,
top:
48
,
top:
48
,
child:
baseText
(
'¥¥¥¥¥¥¥¥¥¥'
,
14
,
Colors
.
red
,
bold:
true
),
child:
baseText
(
'¥'
+
planinfo
.
minPrice
+
'-'
+
planinfo
.
maxPrice
,
14
,
Colors
.
red
,
bold:
true
),
),
),
]));
]));
},
},
...
@@ -223,104 +228,109 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
...
@@ -223,104 +228,109 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
);
);
}
}
Widget
planPopularityView
(
List
<
PlansInfo
>
planInfo
)
{
Widget
planPopularityView
(
Groups
groups
)
{
return
Container
(
return
Container
(
height:
265
,
child:
Column
(
child:
Container
(
mainAxisSize:
MainAxisSize
.
min
,
child:
Column
(
children:
<
Widget
>[
mainAxisAlignment:
MainAxisAlignment
.
center
,
titleView
(
'111111'
),
children:
<
Widget
>[
Row
(
children:
<
Widget
>[
titleView
(
groups
.
groupName
),
Expanded
(
flex:
1
,
child:
planPopularityLeftItem
(
planInfo
[
0
])),
Container
(
child:
planPopularityBodyView
(
groups
)),
Expanded
(
flex:
1
,
child:
planPopularityRightItem
(
planInfo
[
1
]))
Container
()
])
]),
])),
);
);
}
}
Widget
planPopularity
LeftItem
(
PlansInfo
plan
)
{
Widget
planPopularity
BodyView
(
Groups
groups
)
{
return
Container
(
return
Container
(
color:
Colors
.
red
,
height:
170
,
// height: 80,
child:
Row
(
children:
<
Widget
>[
child:
Expanded
(
Expanded
(
flex:
1
,
child:
planPopularityLeftItem
(
groups
.
plans
[
0
])),
child:
Stack
(
children:
<
Widget
>[
Expanded
(
flex:
1
,
child:
planPopularityRightItem
(
groups
.
plans
[
1
]))
]));
}
Widget
planPopularityLeftItem
(
Plans
plan
)
{
return
Container
(
height:
170
,
child:
Stack
(
children:
<
Widget
>[
Positioned
(
Positioned
(
right:
20
,
right:
20
,
top:
12
,
top:
0
,
child:
baseText
(
'99%'
,
21
,
Color
(
0xffF25874
),
bold:
true
)),
child:
baseText
(
plan
.
positiveRate
,
21
,
Color
(
0xff3FB5AF
),
bold:
true
)),
Positioned
(
Positioned
(
right:
20
,
right:
20
,
top:
33
,
top:
24
,
// bottom: 12,
child:
baseText
(
'好评率'
,
12
,
Color
(
0xff666666
),
bold:
false
),
child:
baseText
(
'好评率'
,
12
,
Color
(
0xff666666
),
bold:
false
),
),
),
Positioned
(
Positioned
(
right:
20
,
right:
20
,
top:
55
,
top:
41
,
// bottom: 12,
child:
FiveStarView
(
3
,
5
),
child:
FiveStarView
(
3
,
5
),
),
),
Positioned
(
Positioned
(
right:
20
,
right:
20
,
top:
98
,
top:
84
,
bottom:
12
,
child:
baseText
(
plan
.
salesCount
,
21
,
Color
(
0xff3FB5AF
),
bold:
true
),
child:
baseText
(
'13679个'
,
21
,
Color
(
0xffF25874
),
bold:
true
),
),
),
Positioned
(
Positioned
(
right:
20
,
right:
20
,
top:
112
,
top:
108
,
bottom:
12
,
child:
baseText
(
'销量'
,
12
,
Color
(
0xff666666
),
bold:
false
),
child:
baseText
(
'销量'
,
12
,
Color
(
0xff666666
),
bold:
false
),
),
),
Positioned
(
Positioned
(
right:
20
,
right:
20
,
top:
132
,
bottom:
30
,
bottom:
12
,
child:
Container
(
child:
baseText
(
''
,
12
,
Color
(
0xff666666
),
bold:
false
),
color:
Colors
.
red
,
),
height:
14
,
])));
width:
95
,
)),
]));
}
}
Widget
planPopularityRightItem
(
Plans
Info
plan
)
{
Widget
planPopularityRightItem
(
Plans
plan
)
{
return
Container
(
return
Container
(
color:
Colors
.
red
,
height:
170
,
// height: 80,
child:
Stack
(
children:
<
Widget
>[
child:
Expanded
(
child:
Stack
(
children:
<
Widget
>[
Positioned
(
Positioned
(
left:
20
,
left:
20
,
top:
12
,
top:
0
,
child:
baseText
(
'99%'
,
21
,
Color
(
0xffF25874
),
bold:
true
)),
child:
baseText
(
plan
.
positiveRate
,
21
,
Color
(
0xffF25874
),
bold:
true
)),
Positioned
(
Positioned
(
left:
20
,
left:
20
,
top:
33
,
top:
24
,
// bottom: 12,
child:
baseText
(
'好评率'
,
12
,
Color
(
0xff666666
),
bold:
false
),
child:
baseText
(
'好评率'
,
12
,
Color
(
0xff666666
),
bold:
false
),
),
),
Positioned
(
Positioned
(
left:
20
,
left:
20
,
top:
55
,
top:
41
,
// bottom: 12,
child:
Container
(
child:
FiveStarView
(
3
,
5
),
height:
13
,
),
width:
81
,
child:
FiveStarView
(
3
,
5
),
)),
Positioned
(
Positioned
(
left:
20
,
left:
20
,
top:
98
,
top:
84
,
bottom:
12
,
child:
baseText
(
plan
.
salesCount
,
21
,
Color
(
0xffF25874
),
bold:
true
),
child:
baseText
(
'13679个'
,
21
,
Color
(
0xffF25874
),
bold:
true
),
),
),
Positioned
(
Positioned
(
left:
20
,
left:
20
,
top:
112
,
top:
108
,
bottom:
12
,
child:
baseText
(
'销量'
,
12
,
Color
(
0xff666666
),
bold:
false
),
child:
baseText
(
'销量'
,
12
,
Color
(
0xff666666
),
bold:
false
),
),
),
Positioned
(
Positioned
(
left:
20
,
left:
20
,
top:
132
,
bottom:
30
,
bottom:
12
,
child:
Container
(
child:
baseText
(
''
,
12
,
Color
(
0xff666666
),
bold:
false
),
color:
Colors
.
red
,
),
height:
14
,
])));
width:
95
,
)),
]));
}
}
Widget
planNormalEffectiveAttrsView
(
Groups
groups
)
{
Widget
planNormalEffectiveAttrsView
(
Groups
groups
)
{
...
@@ -333,26 +343,7 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
...
@@ -333,26 +343,7 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
child:
Column
(
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
mainAxisSize:
MainAxisSize
.
min
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
list
children:
list
));
// <Widget>[
// Expanded(
// child: Stack(children: <Widget>[
// ,
// Expanded(
// child: Container(
// margin: EdgeInsets.fromLTRB(0, 68, 0, 0),
// child:
// ListView.builder(
// shrinkWrap: true,
// physics: NeverScrollableScrollPhysics(),
// itemBuilder: (c, index) {
// return planBaseAttrsView(groups.plans);
// },
// itemCount: 5,
// )))
// ]))
));
}
}
Widget
planBaseAttrsView
(
Plans
plans
)
{
Widget
planBaseAttrsView
(
Plans
plans
)
{
...
...
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