Skip to content

Instantly share code, notes, and snippets.

@creativecreatorormaybenot
Last active January 19, 2020 11:39
Show Gist options
  • Select an option

  • Save creativecreatorormaybenot/9f4e2af55b61d329de2681dcafbf37d0 to your computer and use it in GitHub Desktop.

Select an option

Save creativecreatorormaybenot/9f4e2af55b61d329de2681dcafbf37d0 to your computer and use it in GitHub Desktop.
final paint = Paint()
..color = _sunColor
..strokeWidth = radius / 124;
canvas.drawOval(Rect.fromCircle(center: Offset.zero, radius: radius / 9), paint);
for (var i = 0; i < _sunRays; i++) {
final direction = pi * 2 / _sunRays * i;
canvas.drawLine(
Offset.fromDirection(direction, radius / 8),
Offset.fromDirection(direction, radius / 6),
paint,
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment