Browse Source

update scroll behavior action list

master
daivph 5 years ago
parent
commit
dd4a6c7b5f
1 changed files with 35 additions and 35 deletions
  1. +35
    -35
      lib/presentation/screens/plot_detail/sc_plot_action.dart

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

@@ -133,10 +133,11 @@ class _PlotActionScreenState extends State<PlotActionScreen> {
headerSliverBuilder: (context, innerBoxScrolled) => [
SliverAppBar(
floating: false,
pinned: true,
pinned: false,
backgroundColor: Colors.white,
leading: Container(),
title: _showTitle(context) ? Text(plot_detail_title) : null,
title: null,
// title: _showTitle(context) ? Text(plot_detail_title) : null,
//Height flexibleSpace : WidthScreen /2 * 6/16 * 6(row) + 8(space) *4
expandedHeight: MediaQuery.of(context).size.width * 1.125 + 32,
flexibleSpace: _showTitle(context)
@@ -154,28 +155,6 @@ class _PlotActionScreenState extends State<PlotActionScreen> {
).toList()),
),
),
SliverList(
delegate: SliverChildListDelegate([
_showTitle(context)
? Container(
height: 40,
)
: Container(
height: 40,
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: Text(
plot_detail_title,
style:
TextStyle(fontSize: 20, fontWeight: FontWeight.normal),
))
]))
],
body: BlocProvider(
create: (context) => PlotDetailBloc(repository: Repository())
@@ -239,17 +218,38 @@ class _InfinityViewState extends State<InfinityView> {
return Center(child: Text(label_list_empty));
}
return RefreshIndicator(
child: ListView.builder(
physics: AlwaysScrollableScrollPhysics(),
itemBuilder: (BuildContext context, int index) {
return index >= state.items.length
? BottomLoader()
: ItemInfinityWidget(item: state.items[index]);
},
itemCount: state.hasReachedMax
? state.items.length
: state.items.length + 1,
controller: _scrollController,
child: Column(
children: [
Container(
height: 40,
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: Text(
plot_detail_title,
style: TextStyle(
fontSize: 20, fontWeight: FontWeight.normal),
)),
Expanded(
child: ListView.builder(
physics: AlwaysScrollableScrollPhysics(),
itemBuilder: (BuildContext context, int index) {
return index >= state.items.length
? BottomLoader()
: ItemInfinityWidget(item: state.items[index]);
},
itemCount: state.hasReachedMax
? state.items.length
: state.items.length + 1,
controller: _scrollController,
))
],
),
onRefresh: () async {
_plotDetailBloc.add(OnRefresh(

Loading…
Cancel
Save