Skip to content

Commit

Permalink
More responsive to width (Cart article quantity selector)
Browse files Browse the repository at this point in the history
  • Loading branch information
IQuinteros committed Jun 23, 2021
1 parent 3bccc8b commit 3022e47
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/views/widgets/articles/cart_article_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ class __QuantitySelectorState extends State<_QuantitySelector> {
],
);

final lowSize = Column(
final lowSize = ([bool includeBackBtn = true]) => Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Expand All @@ -317,8 +317,8 @@ class __QuantitySelectorState extends State<_QuantitySelector> {
mainAxisSize: MainAxisSize.max,
children: [
Expanded(child: numberPicker, flex: 2),
SizedBox(height: 20.0,),
Expanded(child: backBtn)
includeBackBtn? SizedBox(height: 20.0,) : Container(),
includeBackBtn? Expanded(child: backBtn) : Container()
],
)
],
Expand All @@ -332,7 +332,7 @@ class __QuantitySelectorState extends State<_QuantitySelector> {
),
child: LayoutBuilder(
builder: (context, constraints){
if(constraints.maxHeight <= 250) return lowSize;
if(constraints.maxHeight <= 250) return lowSize(constraints.maxWidth > 380);
else return maxSize;
},
),
Expand Down

0 comments on commit 3022e47

Please sign in to comment.