Yin and yang: Difference between revisions

Content added Content deleted
(→‎{{header|Dart}}: added Flutter (without CustomPaint))
Line 2,193: Line 2,193:
const colors = [Colors.black, Colors.white];
const colors = [Colors.black, Colors.white];


Container cR(int iColor, double radius, {Widget? child, Clip clip = Clip.none}) => Container(
Container cR(int iClr, double r, {Widget? child, Clip clip = Clip.none}) => Container(
width: radius * 2,
width: r * 2,
height: radius * 2,
height: r * 2,
decoration: ShapeDecoration(color: colors[iColor], shape: const CircleBorder()),
decoration: ShapeDecoration(color: colors[iClr], shape: const CircleBorder()),
clipBehavior: clip,
clipBehavior: clip,
child: Center(child: child),
child: Center(child: child));
);


Container yinYang(double r, [double th = 1.0]) => cR(0, r + th,
Container yinYang(double r, [double th = 1.0]) => cR(0, r + th,