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

View file

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