We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here is the code SmartRefresher( controller: controller, enablePullDown: true, enablePullUp: true, physics: const AlwaysScrollableScrollPhysics(), onRefresh: () async { await ref.read(transactionsProvider.notifier).refreshTransactions(page: page); controller.refreshCompleted(); }, footer: CustomFooter(builder: (_, mode) { switch (mode) { case LoadStatus.idle: return const SizedBox( height: 55.0, child: Center( child: Text("pull up load"), ), ); case LoadStatus.loading: return const SizedBox( height: 55.0, child: Center( child: CupertinoActivityIndicator(), ), ); case LoadStatus.failed: return const SizedBox( height: 55.0, child: Center( child: Text('Failed to load transactions'), ), ); case LoadStatus.canLoading: return const SizedBox( height: 55.0, child: Center( child: Text('Release to load more'), ), ); default: return const SizedBox( height: 55.0, child: Center( child: Text('No more data'), ), ); } }), onLoading: _onLoading, child: GroupedListView<TransactionItemEntity, DateTime>( physics: const AlwaysScrollableScrollPhysics(), elements: data.data.data, groupBy: (element) => DateTime( element.createdAt.year, element.createdAt.month, element.createdAt.day, ), groupSeparatorBuilder: (groupByValue) => Padding( padding: const EdgeInsets.only(left: 0, bottom: 15, top: 15), child: Text( ref.watch(transactionsProvider.notifier).checkDate(groupByValue), style: Theme.of(context).textTheme.bodyLarge, ), ), itemBuilder: (context, element) { return TransactionItem( entity: element, ); }, useStickyGroupSeparators: false, // optional floatingHeader: false, // optional order: GroupedListOrder.DESC, // optional ), ),
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Here is the code
SmartRefresher(
controller: controller,
enablePullDown: true,
enablePullUp: true,
physics: const AlwaysScrollableScrollPhysics(),
onRefresh: () async {
await ref.read(transactionsProvider.notifier).refreshTransactions(page: page);
controller.refreshCompleted();
},
footer: CustomFooter(builder: (_, mode) {
switch (mode) {
case LoadStatus.idle:
return const SizedBox(
height: 55.0,
child: Center(
child: Text("pull up load"),
),
);
case LoadStatus.loading:
return const SizedBox(
height: 55.0,
child: Center(
child: CupertinoActivityIndicator(),
),
);
case LoadStatus.failed:
return const SizedBox(
height: 55.0,
child: Center(
child: Text('Failed to load transactions'),
),
);
case LoadStatus.canLoading:
return const SizedBox(
height: 55.0,
child: Center(
child: Text('Release to load more'),
),
);
default:
return const SizedBox(
height: 55.0,
child: Center(
child: Text('No more data'),
),
);
}
}),
onLoading: _onLoading,
child: GroupedListView<TransactionItemEntity, DateTime>(
physics: const AlwaysScrollableScrollPhysics(),
elements: data.data.data,
groupBy: (element) => DateTime(
element.createdAt.year,
element.createdAt.month,
element.createdAt.day,
),
groupSeparatorBuilder: (groupByValue) => Padding(
padding: const EdgeInsets.only(left: 0, bottom: 15, top: 15),
child: Text(
ref.watch(transactionsProvider.notifier).checkDate(groupByValue),
style: Theme.of(context).textTheme.bodyLarge,
),
),
itemBuilder: (context, element) {
return TransactionItem(
entity: element,
);
},
useStickyGroupSeparators: false, // optional
floatingHeader: false, // optional
order: GroupedListOrder.DESC, // optional
),
),
The text was updated successfully, but these errors were encountered: