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
85ae7098
Commit
85ae7098
authored
Oct 16, 2019
by
郑智刚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tesePage路由修改,同志街面增加loading和错误处理
parent
09da21c9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
9 deletions
+39
-9
AttentionPage.dart
lib/NewMessageModel/page/AttentionPage.dart
+27
-0
TestPage.dart
lib/TestPage.dart
+12
-9
No files found.
lib/NewMessageModel/page/AttentionPage.dart
View file @
85ae7098
...
...
@@ -123,6 +123,27 @@ class _AttentionPageState extends BasePage<AttentionPage> {
);
}
Widget
loadingItem
()
{
return
Center
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[
CircularProgressIndicator
(),
Padding
(
padding:
const
EdgeInsets
.
all
(
10.0
),
child:
Text
(
'加载中...'
),
)
],
),
);
}
Widget
errorItem
(
String
reason
)
{
return
Center
(
child:
Text
(
"
$reason
"
),
);
}
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
...
...
@@ -145,6 +166,12 @@ class _AttentionPageState extends BasePage<AttentionPage> {
stream:
_model
.
zzgLive
.
stream
,
initialData:
_model
.
zzgLive
.
data
,
builder:
(
context
,
data
)
{
if
(
data
.
data
==
null
)
{
return
loadingItem
();
}
if
(
data
.
data
.
error
!=
0
||
data
.
data
.
data
==
null
)
{
return
errorItem
(
data
.
data
.
message
);
}
noData
=
data
.
data
.
noData
;
_noticeLists
=
data
.
data
.
data
;
isPerformingRequest
=
false
;
...
...
lib/TestPage.dart
View file @
85ae7098
...
...
@@ -46,12 +46,13 @@ class TestPage extends StatelessWidget {
}
testMessagePage
(
BuildContext
context
)
{
return
base
(
return
base
(
context
,
()
{
Navigator
.
push
(
context
,
RouterCenterImpl
()
.
findNewMessageRouter
()
?.
getMessagePage
(
''
),
"消息页面"
);
new
CustomRoute
(
RouterCenterImpl
()
.
findNewMessageRouter
()
?.
getMessagePage
(
''
))
);
},
"消息页面"
);
}
testReportPage
(
BuildContext
context
)
{
...
...
@@ -94,10 +95,12 @@ class TestPage extends StatelessWidget {
}
attentionPage
(
BuildContext
context
)
{
return
base
(
return
base
(
context
,
()
{
Navigator
.
push
(
context
,
RouterCenterImpl
()
.
findNewMessageRouter
()?.
getAttentionPage
(
'message_home'
),
"通知页面"
);
new
CustomRoute
(
RouterCenterImpl
()
.
findNewMessageRouter
()?.
getAttentionPage
(
'message_home'
))
);
},
"通知页面"
);
}
}
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