Rename AppView to SkyBinding.
Move app/view.dart to rendering/sky_binding.dart since it's part of the RenderObject API, really (it knows about RenderView intimately). The tests pass. I didn't check every last example. R=abarth@chromium.org Review URL: https://codereview.chromium.org/1183913006.
This commit is contained in:
@@ -6,7 +6,7 @@ import 'package:sky/widgets/basic.dart';
|
||||
|
||||
class HelloWorldApp extends App {
|
||||
Widget build() {
|
||||
return new Text('Hello, fn2!');
|
||||
return new Text('Hello, widgets!');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -136,8 +136,8 @@ class SectorApp extends App {
|
||||
|
||||
void main() {
|
||||
runApp(new SectorApp());
|
||||
WidgetAppView.appView.onFrame = () {
|
||||
WidgetSkyBinding.skyBinding.onFrame = () {
|
||||
// uncomment this for debugging:
|
||||
// WidgetAppView.appView.debugDumpRenderTree();
|
||||
// WidgetSkyBinding.skyBinding.debugDumpRenderTree();
|
||||
};
|
||||
}
|
||||
|
||||
@@ -75,12 +75,12 @@ void rotate(double timeStamp) {
|
||||
|
||||
void main() {
|
||||
// Because we're going to use Widgets, we want to initialise its
|
||||
// AppView, not use the default one. We don't really need to do
|
||||
// SkyBinding, not use the default one. We don't really need to do
|
||||
// this, because RenderBoxToWidgetAdapter does it for us, but
|
||||
// it's good practice in case we happen to not have a
|
||||
// RenderBoxToWidgetAdapter in our tree at startup, or in case we
|
||||
// want a renderViewOverride.
|
||||
WidgetAppView.initWidgetAppView();
|
||||
WidgetSkyBinding.initWidgetSkyBinding();
|
||||
|
||||
RenderFlex flexRoot = new RenderFlex(direction: FlexDirection.vertical);
|
||||
|
||||
@@ -94,6 +94,6 @@ void main() {
|
||||
transformBox = new RenderTransform(child: flexRoot, transform: new Matrix4.identity());
|
||||
RenderPadding root = new RenderPadding(padding: new EdgeDims.all(20.0), child: transformBox);
|
||||
|
||||
WidgetAppView.appView.root = root;
|
||||
WidgetSkyBinding.skyBinding.root = root;
|
||||
addPersistentFrameCallback(rotate);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user