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

Unified Diff: sky/sdk/example/stocks/lib/stock_menu.dart

Issue 1234063003: Remove PopupMenuController (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase Created 5 years, 5 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 | « sky/sdk/example/stocks/lib/stock_home.dart ('k') | sky/sdk/lib/widgets/popup_menu.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/example/stocks/lib/stock_menu.dart
diff --git a/sky/sdk/example/stocks/lib/stock_menu.dart b/sky/sdk/example/stocks/lib/stock_menu.dart
index 9fc5721f5d5308138a4e24ef13a142ae0c5f8e6f..c122695666b8ac2bd2ea8b9286452c9aaf0067aa 100644
--- a/sky/sdk/example/stocks/lib/stock_menu.dart
+++ b/sky/sdk/example/stocks/lib/stock_menu.dart
@@ -2,21 +2,25 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+import 'dart:sky' as sky;
+
import 'package:sky/widgets/checkbox.dart';
import 'package:sky/widgets/popup_menu.dart';
import 'package:sky/widgets/basic.dart';
-import 'package:sky/theme/view_configuration.dart';
-class StockMenu extends Component {
+export 'package:sky/widgets/popup_menu.dart' show PopupMenuStatus;
+class StockMenu extends Component {
StockMenu({
String key,
- this.controller,
+ this.showing,
+ this.onStatusChanged,
this.autorefresh: false,
this.onAutorefreshChanged
}) : super(key: key);
- final PopupMenuController controller;
+ bool showing;
+ PopupMenuStatusChangedCallback onStatusChanged;
final bool autorefresh;
final ValueChanged onAutorefreshChanged;
@@ -28,16 +32,17 @@ class StockMenu extends Component {
return new Positioned(
child: new PopupMenu(
- controller: controller,
items: [
new Text('Add stock'),
new Text('Remove stock'),
new Flex([new Flexible(child: new Text('Autorefresh')), checkbox]),
],
- level: 4
+ level: 4,
+ showing: showing,
+ onStatusChanged: onStatusChanged
),
- right: 0.0,
- top: 0.0 + kStatusBarHeight
+ right: sky.view.paddingRight,
+ top: sky.view.paddingTop
);
}
}
« no previous file with comments | « sky/sdk/example/stocks/lib/stock_home.dart ('k') | sky/sdk/lib/widgets/popup_menu.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698