PurchaseScreen: Add more spacing between the cards

This commit is contained in:
Vishesh Handa
2020-08-20 09:47:57 +02:00
parent 518ae9d4ef
commit bd19d8c9eb

View File

@ -33,6 +33,7 @@ class PurchaseScreen extends StatelessWidget {
PurchaseCards( PurchaseCards(
children: [ children: [
const MonthlyRentalWidget(), const MonthlyRentalWidget(),
const SizedBox(width: 16.0),
const YearlyPurchaseWidget(), const YearlyPurchaseWidget(),
], ],
), ),
@ -173,23 +174,18 @@ class PurchaseCard extends StatelessWidget {
} }
} }
class PurchaseCards extends StatefulWidget { class PurchaseCards extends StatelessWidget {
final List<Widget> children; final List<Widget> children;
PurchaseCards({@required this.children}); PurchaseCards({@required this.children});
@override
_PurchaseCardsState createState() => _PurchaseCardsState();
}
class _PurchaseCardsState extends State<PurchaseCards> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return _ScrollViewWithoutAnim( return _ScrollViewWithoutAnim(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
child: IntrinsicHeight( child: IntrinsicHeight(
child: Row( child: Row(
children: widget.children, children: children,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
), ),
), ),