fix: continued product view

This commit is contained in:
2024-02-06 21:45:25 +07:00
parent 96c676ac4c
commit 81231505b1
4 changed files with 81 additions and 21 deletions

View File

@@ -9,13 +9,14 @@ class ButtonView extends StatelessWidget {
final double? height, width, widthSuffix, widthPrefix, marginVertical;
final EdgeInsetsGeometry? contentPadding;
final bool isSecondaryColor, isOutlined, heightWrapContent, disabled;
final Color? backgroundColor, textColor;
final Color? backgroundColor, textColor, borderColor;
final MainAxisAlignment? mainAxisAlignmentContent;
// final _widthBtn = SizeConfig.screenWidth / 1.5;
final _widthBtn = SizeConfig.width * .9;
// final _heightBtn = SizeConfig.screenHeight / 12;
final _heightBtn = SizeConfig.height * .07;
final FontWeight textWeight;
final TextAlign textAlign;
final double? textSize, sizeBorderRadius;
final int? maxLines;
@@ -31,9 +32,11 @@ class ButtonView extends StatelessWidget {
this.width,
this.contentPadding,
this.backgroundColor,
this.borderColor,
this.textColor,
this.textWeight = FontWeight.bold,
this.textSize,
this.textAlign = TextAlign.center,
this.mainAxisAlignmentContent,
this.disabled = false,
this.heightWrapContent = false,
@@ -74,11 +77,11 @@ class ButtonView extends StatelessWidget {
borderRadius: BorderRadius.circular(sizeBorderRadius ?? 48),
side: isOutlined
? BorderSide(
color: disabled
color: borderColor ?? (disabled
? color.surface
: isSecondaryColor
? ColorPalette.greyBorder
: ColorPalette.primary,
: ColorPalette.primary),
)
: BorderSide.none,
),
@@ -100,7 +103,7 @@ class ButtonView extends StatelessWidget {
Flexible(
child: Text(
name,
textAlign: TextAlign.center,
textAlign: textAlign,
maxLines: maxLines,
overflow: TextOverflow.ellipsis,
style: TextStyle(

View File

@@ -83,6 +83,7 @@ class ColorPalette {
static const Color slate800 = Color(0xFF1E293B);
static const Color purple100 = Color(0xFFEDE9FE);
static const Color purple500 = Color(0xFF8B5CF6);
static const Color orange50 = Color(0xFFFFF7ED);
static const Color orange100 = Color(0xFFFFEDD5);
static const Color orange500 = Color(0xFFF97316);
static const Color cyan100 = Color(0xFFCFFAFE);