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
8ecd2a5b
Commit
8ecd2a5b
authored
Jul 04, 2020
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
b08c33b5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
173 additions
and
0 deletions
+173
-0
arguement.png
assets/arguement.png
+0
-0
eye.png
assets/eye.png
+0
-0
heart.png
assets/heart.png
+0
-0
LevelOneItem.dart
lib/ClueModel/page/levelOne/LevelOneItem.dart
+173
-0
No files found.
assets/arguement.png
0 → 100644
View file @
8ecd2a5b
1.65 KB
assets/eye.png
0 → 100644
View file @
8ecd2a5b
2.14 KB
assets/heart.png
0 → 100644
View file @
8ecd2a5b
2.07 KB
lib/ClueModel/page/levelOne/LevelOneItem.dart
View file @
8ecd2a5b
...
...
@@ -23,6 +23,10 @@ class LevelOneItem extends StatelessWidget {
return
PlanItem
(
context
);
}
else
if
(
cards
.
cardType
==
"hospital"
)
{
return
HospitalItem
(
context
);
}
else
if
(
cards
.
cardType
==
"doctor"
)
{
return
DoctorItem
(
context
);
}
else
if
(
cards
.
cardType
==
"diary"
)
{
return
DiaryItem
(
context
);
}
}
...
...
@@ -283,4 +287,173 @@ class LevelOneItem extends StatelessWidget {
],
);
}
Widget
DiaryItem
(
BuildContext
context
)
{
if
(
cards
.
plan
==
null
&&
isDebug
)
{
throw
new
Exception
();
}
return
Container
(
margin:
EdgeInsets
.
only
(
left:
20
,
right:
20
),
width:
double
.
maxFinite
,
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>[
Container
(
height:
25
,
child:
Row
(
mainAxisSize:
MainAxisSize
.
min
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
<
Widget
>[
Container
(
width:
25
,
height:
25
,
child:
ClipOval
(
child:
CachedNetworkImage
(
imageUrl:
cards
.
diary
.
user
.
portrait
,
fit:
BoxFit
.
cover
,
),
),
),
Container
(
margin:
EdgeInsets
.
only
(
left:
8
),
child:
baseText
(
cards
.
diary
.
user
.
userName
,
13
,
Color
(
0xff999999
)),
),
cards
.
diary
.
userLevel
!=
null
&&
cards
.
diary
.
userLevel
.
levelIcon
!=
null
?
Container
(
width:
31
,
height:
12
,
child:
CachedNetworkImage
(
imageUrl:
cards
.
diary
.
userLevel
.
levelIcon
,
),
)
:
Container
(
width:
0
,
)
],
),
),
(
cards
.
diary
.
images
==
null
||
cards
.
diary
.
images
.
isEmpty
||
cards
.
diary
.
images
.
length
<
2
)
?
Container
(
height:
0
,
)
:
Row
(
children:
<
Widget
>[
Expanded
(
child:
Container
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
4
),
image:
DecorationImage
(
fit:
BoxFit
.
cover
,
image:
NetworkImage
(
cards
.
diary
.
images
[
0
].
imageHalf
))),
alignment:
Alignment
.
bottomLeft
,
child:
Container
(
width:
65.5
,
height:
18
,
decoration:
BoxDecoration
(
color:
Color
(
0x4c000000
),
borderRadius:
BorderRadius
.
only
(
bottomLeft:
Radius
.
circular
(
4
),
topRight:
Radius
.
circular
(
2
),
)),
alignment:
Alignment
.
center
,
child:
baseText
(
cards
.
diary
.
images
[
0
].
desc
,
11
,
Colors
.
white
),
),
),
),
Container
(
width:
9
,
),
Expanded
(
child:
Container
(
decoration:
BoxDecoration
(
image:
DecorationImage
(
fit:
BoxFit
.
cover
,
image:
NetworkImage
(
cards
.
diary
.
images
[
1
].
imageHalf
))),
alignment:
Alignment
.
bottomLeft
,
child:
Container
(
width:
65.5
,
height:
18
,
decoration:
BoxDecoration
(
color:
Color
(
0x4c000000
),
borderRadius:
BorderRadius
.
only
(
bottomLeft:
Radius
.
circular
(
4
),
topRight:
Radius
.
circular
(
2
),
)),
alignment:
Alignment
.
center
,
child:
baseText
(
cards
.
diary
.
images
[
1
].
desc
,
11
,
Colors
.
white
),
),
),
)
],
),
Container
(
margin:
EdgeInsets
.
only
(
top:
12.5
,
bottom:
12
),
child:
Text
(
cards
.
diary
.
content
,
textScaleFactor:
1.0
,
maxLines:
5
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
decoration:
TextDecoration
.
none
,
fontSize:
15
,
color:
Color
(
0xff464646
),
fontStyle:
FontStyle
.
normal
,
fontWeight:
FontWeight
.
w400
),
)
,
)
,
baseText
(
"项目
${cards.diary.title}
"
,
13
,
Color
(
0xff999999
)),
Container
(
margin:
EdgeInsets
.
only
(
top:
12
,
bottom:
16
),
height:
14
,
child:
Row
(
mainAxisSize:
MainAxisSize
.
min
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
<
Widget
>[
Container
(
width:
14
,
height:
14
,
child:
Image
.
asset
(
"assets/eye.png"
),
),
Container
(
margin:
EdgeInsets
.
only
(
left:
5
,
right:
20
),
child:
baseText
(
"
${cards.diary.viewNum}
"
,
12
,
Color
(
0xff999999
)),
),
Container
(
width:
14
,
height:
14
,
child:
Image
.
asset
(
"assets/arguement.png"
),
),
Container
(
margin:
EdgeInsets
.
only
(
left:
5
,
right:
20
),
child:
baseText
(
"
${cards.diary.replyNum}
"
,
12
,
Color
(
0xff999999
)),
),
Container
(
width:
14
,
height:
14
,
child:
Image
.
asset
(
"assets/heart.png"
),
),
Container
(
margin:
EdgeInsets
.
only
(
left:
5
,
right:
20
),
child:
baseText
(
"
${cards.diary.voteNum}
"
,
12
,
Color
(
0xff999999
)),
)
],
),
),
Container
(
width:
double
.
maxFinite
,
height:
0.5
,
color:
Color
(
0xffE5E5E5
),
)
],
),
);
}
}
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