ColorDescriptor constructor Null safety

const ColorDescriptor(
  1. {int? shade,
  2. Color? color,
  3. Color? contrastColor,
  4. String? name,
  5. String prefix = ''}
)

Implementation

const ColorDescriptor({
  this.shade,
  this.color,
  this.contrastColor,
  String? name,
  String prefix = '',
}) : this.name = name ?? (shade == null ? '' : '$prefix$shade');