Commit e56ca8a8 authored by 林生雨's avatar 林生雨

w

parent bc18aa2b
...@@ -50,10 +50,11 @@ class PlanModel extends BaseModel { ...@@ -50,10 +50,11 @@ class PlanModel extends BaseModel {
int page = 1; int page = 1;
int sortPos = 0; int sortPos = 0;
void init({VoidCallback call}) { void init({VoidCallback call, bool needCache = false}) {
print("LSY PLANMODEL IIIIIINT "); print("LSY PLANMODEL IIIIIINT ");
if (CacheManager.getInstance().get(MEMORY_CACHE).get(PLAN_MODEL_BUFFER) != if (CacheManager.getInstance().get(MEMORY_CACHE).get(PLAN_MODEL_BUFFER) !=
null) { null &&
needCache) {
var event = PlanBean.fromJson(json.decode( var event = PlanBean.fromJson(json.decode(
CacheManager.getInstance().get(MEMORY_CACHE).get(PLAN_MODEL_BUFFER))); CacheManager.getInstance().get(MEMORY_CACHE).get(PLAN_MODEL_BUFFER)));
projectData = event.data.tags; projectData = event.data.tags;
......
...@@ -64,7 +64,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin { ...@@ -64,7 +64,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
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(); _model.init(needCache: true);
super.initState(); super.initState();
planBarView = planBarView =
PlanBarView(_model.managerLive, clickIndex, hideAllMenuListener); PlanBarView(_model.managerLive, clickIndex, hideAllMenuListener);
...@@ -378,10 +378,11 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin { ...@@ -378,10 +378,11 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
() { () {
_model.refreshFeed(true, controller: refreshController); _model.refreshFeed(true, controller: refreshController);
}, },
Container( null,
width: 0, null,
height: 0, customScrollView: CustomScrollView(
), physics: ClampingScrollPhysics(),
slivers: <Widget>[
SliverList( SliverList(
delegate: SliverChildBuilderDelegate( delegate: SliverChildBuilderDelegate(
(BuildContext context, int index) { (BuildContext context, int index) {
...@@ -396,6 +397,8 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin { ...@@ -396,6 +397,8 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
}, },
childCount: _model.feedDatas.length, childCount: _model.feedDatas.length,
), ),
)
],
), ),
onLoading: () { onLoading: () {
_model.loadMore(); _model.loadMore();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment