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
53e588eb
Commit
53e588eb
authored
Oct 17, 2019
by
郑智刚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
结构样式优化
parent
16c6f695
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
56 deletions
+67
-56
AttentionListItem.dart
lib/NewMessageModel/page/AttentionListItem.dart
+58
-51
AttentionPage.dart
lib/NewMessageModel/page/AttentionPage.dart
+9
-5
No files found.
lib/NewMessageModel/page/AttentionListItem.dart
View file @
53e588eb
...
...
@@ -27,59 +27,66 @@ class AttentionListItem extends StatelessWidget {
);
}
Widget
listItemHead
()
{
return
Container
(
margin:
const
EdgeInsets
.
only
(
right:
10.0
),
child:
CircleAvatar
(
radius:
21.0
,
backgroundImage:
NetworkImage
(
item
.
icon
),
),
);
}
Widget
listItemInfo
()
{
return
Expanded
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
Container
(
child:
myText
(
'
${item.title}
'
,
ALColors
.
Color464646
,
13.0
,
weight:
true
),
),
Padding
(
padding:
const
EdgeInsets
.
only
(
top:
4.0
),
child:
myText
(
'
${item.content}
'
,
ALColors
.
Color666666
,
13.0
,
maxLines:
2
),
),
Padding
(
padding:
const
EdgeInsets
.
only
(
top:
3.0
),
child:
myText
(
MessageDate
(
item
.
pushTime
).
diffTime
(),
ALColors
.
Color999999
,
10.0
)
)
],
),
);
}
Widget
listItemButton
()
{
return
Container
(
padding:
const
EdgeInsets
.
only
(
top:
5.0
,
left:
12.0
),
width:
66.0
,
height:
34.0
,
child:
OutlineButton
(
padding:
const
EdgeInsets
.
only
(
left:
0.0
,
right:
0.0
,),
borderSide:
BorderSide
(
color:
ALColors
.
Color323232
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
zero
),
onPressed:
()
{
// todo 跳转到原生页面 详情页面
},
child:
myText
(
'详情'
,
ALColors
.
Color323232
,
13.0
)
),
);
}
@override
Widget
build
(
BuildContext
context
)
{
return
SizedBox
(
child:
Card
(
elevation:
0.0
,
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
Padding
(
padding:
const
EdgeInsets
.
only
(
top:
5.0
,
left:
16.0
,
right:
10.0
),
child:
CircleAvatar
(
radius:
21.0
,
backgroundImage:
NetworkImage
(
item
.
icon
),
),
),
Expanded
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
Container
(
child:
myText
(
'
${item.title}
'
,
ALColors
.
Color464646
,
13.0
,
weight:
true
),
),
Padding
(
padding:
const
EdgeInsets
.
only
(
top:
4.0
),
child:
myText
(
'
${item.content}
'
,
ALColors
.
Color666666
,
13.0
,
maxLines:
2
),
),
Padding
(
padding:
const
EdgeInsets
.
only
(
top:
3.0
),
child:
myText
(
MessageDate
(
item
.
pushTime
).
diffTime
(),
ALColors
.
Color999999
,
10.0
)
)
],
),
),
Padding
(
padding:
const
EdgeInsets
.
only
(
top:
4.0
,
left:
12.0
,
right:
16.0
),
child:
Container
(
width:
54.0
,
height:
29.0
,
child:
OutlineButton
(
padding:
const
EdgeInsets
.
only
(
left:
0.0
,
right:
0.0
,),
borderSide:
BorderSide
(
color:
ALColors
.
Color323232
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
zero
),
onPressed:
()
{
// todo 跳转到原生页面 详情页面
},
child:
myText
(
'详情'
,
ALColors
.
Color323232
,
13.0
)
),
)
)
],
),
return
Container
(
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
listItemHead
(),
listItemInfo
(),
listItemButton
()
],
),
);
}
...
...
lib/NewMessageModel/page/AttentionPage.dart
View file @
53e588eb
...
...
@@ -83,15 +83,19 @@ class _AttentionPageState extends BasePage<AttentionPage> {
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
Padding
(
padding:
const
EdgeInsets
.
only
(
top:
16.0
,
left:
16.0
,
right:
16.0
,
bottom:
10
.0
),
padding:
const
EdgeInsets
.
only
(
top:
5.0
,
left:
16.0
,
right:
16.0
,
bottom:
29
.0
),
child:
Text
(
'通知'
,
style:
TextStyle
(
fontSize:
20.0
,
color:
ALColors
.
Color323232
),
),
),
Divider
(
color:
ALColors
.
ColorE4E4E4
,
),
Container
(
margin:
const
EdgeInsets
.
only
(
left:
15.0
,
right:
15.0
),
child:
Divider
(
height:
1.0
,
color:
ALColors
.
ColorE4E4E4
,
),
)
],
);
}
...
...
@@ -108,7 +112,7 @@ class _AttentionPageState extends BasePage<AttentionPage> {
return
_buildProgressIndicator
();
}
return
Padding
(
padding:
const
EdgeInsets
.
only
(
bottom:
21
.0
),
padding:
const
EdgeInsets
.
only
(
bottom:
16.0
,
top:
16.0
,
left:
15.0
,
right:
15
.0
),
child:
AttentionListItem
(
_noticeLists
[
index
]),
);
}
...
...
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