diff --git a/lib/src/flutter/shapes.dart b/lib/src/flutter/shapes.dart index 918b70e..aa6497a 100644 --- a/lib/src/flutter/shapes.dart +++ b/lib/src/flutter/shapes.dart @@ -379,7 +379,7 @@ class VxContinuousRectangle extends StatelessWidget this.gradient, this.backgroundImage, this.shadows, - }) { + }) : assert(!(backgroundColor != null && gradient != null)) { setChildForShadow(this); } @@ -420,7 +420,7 @@ class VxContinuousRectangle extends StatelessWidget assert(debugCheckHasMediaQuery(context)); final ThemeData theme = Theme.of(context); Color? effectiveBackgroundColor = backgroundColor; - if (effectiveBackgroundColor == null) { + if (effectiveBackgroundColor == null && gradient == null) { switch (theme.brightness) { case Brightness.dark: effectiveBackgroundColor = theme.primaryColorLight;