props property

  1. @override
Map<String, String> get props

Converts shadow attributes to a CSS style map.

Implementation

@override
Map<String, String> get props {
  final x = (offsetX ?? 0).toPx;
  final y = (offsetY ?? 0).toPx;
  final blur = blurRadius?.toPx ?? (spreadRadius != null ? '0px' : null);
  final spread = spreadRadius?.toPx;
  final c = color?.value;

  return {
    'box-shadow': [x, y, ?blur, ?spread, ?c].join(' '),
  };
}