getResponsiveWidget method
Implementation
@override
Widget getResponsiveWidget(BuildContext context, ScreenType screenType, double scale) {
var newMargin = (get('margin') ?? const EdgeInsets.all(4.0)) as EdgeInsets;
var newLeft = (newMargin.left == 0 ? 0 : newMargin.left * scale) as double;
var newTop = (newMargin.top == 0 ? 0 : newMargin.top * scale) as double;
var newRight = (newMargin.right == 0 ? 0 : newMargin.right * scale) as double;
var newBottom = (newMargin.bottom == 0 ? 0 : newMargin.bottom * scale) as double;
return Card(
child: child,
margin: EdgeInsets.fromLTRB(newLeft, newTop, newRight, newBottom),
key: get('key'),
color: get('color'),
shadowColor: get('shadowColor'),
elevation: get('elevation'),
clipBehavior: get('clipBehavior'),
shape: get('shape'),
borderOnForeground: get('borderOnForeground'),
semanticContainer: get('semanticContainer'),
);
}