Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
gm_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
林生雨
gm_flutter
Commits
2463d3fb
Commit
2463d3fb
authored
Jul 08, 2020
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
96727ad9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
4 deletions
+36
-4
StickyTabBarDelegateWithSize.dart
lib/ClueModel/page/common/StickyTabBarDelegateWithSize.dart
+30
-0
PlanPage.dart
lib/ClueModel/page/plan/PlanPage.dart
+0
-0
TopList.dart
lib/ClueModel/page/top/TopList.dart
+1
-0
TopListModel.dart
lib/ClueModel/page/top/TopListModel.dart
+1
-3
BaseComponent.dart
lib/commonModel/base/BaseComponent.dart
+4
-1
No files found.
lib/ClueModel/page/common/StickyTabBarDelegateWithSize.dart
0 → 100644
View file @
2463d3fb
/*
* @author lsy
* @date 2020/7/8
**/
import
'package:flutter/material.dart'
;
class
StickyTabBarDelegateWithSize
extends
SliverPersistentHeaderDelegate
{
final
Widget
child
;
final
double
height
;
StickyTabBarDelegateWithSize
({
@required
this
.
child
,
this
.
height
});
@override
Widget
build
(
BuildContext
context
,
double
shrinkOffset
,
bool
overlapsContent
)
{
return
this
.
child
;
}
@override
double
get
maxExtent
=>
height
??
40
;
@override
double
get
minExtent
=>
height
??
40
;
@override
bool
shouldRebuild
(
SliverPersistentHeaderDelegate
oldDelegate
)
{
return
true
;
}
}
lib/ClueModel/page/plan/PlanPage.dart
View file @
2463d3fb
This diff is collapsed.
Click to expand it.
lib/ClueModel/page/top/TopList.dart
View file @
2463d3fb
...
@@ -32,6 +32,7 @@ class TopListState extends State<TopList>
...
@@ -32,6 +32,7 @@ class TopListState extends State<TopList>
@override
@override
void
initState
()
{
void
initState
()
{
super
.
initState
();
super
.
initState
();
_model
.
tagId
=
"
${widget.id}
"
;
_model
.
getData
(
true
);
_model
.
getData
(
true
);
refresh
=
(
str
)
{
refresh
=
(
str
)
{
_model
.
stateLive
.
notifyView
(
LOADING
);
_model
.
stateLive
.
notifyView
(
LOADING
);
...
...
lib/ClueModel/page/top/TopListModel.dart
View file @
2463d3fb
...
@@ -43,12 +43,10 @@ class TopListModel extends BaseModel {
...
@@ -43,12 +43,10 @@ class TopListModel extends BaseModel {
datasLive
.
notifyView
([]);
datasLive
.
notifyView
([]);
}
}
}
else
{
}
else
{
stateLive
.
notifyView
(
ENDLOADING
);
datas
.
addAll
(
event
.
data
.
plans
);
datas
.
addAll
(
event
.
data
.
plans
);
datasLive
.
notifyView
(
datas
);
datasLive
.
notifyView
(
datas
);
}
}
if
(
page
==
1
)
{
stateLive
.
notifyView
(
ENDLOADING
);
}
}
else
{
}
else
{
NativeToast
.
showNativeToast
(
event
.
message
);
NativeToast
.
showNativeToast
(
event
.
message
);
stateLive
.
notifyView
(
FAIL
);
stateLive
.
notifyView
(
FAIL
);
...
...
lib/commonModel/base/BaseComponent.dart
View file @
2463d3fb
...
@@ -521,7 +521,10 @@ Widget baseStateView(double width, double height, LiveData<int> stateLive,
...
@@ -521,7 +521,10 @@ Widget baseStateView(double width, double height, LiveData<int> stateLive,
initialData:
stateLive
.
data
??
LOADING
,
initialData:
stateLive
.
data
??
LOADING
,
builder:
(
c
,
data
)
{
builder:
(
c
,
data
)
{
if
(
data
.
data
==
LOADING
)
{
if
(
data
.
data
==
LOADING
)
{
return
loadingItem
();
return
Container
(
color:
Colors
.
white
,
child:
loadingItem
(),
);
}
else
if
(
data
.
data
==
FAIL
)
{
}
else
if
(
data
.
data
==
FAIL
)
{
return
errorItem
(
width
,
height
,
retry
,
paddingTop:
paddingTop
);
return
errorItem
(
width
,
height
,
retry
,
paddingTop:
paddingTop
);
}
else
if
(
data
.
data
==
EMPTY
)
{
}
else
if
(
data
.
data
==
EMPTY
)
{
...
...
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