retrieveColorFromPaint function

Color retrieveColorFromPaint(
  1. PaintModel paint
)

Converts a PaintModel to a Color object.

Implementation

Color retrieveColorFromPaint(PaintModel paint) {
  assert(paint.type == PaintType.solid,
      'retrieveColorFromPaint() only accepts Paints that are PaintType.SOLID');
  return paint.toFlutterColor()!;
}