Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: sky/examples/fn2/container.dart

Issue 1160013004: Implement RenderImage and Image for Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase again Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sky/examples/lib/solid_color_box.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/fn2/container.dart
diff --git a/sky/examples/fn2/container.dart b/sky/examples/fn2/container.dart
index 961650d3d9b42a6f622f1e6ee38a5ca7e84cf9b5..0be6f50cf889814ba67353f64e5268d5541e6c2e 100644
--- a/sky/examples/fn2/container.dart
+++ b/sky/examples/fn2/container.dart
@@ -5,6 +5,17 @@
import 'dart:sky' as sky;
import 'package:sky/framework/fn2.dart';
import 'package:sky/framework/rendering/box.dart';
+import '../lib/solid_color_box.dart';
+
+class Rectangle extends RenderNodeWrapper {
+ RenderSolidColorBox root;
+ RenderSolidColorBox createNode() =>
+ new RenderSolidColorBox(color, desiredSize: new sky.Size(40.0, 130.0));
+
+ final int color;
+
+ Rectangle(this.color, { Object key }) : super(key: key);
+}
class ContainerApp extends App {
UINode build() {
@@ -20,7 +31,11 @@ class ContainerApp extends App {
new Container(
decoration: new BoxDecoration(backgroundColor: const sky.Color(0xFFFFFF00)),
desiredSize: new sky.Size(double.INFINITY, 20.0)
- )
+ ),
+ new Image(src: "https://www.dartlang.org/logos/dart-logo.png",
+ size: new sky.Size(300.0, 300.0),
+ key: 1
+ ),
])),
]),
onPointerDown: _handlePointerDown);
« no previous file with comments | « no previous file | sky/examples/lib/solid_color_box.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698