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
e0dd6c79
Commit
e0dd6c79
authored
Jul 09, 2020
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
5674523a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
13 deletions
+57
-13
PlanPage.dart
lib/ClueModel/page/plan/PlanPage.dart
+9
-3
TopList.dart
lib/ClueModel/page/top/TopList.dart
+3
-1
TopListModel.dart
lib/ClueModel/page/top/TopListModel.dart
+2
-1
TopPage.dart
lib/ClueModel/page/top/TopPage.dart
+5
-3
PlanBean.dart
lib/ClueModel/server/entity/PlanBean.dart
+9
-0
PlanFeedBean.dart
lib/ClueModel/server/entity/PlanFeedBean.dart
+24
-2
baseRefreshIndicator.dart
lib/commonModel/view/baseRefreshIndicator.dart
+5
-3
No files found.
lib/ClueModel/page/plan/PlanPage.dart
View file @
e0dd6c79
...
@@ -63,7 +63,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
...
@@ -63,7 +63,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
@override
@override
void
initState
()
{
void
initState
()
{
print
(
"LSY PLAN INIT"
);
print
(
"LSY PLAN INIT"
);
//
DioUtil.getInstance().setProxy("172.30.9.128");
DioUtil
.
getInstance
().
setProxy
(
"172.30.9.128"
);
_model
.
init
(
needCache:
true
);
_model
.
init
(
needCache:
true
);
super
.
initState
();
super
.
initState
();
planBarView
=
planBarView
=
...
@@ -429,7 +429,10 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
...
@@ -429,7 +429,10 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
data
.
data
==
null
?
""
:
data
.
data
[
0
].
icon
??
""
,
data
.
data
==
null
?
""
:
data
.
data
[
0
].
icon
??
""
,
fit:
BoxFit
.
cover
,
fit:
BoxFit
.
cover
,
)).
gestureDetector
(()
{
)).
gestureDetector
(()
{
Map
<
String
,
dynamic
>
map
=
{
"rank_type"
:
"0"
};
Map
<
String
,
dynamic
>
map
=
{
"rank_type"
:
"0"
,
"id"
:
"
${data.data[1].id}
"
};
RouterCenterImpl
()
RouterCenterImpl
()
.
findMainRouter
()
.
findMainRouter
()
.
jumpPage
(
context
,
"favor_plan"
,
map
,
false
);
.
jumpPage
(
context
,
"favor_plan"
,
map
,
false
);
...
@@ -454,7 +457,10 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
...
@@ -454,7 +457,10 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
data
.
data
==
null
?
""
:
data
.
data
[
1
].
icon
??
""
,
data
.
data
==
null
?
""
:
data
.
data
[
1
].
icon
??
""
,
fit:
BoxFit
.
cover
,
fit:
BoxFit
.
cover
,
)).
gestureDetector
(()
{
)).
gestureDetector
(()
{
Map
<
String
,
dynamic
>
map
=
{
"rank_type"
:
"1"
};
Map
<
String
,
dynamic
>
map
=
{
"rank_type"
:
"1"
,
"id"
:
"
${data.data[1].id}
"
};
RouterCenterImpl
()
RouterCenterImpl
()
.
findMainRouter
()
.
findMainRouter
()
.
jumpPage
(
context
,
"hot_plan"
,
map
,
false
);
.
jumpPage
(
context
,
"hot_plan"
,
map
,
false
);
...
...
lib/ClueModel/page/top/TopList.dart
View file @
e0dd6c79
...
@@ -15,8 +15,9 @@ import 'TopListModel.dart';
...
@@ -15,8 +15,9 @@ import 'TopListModel.dart';
class
TopList
extends
StatefulWidget
{
class
TopList
extends
StatefulWidget
{
final
int
id
;
final
int
id
;
double
topHeight
;
double
topHeight
;
final
String
rankId
;
TopList
(
this
.
id
,
this
.
topHeight
);
TopList
(
this
.
rankId
,
this
.
id
,
this
.
topHeight
);
@override
@override
State
<
StatefulWidget
>
createState
()
=>
TopListState
();
State
<
StatefulWidget
>
createState
()
=>
TopListState
();
...
@@ -31,6 +32,7 @@ class TopListState extends State<TopList> with AutomaticKeepAliveClientMixin {
...
@@ -31,6 +32,7 @@ class TopListState extends State<TopList> with AutomaticKeepAliveClientMixin {
void
initState
()
{
void
initState
()
{
super
.
initState
();
super
.
initState
();
_model
.
tagId
=
"
${widget.id}
"
;
_model
.
tagId
=
"
${widget.id}
"
;
_model
.
rankId
=
widget
.
rankId
;
_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 @
e0dd6c79
...
@@ -15,6 +15,7 @@ import 'package:gm_flutter/commonModel/util/PrintUtil.dart';
...
@@ -15,6 +15,7 @@ import 'package:gm_flutter/commonModel/util/PrintUtil.dart';
class
TopListModel
extends
BaseModel
{
class
TopListModel
extends
BaseModel
{
LiveData
<
int
>
stateLive
=
LiveData
();
LiveData
<
int
>
stateLive
=
LiveData
();
String
tagId
;
String
tagId
;
String
rankId
=
""
;
int
page
=
1
;
int
page
=
1
;
RxDispose
rxDispose
=
RxDispose
();
RxDispose
rxDispose
=
RxDispose
();
LiveData
<
List
<
Plans
>>
datasLive
=
LiveData
();
LiveData
<
List
<
Plans
>>
datasLive
=
LiveData
();
...
@@ -33,7 +34,7 @@ class TopListModel extends BaseModel {
...
@@ -33,7 +34,7 @@ class TopListModel extends BaseModel {
}
}
ClueApiImpl
.
getInstance
()
ClueApiImpl
.
getInstance
()
.
getPlanFeed
(
.
getPlanFeed
(
DioUtil
.
getInstance
().
getDio
(),
tagId
,
""
,
""
,
""
,
""
,
""
,
page
)
DioUtil
.
getInstance
().
getDio
(),
tagId
,
""
,
""
,
""
,
""
,
rankId
,
page
)
.
listen
((
event
)
{
.
listen
((
event
)
{
if
(
event
.
error
==
0
)
{
if
(
event
.
error
==
0
)
{
if
(
event
.
data
.
plans
==
null
||
event
.
data
.
plans
.
isEmpty
)
{
if
(
event
.
data
.
plans
==
null
||
event
.
data
.
plans
.
isEmpty
)
{
...
...
lib/ClueModel/page/top/TopPage.dart
View file @
e0dd6c79
...
@@ -25,10 +25,12 @@ import 'TopList.dart';
...
@@ -25,10 +25,12 @@ import 'TopList.dart';
class
TopPage
extends
StatefulWidget
{
class
TopPage
extends
StatefulWidget
{
String
rank_type
;
String
rank_type
;
String
id
;
TopPage
(
Map
<
String
,
dynamic
>
map
)
{
TopPage
(
Map
<
String
,
dynamic
>
map
)
{
print
(
"LSY
${map.toString()}
"
);
print
(
"LSY
${map.toString()}
"
);
this
.
rank_type
=
map
[
"rank_type"
];
this
.
rank_type
=
map
[
"rank_type"
];
this
.
id
=
map
[
"id"
];
}
}
@override
@override
...
@@ -149,7 +151,8 @@ class TopPageState extends BaseState<TopPage> with TickerProviderStateMixin {
...
@@ -149,7 +151,8 @@ class TopPageState extends BaseState<TopPage> with TickerProviderStateMixin {
var
d
=
MediaQueryData
.
fromWindow
(
window
).
padding
.
top
;
var
d
=
MediaQueryData
.
fromWindow
(
window
).
padding
.
top
;
for
(
int
i
=
0
;
i
<
_model
.
tabs
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
_model
.
tabs
.
length
;
i
++)
{
list
.
add
(
extend
.
NestedScrollViewInnerScrollPositionKeyWidget
(
list
.
add
(
extend
.
NestedScrollViewInnerScrollPositionKeyWidget
(
Key
(
"Tab
${i}
"
),
TopList
(
_model
.
tabs
[
i
].
id
,
kToolbarHeight
+
d
)));
Key
(
"Tab
${i}
"
),
TopList
(
widget
.
id
,
_model
.
tabs
[
i
].
id
,
kToolbarHeight
+
d
)));
}
}
return
extend
.
NestedScrollView
(
return
extend
.
NestedScrollView
(
innerScrollPositionKeyBuilder:
()
{
innerScrollPositionKeyBuilder:
()
{
...
@@ -161,8 +164,7 @@ class TopPageState extends BaseState<TopPage> with TickerProviderStateMixin {
...
@@ -161,8 +164,7 @@ class TopPageState extends BaseState<TopPage> with TickerProviderStateMixin {
SliverOverlapAbsorber
(
SliverOverlapAbsorber
(
handle:
extend
.
NestedScrollView
.
sliverOverlapAbsorberHandleFor
(
handle:
extend
.
NestedScrollView
.
sliverOverlapAbsorberHandleFor
(
context
),
context
),
sliver:
baseSliverAppBar
(
_model
.
imageUrl
sliver:
baseSliverAppBar
(
_model
.
imageUrl
,
height:
175
)),
,
height:
175
)),
SliverPersistentHeader
(
SliverPersistentHeader
(
pinned:
true
,
pinned:
true
,
delegate:
StickyTabBarDelegate
(
delegate:
StickyTabBarDelegate
(
...
...
lib/ClueModel/server/entity/PlanBean.dart
View file @
e0dd6c79
...
@@ -10,6 +10,9 @@ class PlanBean {
...
@@ -10,6 +10,9 @@ class PlanBean {
Map
errorExtra
;
Map
errorExtra
;
Data
data
;
Data
data
;
UserType
userType
;
UserType
userType
;
String
firstName
;
String
secondName
;
int
sortPos
;
PlanBean
({
this
.
error
,
this
.
message
,
this
.
extra
,
this
.
errorCode
,
this
.
errorExtra
,
this
.
data
,
this
.
userType
});
PlanBean
({
this
.
error
,
this
.
message
,
this
.
extra
,
this
.
errorCode
,
this
.
errorExtra
,
this
.
data
,
this
.
userType
});
...
@@ -19,6 +22,9 @@ class PlanBean {
...
@@ -19,6 +22,9 @@ class PlanBean {
extra
=
json
[
'extra'
];
extra
=
json
[
'extra'
];
errorCode
=
json
[
'error_code'
];
errorCode
=
json
[
'error_code'
];
errorExtra
=
json
[
'error_extra'
];
errorExtra
=
json
[
'error_extra'
];
firstName
=
json
[
'firstName'
];
secondName
=
json
[
'secondName'
];
sortPos
=
json
[
'sortPos'
];
data
=
json
[
'data'
]
!=
null
?
new
Data
.
fromJson
(
json
[
'data'
])
:
null
;
data
=
json
[
'data'
]
!=
null
?
new
Data
.
fromJson
(
json
[
'data'
])
:
null
;
userType
=
json
[
'user_type'
]
!=
null
?
new
UserType
.
fromJson
(
json
[
'user_type'
])
:
null
;
userType
=
json
[
'user_type'
]
!=
null
?
new
UserType
.
fromJson
(
json
[
'user_type'
])
:
null
;
}
}
...
@@ -28,8 +34,11 @@ class PlanBean {
...
@@ -28,8 +34,11 @@ class PlanBean {
data
[
'error'
]
=
this
.
error
;
data
[
'error'
]
=
this
.
error
;
data
[
'message'
]
=
this
.
message
;
data
[
'message'
]
=
this
.
message
;
data
[
'extra'
]
=
this
.
extra
;
data
[
'extra'
]
=
this
.
extra
;
data
[
'sortPos'
]
=
this
.
sortPos
;
data
[
'error_code'
]
=
this
.
errorCode
;
data
[
'error_code'
]
=
this
.
errorCode
;
data
[
'error_extra'
]
=
this
.
errorExtra
;
data
[
'error_extra'
]
=
this
.
errorExtra
;
data
[
'firstName'
]
=
this
.
firstName
;
data
[
'secondName'
]
=
this
.
secondName
;
if
(
this
.
data
!=
null
)
{
if
(
this
.
data
!=
null
)
{
data
[
'data'
]
=
this
.
data
.
toJson
();
data
[
'data'
]
=
this
.
data
.
toJson
();
}
}
...
...
lib/ClueModel/server/entity/PlanFeedBean.dart
View file @
e0dd6c79
...
@@ -11,6 +11,12 @@ class PlanFeedBean {
...
@@ -11,6 +11,12 @@ class PlanFeedBean {
Data
data
;
Data
data
;
UserType
userType
;
UserType
userType
;
String
tag_id
;
String
order_by
;
String
min_price
;
String
max_price
;
int
page
;
PlanFeedBean
(
PlanFeedBean
(
{
this
.
error
,
{
this
.
error
,
this
.
message
,
this
.
message
,
...
@@ -24,6 +30,13 @@ class PlanFeedBean {
...
@@ -24,6 +30,13 @@ class PlanFeedBean {
error
=
json
[
'error'
];
error
=
json
[
'error'
];
message
=
json
[
'message'
];
message
=
json
[
'message'
];
extra
=
json
[
'extra'
];
extra
=
json
[
'extra'
];
tag_id
=
json
[
'tag_id'
];
order_by
=
json
[
'order_by'
];
min_price
=
json
[
'min_price'
];
max_price
=
json
[
'max_price'
];
page
=
json
[
'page'
];
errorCode
=
json
[
'error_code'
];
errorCode
=
json
[
'error_code'
];
errorExtra
=
json
[
'error_extra'
];
errorExtra
=
json
[
'error_extra'
];
data
=
json
[
'data'
]
!=
null
?
new
Data
.
fromJson
(
json
[
'data'
])
:
null
;
data
=
json
[
'data'
]
!=
null
?
new
Data
.
fromJson
(
json
[
'data'
])
:
null
;
...
@@ -37,6 +50,13 @@ class PlanFeedBean {
...
@@ -37,6 +50,13 @@ class PlanFeedBean {
data
[
'error'
]
=
this
.
error
;
data
[
'error'
]
=
this
.
error
;
data
[
'message'
]
=
this
.
message
;
data
[
'message'
]
=
this
.
message
;
data
[
'extra'
]
=
this
.
extra
;
data
[
'extra'
]
=
this
.
extra
;
data
[
'tag_id'
]
=
this
.
tag_id
;
data
[
'order_by'
]
=
this
.
order_by
;
data
[
'min_price'
]
=
this
.
min_price
;
data
[
'max_price'
]
=
this
.
max_price
;
data
[
'page'
]
=
this
.
page
;
data
[
'error_code'
]
=
this
.
errorCode
;
data
[
'error_code'
]
=
this
.
errorCode
;
data
[
'error_extra'
]
=
this
.
errorExtra
;
data
[
'error_extra'
]
=
this
.
errorExtra
;
if
(
this
.
data
!=
null
)
{
if
(
this
.
data
!=
null
)
{
...
@@ -101,8 +121,10 @@ class Plans {
...
@@ -101,8 +121,10 @@ class Plans {
positiveRate
=
json
[
'positive_rate'
];
positiveRate
=
json
[
'positive_rate'
];
salesCount
=
json
[
'sales_count'
];
salesCount
=
json
[
'sales_count'
];
baseAttrs
=
json
[
'base_attrs'
].
cast
<
String
>();
baseAttrs
=
json
[
'base_attrs'
].
cast
<
String
>();
minPrice
=
json
[
'min_price'
]
is
int
?
"
${json['min_price']}
"
:
json
[
'min_price'
];
minPrice
=
maxPrice
=
json
[
'max_price'
]
is
int
?
"
${json['max_price']}
"
:
json
[
'max_price'
];
json
[
'min_price'
]
is
int
?
"
${json['min_price']}
"
:
json
[
'min_price'
];
maxPrice
=
json
[
'max_price'
]
is
int
?
"
${json['max_price']}
"
:
json
[
'max_price'
];
projectImage
=
json
[
'project_image'
];
projectImage
=
json
[
'project_image'
];
}
}
...
...
lib/commonModel/view/baseRefreshIndicator.dart
View file @
e0dd6c79
...
@@ -89,7 +89,7 @@ class BaseNestedScrollViewRefreshIndicator extends StatefulWidget {
...
@@ -89,7 +89,7 @@ class BaseNestedScrollViewRefreshIndicator extends StatefulWidget {
const
BaseNestedScrollViewRefreshIndicator
({
const
BaseNestedScrollViewRefreshIndicator
({
Key
key
,
Key
key
,
@required
this
.
child
,
@required
this
.
child
,
this
.
displacement
=
55
.0
,
this
.
displacement
=
10
.0
,
@required
this
.
onRefresh
,
@required
this
.
onRefresh
,
this
.
color
,
this
.
color
,
this
.
backgroundColor
,
this
.
backgroundColor
,
...
@@ -161,7 +161,7 @@ class NestedScrollViewRefreshIndicatorState
...
@@ -161,7 +161,7 @@ class NestedScrollViewRefreshIndicatorState
Future
<
void
>
_pendingRefreshFuture
;
Future
<
void
>
_pendingRefreshFuture
;
bool
_isIndicatorAtTop
=
false
;
bool
_isIndicatorAtTop
=
false
;
double
_dragOffset
=
0.0
;
double
_dragOffset
=
0.0
;
_RefreshIndicatorMode
_mode
=
_RefreshIndicatorMode
.
d
one
;
_RefreshIndicatorMode
_mode
=
_RefreshIndicatorMode
.
d
rag
;
static
final
Animatable
<
double
>
_threeQuarterTween
=
static
final
Animatable
<
double
>
_threeQuarterTween
=
...
@@ -451,9 +451,11 @@ class NestedScrollViewRefreshIndicatorState
...
@@ -451,9 +451,11 @@ class NestedScrollViewRefreshIndicatorState
final
bool
showIndeterminateIndicator
=
final
bool
showIndeterminateIndicator
=
_mode
==
_RefreshIndicatorMode
.
refresh
||
_mode
==
_RefreshIndicatorMode
.
refresh
||
_mode
==
_RefreshIndicatorMode
.
done
;
_mode
==
_RefreshIndicatorMode
.
done
;
return
Column
(
return
Column
(
children:
<
Widget
>[
children:
<
Widget
>[
Container
(
Container
(
color:
Color
(
0xffF7F6FA
),
child:
SizeTransition
(
child:
SizeTransition
(
axisAlignment:
_isIndicatorAtTop
?
1.0
:
-
1.0
,
axisAlignment:
_isIndicatorAtTop
?
1.0
:
-
1.0
,
sizeFactor:
_positionFactor
,
// this is what brings it down
sizeFactor:
_positionFactor
,
// this is what brings it down
...
...
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