Skip to content

Commit

Permalink
fix: add padding at the bottom of 'Select Token' list (espresso-cash#391
Browse files Browse the repository at this point in the history
)
  • Loading branch information
moksh-mahajan authored Aug 27, 2022
1 parent 110381d commit 526301c
Showing 1 changed file with 18 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:cryptoplease/app/components/token_icon.dart';
import 'package:cryptoplease/app/screens/authenticated/components/navigation_bar/navigation_bar.dart';
import 'package:cryptoplease/core/amount.dart';
import 'package:cryptoplease/core/balances/presentation/watch_balance.dart';
import 'package:cryptoplease/core/presentation/format_amount.dart';
Expand Down Expand Up @@ -148,20 +149,23 @@ class _TokenList extends StatelessWidget {
final bool shouldDisplayAmount;

@override
Widget build(BuildContext context) => SliverList(
delegate: SliverChildBuilderDelegate(
(context, index) {
final token = tokens.elementAt(index);

return _SelectableBalanceItem(
token: token,
onSelect: onTokenSelected,
balance: shouldDisplayAmount
? context.watchUserCryptoBalance(token)
: null,
);
},
childCount: tokens.length,
Widget build(BuildContext context) => SliverPadding(
padding: const EdgeInsets.only(bottom: cpNavigationBarheight),
sliver: SliverList(
delegate: SliverChildBuilderDelegate(
(context, index) {
final token = tokens.elementAt(index);

return _SelectableBalanceItem(
token: token,
onSelect: onTokenSelected,
balance: shouldDisplayAmount
? context.watchUserCryptoBalance(token)
: null,
);
},
childCount: tokens.length,
),
),
);
}
Expand Down

0 comments on commit 526301c

Please sign in to comment.