Browse Source

Revert "Revert "Revert "update list action"""

This reverts commit ae7b40270c.
master
daivph 5 years ago
parent
commit
0f37c39a74
2 changed files with 71 additions and 71 deletions
  1. +1
    -1
      ios/Flutter/.last_build_id
  2. +70
    -70
      lib/presentation/screens/plot_detail/sc_plot_action.dart

+ 1
- 1
ios/Flutter/.last_build_id View File

@@ -1 +1 @@
440505e9ea1eee7043d2cbfeb318f6bc
48197743e3d78b3769f70bac9a76e7e0

+ 70
- 70
lib/presentation/screens/plot_detail/sc_plot_action.dart View File

@@ -193,7 +193,6 @@ class _PlotActionScreenState extends State<PlotActionScreen> {
return FlexibleSpaceBar(
centerTitle: true,
title: GridView.count(
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
crossAxisCount: 2,
childAspectRatio: 16 / 4,
@@ -268,77 +267,78 @@ class _InfinityViewState extends State<InfinityView> {
}
List<Activities> currentItems = List<Activities>.from(state.items);
return Scaffold(
resizeToAvoidBottomInset: false,
body: ListView(
children: [
Container(
alignment: Alignment.center,
decoration: BoxDecoration(
color: COLOR_CONST.WHITE_50,
border: Border(
top: BorderSide(
width: 0.5, color: COLOR_CONST.DEFAULT),
bottom: BorderSide(
width: 0.5, color: COLOR_CONST.DEFAULT)),
),
child: Container(
height: 40,
child: Row(
children: [
Expanded(
child: Text(
plot_detail_title,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 20, fontWeight: FontWeight.normal),
)),
GestureDetector(
child: (widget.parentScroll.position.pixels <
heightOfActionButton)
? Icon(Icons.arrow_upward)
: Icon(Icons.arrow_downward_outlined),
onTap: () {
if (widget.parentScroll.position.pixels <
heightOfActionButton) {
widget.parentScroll.animateTo(
heightOfActionButton,
duration: Duration(milliseconds: 350),
curve: Curves.easeOut);
} else {
widget.parentScroll.animateTo(0.0,
duration: Duration(milliseconds: 350),
curve: Curves.easeOut);
}
}),
],
resizeToAvoidBottomInset: false,
body: RefreshIndicator(
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Container(
alignment: Alignment.center,
decoration: BoxDecoration(
color: COLOR_CONST.WHITE_50,
border: Border(
top: BorderSide(
width: 0.5, color: COLOR_CONST.DEFAULT),
bottom: BorderSide(
width: 0.5, color: COLOR_CONST.DEFAULT)),
),
child: Container(
height: 40,
child: Row(
children: [
Expanded(
child: Text(
plot_detail_title,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 20, fontWeight: FontWeight.normal),
)),
GestureDetector(
child: (widget.parentScroll.position.pixels <
heightOfActionButton)
? Icon(Icons.arrow_upward)
: Icon(Icons.arrow_downward_outlined),
onTap: () {
if (widget.parentScroll.position.pixels <
heightOfActionButton) {
widget.parentScroll.animateTo(
heightOfActionButton,
duration: Duration(milliseconds: 500),
curve: Curves.easeOut);
} else {
widget.parentScroll.animateTo(0.0,
duration: Duration(milliseconds: 500),
curve: Curves.easeOut);
}
}),
],
),
),
),
),
Expanded(
child: RefreshIndicator(
child: ListView.builder(
physics: AlwaysScrollableScrollPhysics(),
itemBuilder: (BuildContext context, int index) {
return index >= state.items.length
? BottomLoader()
: ItemInfinityWidget(
currentItems: currentItems,
item: state.items[index],
currentPage: state.page,
currentReachedMax: state.hasReachedMax);
},
itemCount: state.hasReachedMax
? state.items.length
: state.items.length + 1,
controller: _scrollController,
),
onRefresh: () async {
widget.plotDetailBloc.add(OnRefresh(
cropId: widget.cropId,
cropCode: widget.cropCode));
}))
],
));
Expanded(
child: ListView.builder(
physics: AlwaysScrollableScrollPhysics(),
itemBuilder: (BuildContext context, int index) {
return index >= state.items.length
? BottomLoader()
: ItemInfinityWidget(
currentItems: currentItems,
item: state.items[index],
currentPage: state.page,
currentReachedMax: state.hasReachedMax);
},
itemCount: state.hasReachedMax
? state.items.length
: state.items.length + 1,
controller: _scrollController,
))
],
),
onRefresh: () async {
widget.plotDetailBloc.add(OnRefresh(
cropId: widget.cropId, cropCode: widget.cropCode));
}),
);
}
return Center(
child: LoadingListPage(),

Loading…
Cancel
Save