toRgbaString function

String? toRgbaString(
  1. Color? color
)

Implementation

String? toRgbaString(Color? color) {
  return color != null
      ? '#${color.red.toRadixString(16).padLeft(2, '0')}${color.green.toRadixString(16).padLeft(2, '0')}${color.blue.toRadixString(16).padLeft(2, '0')}${color.alpha.toRadixString(16).padLeft(2, '0')}'
      : null;
}