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

Unified Diff: pkg/immi_samples/lib/drawer.dart

Issue 2035023003: Remove service-compiler related code. (Closed) Base URL: git@github.com:dartino/sdk.git@master
Patch Set: Created 4 years, 6 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
Index: pkg/immi_samples/lib/drawer.dart
diff --git a/pkg/immi_samples/lib/drawer.dart b/pkg/immi_samples/lib/drawer.dart
deleted file mode 100644
index 733c1cb47b972c67b335ceec4eea8b5896adc60c..0000000000000000000000000000000000000000
--- a/pkg/immi_samples/lib/drawer.dart
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:immi/dart/immi.dart';
-
-// Export generated code for nodes in drawer.immi
-import 'package:immi/dart/drawer.dart';
-export 'package:immi/dart/drawer.dart';
-
-class Drawer {
- var left;
- var _center;
- var right;
-
- bool _leftVisible = false;
- bool _rightVisible = false;
-
- Drawer(this._center, {left, right}) {
- this.left = left;
- this.right = right;
- }
-
- get center => _center;
-
- set center(presenter) {
- _center = presenter;
- _leftVisible = false;
- _rightVisible = false;
- }
-
- DrawerNode present(Node previous) {
- Node previousLeft = new EmptyPaneNode();
- Node previousCenter = null;
- Node previousRight = new EmptyPaneNode();
- if (previous is DrawerNode) {
- previousLeft = previous.left;
- previousCenter = previous.center;
- previousRight = previous.right;
- }
- return new DrawerNode(
- left: _presentPane(left, _leftVisible, previousLeft, 'left'),
- center: center.present(previousCenter),
- right: _presentPane(right, _rightVisible, previousRight, 'right'),
- leftVisible: _leftVisible,
- rightVisible: _rightVisible,
- toggleLeft: _toggleLeft,
- toggleRight: _toggleRight);
- }
-
- Node _presentPane(presenter, bool visible, Node previous, String pane) {
- if (presenter == null) return new EmptyPaneNode();
- if (!visible) return previous;
- return presenter.present(previous);
- }
-
- void _toggleLeft() {
- _leftVisible = !_leftVisible;
- if (_leftVisible && _rightVisible) _rightVisible = false;
- }
-
- void _toggleRight() {
- _rightVisible = !_rightVisible;
- if (_leftVisible && _rightVisible) _leftVisible = false;
- }
-}

Powered by Google App Engine
This is Rietveld 408576698