Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
gmalpha_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
mobile
gmalpha_flutter
Commits
ed07ea9f
Commit
ed07ea9f
authored
Oct 31, 2019
by
何碧荣
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
622ff2c4
101de53c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
35 deletions
+54
-35
FocusListItem.dart
lib/NewMessageModel/page/focusPage/FocusListItem.dart
+5
-0
LikeListItem.dart
lib/NewMessageModel/page/likePage/LikeListItem.dart
+19
-7
LikePageEntity.dart
...NewMessageModel/service/remote/entity/LikePageEntity.dart
+29
-28
layoutTest.dart
lib/commonModel/testPage/layoutTest.dart
+1
-0
No files found.
lib/NewMessageModel/page/focusPage/FocusListItem.dart
View file @
ed07ea9f
...
@@ -50,10 +50,14 @@ class FocusListItem extends StatelessWidget {
...
@@ -50,10 +50,14 @@ class FocusListItem extends StatelessWidget {
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
children:
<
Widget
>[
Container
(
Container
(
width:
double
.
infinity
,
height:
42.0
,
decoration:
BoxDecoration
(
color:
ALColors
.
ColorFFFFFF
),
margin:
EdgeInsets
.
only
(
left:
ScreenUtil
.
instance
.
setWidth
(
10.0
)),
margin:
EdgeInsets
.
only
(
left:
ScreenUtil
.
instance
.
setWidth
(
10.0
)),
padding:
EdgeInsets
.
only
(
top:
ScreenUtil
.
instance
.
setHeight
(
10.0
)),
padding:
EdgeInsets
.
only
(
top:
ScreenUtil
.
instance
.
setHeight
(
10.0
)),
child:
myText
(
'
${item.username??""}
关注了你'
,
ALColors
.
Color666666
,
13.0
),
child:
myText
(
'
${item.username??""}
关注了你'
,
ALColors
.
Color666666
,
13.0
),
),
),
],
],
),
),
);
);
...
@@ -77,3 +81,4 @@ class FocusListItem extends StatelessWidget {
...
@@ -77,3 +81,4 @@ class FocusListItem extends StatelessWidget {
));
));
}
}
}
}
lib/NewMessageModel/page/likePage/LikeListItem.dart
View file @
ed07ea9f
...
@@ -43,13 +43,13 @@ class LikeListItem extends StatelessWidget {
...
@@ -43,13 +43,13 @@ class LikeListItem extends StatelessWidget {
},
},
child:
ClipOval
(
child:
ClipOval
(
child:
Container
(
child:
Container
(
color:
ALColors
.
ColorE4E4E4
,
color:
ALColors
.
ColorE4E4E4
,
child:
CachedNetworkImage
(
child:
CachedNetworkImage
(
width:
42.0
,
width:
42.0
,
height:
42.0
,
height:
42.0
,
imageUrl:
item
.
icon
,
imageUrl:
item
.
icon
,
fit:
BoxFit
.
cover
,
fit:
BoxFit
.
cover
,
),
),
)));
)));
}
}
...
@@ -100,6 +100,7 @@ class LikeListItem extends StatelessWidget {
...
@@ -100,6 +100,7 @@ class LikeListItem extends StatelessWidget {
Widget
listItemInfo
()
{
Widget
listItemInfo
()
{
var
commentInfo
;
var
commentInfo
;
var
commenTime
;
var
commenTime
;
var
replyContent
;
var
textTop
;
var
textTop
;
if
(
item
.
type
!=
2
)
{
if
(
item
.
type
!=
2
)
{
if
(
item
.
likeContent
.
type
==
0
)
{
if
(
item
.
likeContent
.
type
==
0
)
{
...
@@ -108,6 +109,9 @@ class LikeListItem extends StatelessWidget {
...
@@ -108,6 +109,9 @@ class LikeListItem extends StatelessWidget {
commentInfo
=
'赞了你的评论'
;
commentInfo
=
'赞了你的评论'
;
}
}
commenTime
=
MessageDate
(
item
.
time
).
diffTime
();
commenTime
=
MessageDate
(
item
.
time
).
diffTime
();
if
(
item
.
type
==
1
)
{
replyContent
=
item
.
likeContent
.
replyContent
;
}
}
}
if
(
item
.
content
!=
null
)
{
if
(
item
.
content
!=
null
)
{
textTop
=
11.0
;
textTop
=
11.0
;
...
@@ -147,6 +151,14 @@ class LikeListItem extends StatelessWidget {
...
@@ -147,6 +151,14 @@ class LikeListItem extends StatelessWidget {
ALColors
.
Color666666
,
ALColors
.
Color666666
,
13.0
),
13.0
),
),
),
item
.
type
==
1
?
Padding
(
padding:
EdgeInsets
.
only
(
left:
ScreenUtil
.
instance
.
setWidth
(
10.0
),
top:
ScreenUtil
.
instance
.
setHeight
(
3.0
)),
child:
myText
(
'
${replyContent ?? ""}
'
,
ALColors
.
Color999999
,
10.0
))
:
Container
(),
Padding
(
Padding
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
left:
ScreenUtil
.
instance
.
setWidth
(
10.0
),
left:
ScreenUtil
.
instance
.
setWidth
(
10.0
),
...
...
lib/NewMessageModel/service/remote/entity/LikePageEntity.dart
View file @
ed07ea9f
...
@@ -2,17 +2,14 @@ class LikePageEntity {
...
@@ -2,17 +2,14 @@ class LikePageEntity {
int
error
;
int
error
;
String
message
;
String
message
;
Null
extra
;
Null
extra
;
bool
noData
;
List
<
Data
>
data
;
List
<
Data
>
data
;
LikePageEntity
(
LikePageEntity
({
this
.
error
,
this
.
message
,
this
.
extra
,
this
.
data
});
{
this
.
error
,
this
.
message
,
this
.
extra
,
this
.
noData
,
this
.
data
});
LikePageEntity
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
LikePageEntity
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
error
=
json
[
'error'
];
error
=
json
[
'error'
];
message
=
json
[
'message'
];
message
=
json
[
'message'
];
extra
=
json
[
'extra'
];
extra
=
json
[
'extra'
];
noData
=
json
[
'noData'
];
if
(
json
[
'data'
]
!=
null
)
{
if
(
json
[
'data'
]
!=
null
)
{
data
=
new
List
<
Data
>();
data
=
new
List
<
Data
>();
json
[
'data'
].
forEach
((
v
)
{
json
[
'data'
].
forEach
((
v
)
{
...
@@ -26,7 +23,6 @@ class LikePageEntity {
...
@@ -26,7 +23,6 @@ class LikePageEntity {
data
[
'error'
]
=
this
.
error
;
data
[
'error'
]
=
this
.
error
;
data
[
'message'
]
=
this
.
message
;
data
[
'message'
]
=
this
.
message
;
data
[
'extra'
]
=
this
.
extra
;
data
[
'extra'
]
=
this
.
extra
;
data
[
'noData'
]
=
this
.
noData
;
if
(
this
.
data
!=
null
)
{
if
(
this
.
data
!=
null
)
{
data
[
'data'
]
=
this
.
data
.
map
((
v
)
=>
v
.
toJson
()).
toList
();
data
[
'data'
]
=
this
.
data
.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
}
...
@@ -35,54 +31,54 @@ class LikePageEntity {
...
@@ -35,54 +31,54 @@ class LikePageEntity {
}
}
class
Data
{
class
Data
{
int
type
;
int
id
;
String
content
;
int
userId
;
int
userId
;
String
icon
;
bool
unread
;
String
name
;
String
name
;
String
icon
;
double
time
;
double
time
;
int
type
;
LikeContent
likeContent
;
LikeContent
likeContent
;
int
id
;
String
content
;
bool
unread
;
Data
(
Data
(
{
this
.
type
,
{
this
.
userId
,
this
.
id
,
this
.
content
,
this
.
userId
,
this
.
icon
,
this
.
unread
,
this
.
name
,
this
.
name
,
this
.
icon
,
this
.
time
,
this
.
time
,
this
.
likeContent
});
this
.
type
,
this
.
likeContent
,
this
.
id
,
this
.
content
,
this
.
unread
});
Data
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
Data
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
type
=
json
[
'type'
];
id
=
json
[
'id'
];
content
=
json
[
'content'
];
userId
=
json
[
'user_id'
];
userId
=
json
[
'user_id'
];
icon
=
json
[
'icon'
];
unread
=
json
[
'unread'
];
name
=
json
[
'name'
];
name
=
json
[
'name'
];
icon
=
json
[
'icon'
];
time
=
json
[
'time'
];
time
=
json
[
'time'
];
type
=
json
[
'type'
];
likeContent
=
json
[
'like_content'
]
!=
null
likeContent
=
json
[
'like_content'
]
!=
null
?
new
LikeContent
.
fromJson
(
json
[
'like_content'
])
?
new
LikeContent
.
fromJson
(
json
[
'like_content'
])
:
null
;
:
null
;
id
=
json
[
'id'
];
content
=
json
[
'content'
];
unread
=
json
[
'unread'
];
}
}
Map
<
String
,
dynamic
>
toJson
()
{
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'type'
]
=
this
.
type
;
data
[
'id'
]
=
this
.
id
;
data
[
'content'
]
=
this
.
content
;
data
[
'user_id'
]
=
this
.
userId
;
data
[
'user_id'
]
=
this
.
userId
;
data
[
'icon'
]
=
this
.
icon
;
data
[
'unread'
]
=
this
.
unread
;
data
[
'name'
]
=
this
.
name
;
data
[
'name'
]
=
this
.
name
;
data
[
'icon'
]
=
this
.
icon
;
data
[
'time'
]
=
this
.
time
;
data
[
'time'
]
=
this
.
time
;
data
[
'type'
]
=
this
.
type
;
if
(
this
.
likeContent
!=
null
)
{
if
(
this
.
likeContent
!=
null
)
{
data
[
'like_content'
]
=
this
.
likeContent
.
toJson
();
data
[
'like_content'
]
=
this
.
likeContent
.
toJson
();
}
}
data
[
'id'
]
=
this
.
id
;
data
[
'content'
]
=
this
.
content
;
data
[
'unread'
]
=
this
.
unread
;
return
data
;
return
data
;
}
}
}
}
...
@@ -92,14 +88,17 @@ class LikeContent {
...
@@ -92,14 +88,17 @@ class LikeContent {
int
id
;
int
id
;
int
contentType
;
int
contentType
;
String
content
;
String
content
;
String
replyContent
;
LikeContent
({
this
.
type
,
this
.
id
,
this
.
contentType
,
this
.
content
});
LikeContent
(
{
this
.
type
,
this
.
id
,
this
.
contentType
,
this
.
content
,
this
.
replyContent
});
LikeContent
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
LikeContent
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
type
=
json
[
'type'
];
type
=
json
[
'type'
];
id
=
json
[
'id'
];
id
=
json
[
'id'
];
contentType
=
json
[
'content_type'
];
contentType
=
json
[
'content_type'
];
content
=
json
[
'content'
];
content
=
json
[
'content'
];
replyContent
=
json
[
'reply_content'
];
}
}
Map
<
String
,
dynamic
>
toJson
()
{
Map
<
String
,
dynamic
>
toJson
()
{
...
@@ -108,6 +107,7 @@ class LikeContent {
...
@@ -108,6 +107,7 @@ class LikeContent {
data
[
'id'
]
=
this
.
id
;
data
[
'id'
]
=
this
.
id
;
data
[
'content_type'
]
=
this
.
contentType
;
data
[
'content_type'
]
=
this
.
contentType
;
data
[
'content'
]
=
this
.
content
;
data
[
'content'
]
=
this
.
content
;
data
[
'reply_content'
]
=
this
.
replyContent
;
return
data
;
return
data
;
}
}
}
}
\ No newline at end of file
lib/commonModel/testPage/layoutTest.dart
View file @
ed07ea9f
...
@@ -30,6 +30,7 @@ class _LayoutTestState extends State<LayoutTest> {
...
@@ -30,6 +30,7 @@ class _LayoutTestState extends State<LayoutTest> {
Widget
_renderBoxTest
(
){
Widget
_renderBoxTest
(
){
return
Container
(
return
Container
(
color:
Colors
.
greenAccent
,
color:
Colors
.
greenAccent
,
width:
double
.
infinity
,
constraints:
BoxConstraints
(
constraints:
BoxConstraints
(
maxWidth:
double
.
infinity
,
maxWidth:
double
.
infinity
,
minWidth:
200.0
,
minWidth:
200.0
,
...
...
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