add hover color property to custom containers

This commit is contained in:
julian 2023-04-03 20:19:18 -06:00
parent 728909399c
commit 991ade962c
2 changed files with 6 additions and 0 deletions

View file

@ -12,6 +12,7 @@ class RoundedContainer extends StatelessWidget {
this.width, this.width,
this.height, this.height,
this.borderColor, this.borderColor,
this.hoverColor,
this.boxShadow, this.boxShadow,
this.onPressed, this.onPressed,
}) : super(key: key); }) : super(key: key);
@ -23,6 +24,7 @@ class RoundedContainer extends StatelessWidget {
final double? width; final double? width;
final double? height; final double? height;
final Color? borderColor; final Color? borderColor;
final Color? hoverColor;
final List<BoxShadow>? boxShadow; final List<BoxShadow>? boxShadow;
final VoidCallback? onPressed; final VoidCallback? onPressed;
@ -32,6 +34,7 @@ class RoundedContainer extends StatelessWidget {
condition: onPressed != null, condition: onPressed != null,
builder: (child) => RawMaterialButton( builder: (child) => RawMaterialButton(
fillColor: color, fillColor: color,
hoverColor: hoverColor,
elevation: 0, elevation: 0,
highlightElevation: 0, highlightElevation: 0,
disabledElevation: 0, disabledElevation: 0,

View file

@ -11,6 +11,7 @@ class RoundedWhiteContainer extends StatelessWidget {
this.width, this.width,
this.height, this.height,
this.borderColor, this.borderColor,
this.hoverColor,
this.boxShadow, this.boxShadow,
this.onPressed, this.onPressed,
}) : super(key: key); }) : super(key: key);
@ -21,6 +22,7 @@ class RoundedWhiteContainer extends StatelessWidget {
final double? width; final double? width;
final double? height; final double? height;
final Color? borderColor; final Color? borderColor;
final Color? hoverColor;
final List<BoxShadow>? boxShadow; final List<BoxShadow>? boxShadow;
final VoidCallback? onPressed; final VoidCallback? onPressed;
@ -34,6 +36,7 @@ class RoundedWhiteContainer extends StatelessWidget {
height: height, height: height,
borderColor: borderColor, borderColor: borderColor,
boxShadow: boxShadow, boxShadow: boxShadow,
hoverColor: hoverColor,
onPressed: onPressed, onPressed: onPressed,
child: child, child: child,
); );