mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
19 lines
471 B
Plaintext
19 lines
471 B
Plaintext
<script>
|
|
import "dart:math";
|
|
import 'dart:sky';
|
|
|
|
void main() {
|
|
double width = window.innerWidth.toDouble();
|
|
double height = window.innerHeight.toDouble();
|
|
|
|
PictureRecorder recorder = new PictureRecorder(width, height);
|
|
double radius = min(width, height) * 0.45;
|
|
|
|
Paint paint = new Paint()..color = const Color.fromARGB(255, 0, 255, 0);
|
|
|
|
recorder.drawCircle(width / 2, height / 2, radius, paint);
|
|
|
|
document.rootPicture = recorder.endRecording();
|
|
}
|
|
</script>
|