Skip to content

Commit

Permalink
fix: fixes new product found button overflow (#1586)
Browse files Browse the repository at this point in the history
* fix: fixes new product found button overflow

* removed comments

* reduced padding

* replaced constrained box with expanded
  • Loading branch information
bhattabhi013 authored Apr 18, 2022
1 parent a836ebf commit 093dbac
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class SmoothProductCardNotFound extends StatelessWidget {
elevation: elevation,
child: Padding(
padding: EdgeInsets.symmetric(
vertical: constraints.maxHeight * 0.25,
vertical: constraints.maxHeight * 0.10,
horizontal: constraints.maxWidth * 0.05,
),
child: Column(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:smooth_app/generic_lib/buttons/smooth_simple_button.dart';
Expand Down Expand Up @@ -32,13 +33,16 @@ class SmoothLargeButtonWithIcon extends StatelessWidget {
: Colors.blue,
),
const Spacer(),
Text(
text,
textAlign: TextAlign.center,
style: themeData.textTheme.bodyText2!.copyWith(
color: isDarkMode
? Theme.of(context).colorScheme.onPrimary
: Colors.blue,
Expanded(
flex: 10,
child: AutoSizeText(
text,
maxLines: 2,
style: themeData.textTheme.bodyText2!.copyWith(
color: isDarkMode
? Theme.of(context).colorScheme.onPrimary
: Colors.blue,
),
),
),
const Spacer(),
Expand Down

0 comments on commit 093dbac

Please sign in to comment.