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
70689afb
Commit
70689afb
authored
Oct 29, 2019
by
杜欣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug 处理
parent
0a4e2416
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
17 deletions
+35
-17
MessagePage.dart
lib/NewMessageModel/page/messagePage/MessagePage.dart
+26
-13
common.dart
lib/NewMessageModel/page/messagePage/common.dart
+9
-4
No files found.
lib/NewMessageModel/page/messagePage/MessagePage.dart
View file @
70689afb
import
'dart:async'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
...
...
@@ -83,7 +82,9 @@ class _MessagePageState extends BasePage<MessagePage> {
),
elevation:
0
,
),
body:
SmartRefresher
(
body:
Container
(
color:
ALColors
.
ColorFFFFFF
,
child:
SmartRefresher
(
enablePullDown:
false
,
enablePullUp:
true
,
footer:
CustomFooter
(
...
...
@@ -130,11 +131,17 @@ class _MessagePageState extends BasePage<MessagePage> {
),
controller:
_refreshController
,
onLoading:
()
=>
_onLoading
(
context
),
child:
Container
(
color:
ALColors
.
ColorFFFFFF
,
child:
SingleChildScrollView
(
child:
Column
(
children:
<
Widget
>[
topCard
(),
getListView
()])))));
child:
CustomScrollView
(
slivers:
<
Widget
>[
SliverToBoxAdapter
(
child:
topCard
(),
),
getListView
()
],
)
),
)
);
}
Widget
getListView
()
{
...
...
@@ -144,13 +151,19 @@ class _MessagePageState extends BasePage<MessagePage> {
builder:
(
BuildContext
context
,
data
)
{
var
dataList
=
data
?.
data
?.
data
;
if
(
dataList
==
null
)
{
return
noData
();
return
SliverFillViewport
(
delegate:
SliverChildListDelegate
([
Container
()
])
);
}
return
ListView
.
builder
(
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
itemBuilder:
(
c
,
i
)
=>
messageList
(
dataList
[
i
]),
itemCount:
dataList
.
length
,
return
SliverList
(
delegate:
SliverChildBuilderDelegate
(
(
BuildContext
context
,
int
index
)
{
return
messageList
(
dataList
[
index
]);
},
childCount:
dataList
.
length
),
);
});
}
...
...
lib/NewMessageModel/page/messagePage/common.dart
View file @
70689afb
...
...
@@ -213,11 +213,16 @@ Widget messageList(Data list) {
'alpha://topic_detail?topic_id=
${list.repliedContent.topicId}
'
});
},
child:
Image
.
network
(
list
.
repliedContent
.
content
,
child:
Container
(
width:
ScreenUtil
.
instance
.
setWidth
(
48
),
fit:
BoxFit
.
fill
,
))
height:
ScreenUtil
.
instance
.
setHeight
(
48
),
child:
Image
.
network
(
list
.
repliedContent
.
content
!=
null
?
list
.
repliedContent
.
content
:
'http://alpha.iyanzhi.com/topic/2019/08/16/63ef62d019-w'
,
width:
ScreenUtil
.
instance
.
setWidth
(
48
),
height:
ScreenUtil
.
instance
.
setHeight
(
48
)
),
)
)
],
));
}
...
...
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