getBoxShadow function
dynamic
getBoxShadow(
- Styles styles
)
Implementation
getBoxShadow(Styles styles) {
if (styles.boxShadow != null) {
switch (getTypeOf(styles.boxShadow)) {
case 'List<BoxShadow>':
return getListBoxShadow(styles);
case 'List<String>':
return getLisStrigBoxShadow(styles);
case 'String':
return tranStringBoxShadow(styles.boxShadow);
}
} else if (styles.elevation != null) {
Color color = Colors.black.withOpacity(0.3);
return [
BoxShadow(
offset: Offset(0, styles.elevation), color: color, blurRadius: 10)
];
} else {
return null;
}
}