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
1af25d1f
Commit
1af25d1f
authored
Jul 11, 2020
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
w
parent
98aae461
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
60 deletions
+51
-60
PlanCompareDetailPage.dart
...ueModel/page/PlanCompareDetail/PlanCompareDetailPage.dart
+51
-60
No files found.
lib/ClueModel/page/PlanCompareDetail/PlanCompareDetailPage.dart
View file @
1af25d1f
...
@@ -303,33 +303,32 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
...
@@ -303,33 +303,32 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
child:
Container
(
child:
Container
(
height:
7
,
height:
7
,
width:
95
,
width:
95
,
child:
Stack
(
children:
<
Widget
>[
child:
ClipRRect
(
Positioned
(
borderRadius:
BorderRadius
.
circular
(
3.5
),
left:
0
,
child:
Container
(
top:
0
,
color:
Color
(
0xffF7F6FA
),
width:
95
,
height:
7
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
3.5
),
child:
Container
(
color:
Color
(
0xffF7F6FA
),
),
),
),
Positioned
(
right:
0
,
top:
0
,
width:
95
*
sellCount
(
0
,
groups
.
plans
[
1
]),
height:
7
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
3.5
),
child:
Container
(
color:
Color
(
0xff3FB5AF
),
),
),
),
),
]
),
),
)),
)),
Positioned
(
right:
20
,
bottom:
30
,
child:
Container
(
width:
95
*
sellCount
(
0
,
plan
,
max
(
int
.
parse
(
groups
.
plans
[
0
].
salesCount
),
int
.
parse
(
groups
.
plans
[
1
].
salesCount
))),
height:
7
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
3.5
),
child:
Container
(
color:
Color
(
0xff3FB5AF
),
),
),
),
)
]));
]));
}
}
...
@@ -375,33 +374,32 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
...
@@ -375,33 +374,32 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
child:
Container
(
child:
Container
(
height:
7
,
height:
7
,
width:
95
,
width:
95
,
child:
Stack
(
children:
<
Widget
>[
child:
ClipRRect
(
Positioned
(
borderRadius:
BorderRadius
.
circular
(
3.5
),
left:
0
,
child:
Container
(
top:
0
,
color:
Color
(
0xffF7F6FA
),
width:
95
,
height:
7
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
3.5
),
child:
Container
(
color:
Color
(
0xffF7F6FA
),
),
),
),
Positioned
(
left:
0
,
top:
0
,
width:
95
*
sellCount
(
1
,
groups
.
plans
[
0
]),
height:
7
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
3.5
),
child:
Container
(
color:
Color
(
0xffF25874
),
),
),
),
),
]
),
),
)),
)),
Positioned
(
left:
20
,
bottom:
30
,
child:
Container
(
width:
95
*
sellCount
(
1
,
plan
,
max
(
int
.
parse
(
groups
.
plans
[
0
].
salesCount
),
int
.
parse
(
groups
.
plans
[
1
].
salesCount
))),
height:
7
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
3.5
),
child:
Container
(
color:
Color
(
0xffF25874
),
),
),
),
)
]));
]));
}
}
...
@@ -478,15 +476,8 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
...
@@ -478,15 +476,8 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
]);
]);
}
}
double
sellCount
(
int
index
,
Plans
anotherPlans
)
{
double
sellCount
(
int
index
,
Plans
anotherPlans
,
int
max
)
{
Groups
popularity
=
_model
.
detailLive
.
data
.
second
[
0
];
int
salesCount
=
int
.
parse
(
anotherPlans
.
salesCount
);
Plans
plans
=
popularity
.
plans
[
index
];
return
salesCount
/
max
/
1.0
;
int
salesCount
=
int
.
parse
(
plans
.
salesCount
);
int
anSalesCount
=
int
.
parse
(
plans
.
salesCount
);
if
(
salesCount
>=
anSalesCount
)
{
return
1.0
;
}
else
{
return
anSalesCount
/
salesCount
;
}
}
}
}
}
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