mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

1) Merge input example into widgets example 2) Move single-file, non-fn examples into a "raw" directory 3) Rename stocks-fn and widgets-fn to stocks and widgets R=ojan@chromium.org Review URL: https://codereview.chromium.org/1005393006
25 lines
538 B
Plaintext
25 lines
538 B
Plaintext
<sky>
|
|
<style>
|
|
div {
|
|
height: 200px;
|
|
background-color: lightblue;
|
|
}
|
|
</style>
|
|
<div id="canvas" />
|
|
<script>
|
|
import 'dart:math' as math;
|
|
import 'dart:sky';
|
|
|
|
void main() {
|
|
var element = document.getElementById('canvas');
|
|
element.requestPaint((PaintingContext context) {
|
|
Paint paint = new Paint();
|
|
paint.setARGB(128, 0, 255, 0);
|
|
double radius = math.min(context.width, context.height) / 2.0;
|
|
context.drawCircle(context.width / 2.0, context.height / 2.0, radius, paint);
|
|
context.commit();
|
|
});
|
|
}
|
|
</script>
|
|
</sky>
|