Skip to content

Commit

Permalink
Merge pull request #1292 from get10101/fix-pulldown-refresh
Browse files Browse the repository at this point in the history
Fix pull-down refresh
  • Loading branch information
Restioson authored Sep 14, 2023
2 parents e9827cd + 1321b25 commit bc4f043
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions mobile/lib/features/wallet/wallet_screen.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
import 'package:get_10101/common/amount_text.dart';
Expand Down Expand Up @@ -224,20 +225,29 @@ class _WalletScreenState extends State<WalletScreen> {
height: 5,
),
Expanded(
child: ListView.builder(
shrinkWrap: true,
physics: const ClampingScrollPhysics(),
itemCount: walletChangeNotifier.walletInfo.history.length + 1,
itemBuilder: (BuildContext context, int index) {
// Spacer at the bottom of the list
if (index == walletChangeNotifier.walletInfo.history.length) {
return listBottomScrollSpace;
}
child: ScrollConfiguration(
behavior: ScrollConfiguration.of(context).copyWith(
dragDevices: {
PointerDeviceKind.touch,
PointerDeviceKind.mouse,
},
),
child: ListView.builder(
shrinkWrap: true,
physics: const AlwaysScrollableScrollPhysics(),
itemCount: walletChangeNotifier.walletInfo.history.length + 1,
itemBuilder: (BuildContext context, int index) {
// Spacer at the bottom of the list
if (index == walletChangeNotifier.walletInfo.history.length) {
return listBottomScrollSpace;
}

WalletHistoryItemData itemData = walletChangeNotifier.walletInfo.history[index];
WalletHistoryItemData itemData =
walletChangeNotifier.walletInfo.history[index];

return itemData.toWidget();
},
return itemData.toWidget();
},
),
),
),
],
Expand Down

0 comments on commit bc4f043

Please sign in to comment.