Yin and yang: Difference between revisions

Content added Content deleted
m (→‎Flutter: minimized)
Line 2,150: Line 2,150:
[[File:YinYang-flutter.png]]<br>
[[File:YinYang-flutter.png]]<br>
[https://dartpad.dev/?id=c54bafac1d8f46c07db626dca64e13e4 Watch/play online DartPad]
[https://dartpad.dev/?id=c54bafac1d8f46c07db626dca64e13e4 Watch/play online DartPad]
<syntaxhighlight lang="dart">import 'dart:math';
<syntaxhighlight lang="dart">import 'dart:math' show pi;
import 'package:flutter/material.dart';
import 'package:flutter/material.dart';


Line 2,165: Line 2,165:
}
}


void main() => runApp(const MainApp());
void main() => runApp(CustomPaint(painter: YinYangPainter()));

class MainApp extends StatelessWidget {
const MainApp({super.key});
@override
Widget build(BuildContext context) => CustomPaint(painter: YinYangPainter());
}


class YinYangPainter extends CustomPainter {
class YinYangPainter extends CustomPainter {