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
f6f47198
Commit
f6f47198
authored
Oct 23, 2019
by
何碧荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
like页样式调整
parent
ac731df2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
24 deletions
+31
-24
FocusListItem.dart
lib/NewMessageModel/page/focusPage/FocusListItem.dart
+4
-4
FocusPage.dart
lib/NewMessageModel/page/focusPage/FocusPage.dart
+12
-12
LikeListItem.dart
lib/NewMessageModel/page/likePage/LikeListItem.dart
+15
-8
No files found.
lib/NewMessageModel/page/focusPage/FocusListItem.dart
View file @
f6f47198
...
@@ -8,7 +8,7 @@ import 'package:gmalpha_flutter/res/value/ALColors.dart';
...
@@ -8,7 +8,7 @@ import 'package:gmalpha_flutter/res/value/ALColors.dart';
class
FocusListItem
extends
StatelessWidget
{
class
FocusListItem
extends
StatelessWidget
{
final
Followers
item
;
final
Followers
item
;
FocusListItem
(
this
.
item
);
FocusListItem
(
this
.
item
);
Text
myText
(
Text
myText
(
String
text
,
String
text
,
Color
color
,
Color
color
,
...
@@ -21,7 +21,7 @@ class FocusListItem extends StatelessWidget {
...
@@ -21,7 +21,7 @@ class FocusListItem extends StatelessWidget {
maxLines:
maxLines
,
maxLines:
maxLines
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
ScreenUtil
()
.
setSp
(
size
),
fontSize:
ScreenUtil
.
instance
.
setSp
(
size
),
color:
color
,
color:
color
,
height:
1.38
,
height:
1.38
,
fontWeight:
weight
?
FontWeight
.
bold
:
FontWeight
.
normal
fontWeight:
weight
?
FontWeight
.
bold
:
FontWeight
.
normal
...
@@ -49,8 +49,8 @@ class FocusListItem extends StatelessWidget {
...
@@ -49,8 +49,8 @@ class FocusListItem extends StatelessWidget {
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
children:
<
Widget
>[
Container
(
Container
(
margin:
EdgeInsets
.
only
(
left:
ScreenUtil
()
.
setWidth
(
10.0
)),
margin:
EdgeInsets
.
only
(
left:
ScreenUtil
.
instance
.
setWidth
(
10.0
)),
padding:
EdgeInsets
.
only
(
top:
ScreenUtil
()
.
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
),
)
)
],
],
...
...
lib/NewMessageModel/page/focusPage/FocusPage.dart
View file @
f6f47198
...
@@ -9,12 +9,12 @@ import 'package:gmalpha_flutter/commonModel/base/BasePage.dart';
...
@@ -9,12 +9,12 @@ import 'package:gmalpha_flutter/commonModel/base/BasePage.dart';
import
'package:gmalpha_flutter/res/value/ALColors.dart'
;
import
'package:gmalpha_flutter/res/value/ALColors.dart'
;
import
'package:pull_to_refresh/pull_to_refresh.dart'
;
import
'package:pull_to_refresh/pull_to_refresh.dart'
;
double
width15
=
ScreenUtil
()
.
setWidth
(
15.0
);
double
width15
=
ScreenUtil
.
instance
.
setWidth
(
15.0
);
double
width16
=
ScreenUtil
()
.
setWidth
(
16.0
);
double
width16
=
ScreenUtil
.
instance
.
setWidth
(
16.0
);
double
width10
=
ScreenUtil
()
.
setWidth
(
10.0
);
double
width10
=
ScreenUtil
.
instance
.
setWidth
(
10.0
);
double
height16
=
ScreenUtil
()
.
setHeight
(
16.0
);
double
height16
=
ScreenUtil
.
instance
.
setHeight
(
16.0
);
double
height10
=
ScreenUtil
()
.
setHeight
(
10.0
);
double
height10
=
ScreenUtil
.
instance
.
setHeight
(
10.0
);
double
height20
=
ScreenUtil
()
.
setHeight
(
20.0
);
double
height20
=
ScreenUtil
.
instance
.
setHeight
(
20.0
);
class
FocusPage
extends
StatefulWidget
{
class
FocusPage
extends
StatefulWidget
{
final
FocusModel
_model
;
final
FocusModel
_model
;
...
@@ -70,7 +70,7 @@ class _FocusState extends BasePage<FocusPage> {
...
@@ -70,7 +70,7 @@ class _FocusState extends BasePage<FocusPage> {
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
style:
TextStyle
(
color:
ALColors
.
Color999999
,
color:
ALColors
.
Color999999
,
fontSize:
ScreenUtil
()
.
setSp
(
14.0
),
fontSize:
ScreenUtil
.
instance
.
setSp
(
14.0
),
height:
1.07
height:
1.07
),
),
);
);
...
@@ -88,7 +88,7 @@ class _FocusState extends BasePage<FocusPage> {
...
@@ -88,7 +88,7 @@ class _FocusState extends BasePage<FocusPage> {
),
),
Padding
(
Padding
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
left:
ScreenUtil
()
.
setWidth
(
6.0
),
left:
ScreenUtil
.
instance
.
setWidth
(
6.0
),
top:
height20
,
top:
height20
,
bottom:
height20
bottom:
height20
),
),
...
@@ -103,7 +103,7 @@ class _FocusState extends BasePage<FocusPage> {
...
@@ -103,7 +103,7 @@ class _FocusState extends BasePage<FocusPage> {
child:
Container
(
child:
Container
(
color:
Color
(
0xFFF4F3F8
),
color:
Color
(
0xFFF4F3F8
),
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
left:
ScreenUtil
()
.
setWidth
(
6.0
),
left:
ScreenUtil
.
instance
.
setWidth
(
6.0
),
top:
height20
,
top:
height20
,
bottom:
height20
bottom:
height20
),
),
...
@@ -255,14 +255,14 @@ class _FocusState extends BasePage<FocusPage> {
...
@@ -255,14 +255,14 @@ class _FocusState extends BasePage<FocusPage> {
children:
<
Widget
>[
children:
<
Widget
>[
Padding
(
Padding
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
top:
ScreenUtil
()
.
setHeight
(
5.0
),
top:
ScreenUtil
.
instance
.
setHeight
(
5.0
),
left:
width16
,
left:
width16
,
right:
width16
,
right:
width16
,
bottom:
ScreenUtil
()
.
setHeight
(
19.0
)
bottom:
ScreenUtil
.
instance
.
setHeight
(
19.0
)
),
),
child:
Text
(
child:
Text
(
'关注'
,
'关注'
,
style:
TextStyle
(
fontSize:
ScreenUtil
()
.
setSp
(
20.0
),
color:
ALColors
.
Color323232
),
style:
TextStyle
(
fontSize:
ScreenUtil
.
instance
.
setSp
(
20.0
),
color:
ALColors
.
Color323232
),
),
),
),
),
Container
(
Container
(
...
...
lib/NewMessageModel/page/likePage/LikeListItem.dart
View file @
f6f47198
...
@@ -21,7 +21,7 @@ class LikeListItem extends StatelessWidget {
...
@@ -21,7 +21,7 @@ class LikeListItem extends StatelessWidget {
maxLines:
maxLines
,
maxLines:
maxLines
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
ScreenUtil
()
.
setSp
(
size
),
fontSize:
ScreenUtil
.
instance
.
setSp
(
size
),
color:
color
,
color:
color
,
height:
1.38
,
height:
1.38
,
fontWeight:
weight
?
FontWeight
.
bold
:
FontWeight
.
normal
fontWeight:
weight
?
FontWeight
.
bold
:
FontWeight
.
normal
...
@@ -69,6 +69,7 @@ class LikeListItem extends StatelessWidget {
...
@@ -69,6 +69,7 @@ class LikeListItem extends StatelessWidget {
Widget
listItemInfo
()
{
Widget
listItemInfo
()
{
var
commentInfo
;
var
commentInfo
;
var
commenTime
;
var
commenTime
;
var
textTop
;
if
(
item
.
type
!=
2
){
if
(
item
.
type
!=
2
){
if
(
item
.
likeContent
.
type
==
0
){
if
(
item
.
likeContent
.
type
==
0
){
commentInfo
=
'赞了你的回答'
;
commentInfo
=
'赞了你的回答'
;
...
@@ -78,17 +79,23 @@ class LikeListItem extends StatelessWidget {
...
@@ -78,17 +79,23 @@ class LikeListItem extends StatelessWidget {
}
}
commenTime
=
MessageDate
(
item
.
time
).
diffTime
();
commenTime
=
MessageDate
(
item
.
time
).
diffTime
();
}
}
if
(
item
.
content
!=
null
){
textTop
=
11.0
;
}
else
{
textTop
=
0.0
;
}
return
Expanded
(
return
Expanded
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
children:
<
Widget
>[
Container
(
Container
(
margin:
EdgeInsets
.
only
(
left:
ScreenUtil
()
.
setWidth
(
10.0
)),
margin:
EdgeInsets
.
only
(
left:
ScreenUtil
.
instance
.
setWidth
(
10.0
)),
padding:
EdgeInsets
.
only
(
top:
ScreenUtil
().
setHeight
(
10.0
)),
padding:
EdgeInsets
.
only
(
top:
ScreenUtil
.
instance
.
setHeight
(
textTop
)),
child:
myText
(
'
${item.name??""}${item.content??""}${commentInfo??""}
'
,
ALColors
.
Color666666
,
13.0
),
child:
myText
(
'
${item.name??""}${item.content??""}${commentInfo??""}
'
,
ALColors
.
Color666666
,
13.0
),
),
),
Padding
(
Padding
(
padding:
EdgeInsets
.
only
(
left:
ScreenUtil
().
setWidth
(
10.0
),
top:
ScreenUtil
()
.
setHeight
(
3.0
)),
padding:
EdgeInsets
.
only
(
left:
ScreenUtil
.
instance
.
setWidth
(
10.0
),
top:
ScreenUtil
.
instance
.
setHeight
(
3.0
)),
child:
myText
(
'
${commenTime??""}
'
,
ALColors
.
Color999999
,
10.0
)
child:
myText
(
'
${commenTime??""}
'
,
ALColors
.
Color999999
,
10.0
)
)
)
],
],
...
@@ -98,9 +105,9 @@ class LikeListItem extends StatelessWidget {
...
@@ -98,9 +105,9 @@ class LikeListItem extends StatelessWidget {
Widget
listItemButton
()
{
Widget
listItemButton
()
{
return
Container
(
return
Container
(
padding:
EdgeInsets
.
only
(
top:
ScreenUtil
().
setHeight
(
5.0
),
left:
ScreenUtil
()
.
setWidth
(
12.0
)),
padding:
EdgeInsets
.
only
(
top:
ScreenUtil
.
instance
.
setHeight
(
5.0
),
left:
ScreenUtil
.
instance
.
setWidth
(
12.0
)),
width:
ScreenUtil
()
.
setWidth
(
54.0
),
width:
ScreenUtil
.
instance
.
setWidth
(
54.0
),
height:
ScreenUtil
()
.
setHeight
(
29.0
),
height:
ScreenUtil
.
instance
.
setHeight
(
29.0
),
child:
OutlineButton
(
child:
OutlineButton
(
padding:
const
EdgeInsets
.
only
(
left:
0.0
,
right:
0.0
,),
padding:
const
EdgeInsets
.
only
(
left:
0.0
,
right:
0.0
,),
borderSide:
BorderSide
(
borderSide:
BorderSide
(
...
@@ -114,7 +121,7 @@ class LikeListItem extends StatelessWidget {
...
@@ -114,7 +121,7 @@ class LikeListItem extends StatelessWidget {
),
),
);
);
}
}
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
if
(
item
.
type
==
2
){
if
(
item
.
type
==
2
){
...
...
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