mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Position the popup menu in stocks2 correctly
This CL pulled an implementation of position: absolute in RenderStackContainer. R=eseidel@chromium.org, ianh@google.com Review URL: https://codereview.chromium.org/1166363002.
This commit is contained in:
parent
e158527d6d
commit
2bc982d676
@ -8,11 +8,6 @@ import 'package:sky/framework/components2/checkbox.dart';
|
|||||||
import 'package:sky/framework/theme/view_configuration.dart';
|
import 'package:sky/framework/theme/view_configuration.dart';
|
||||||
|
|
||||||
class StockMenu extends Component {
|
class StockMenu extends Component {
|
||||||
// static final Style _style = new Style('''
|
|
||||||
// position: absolute;
|
|
||||||
// right: 8px;
|
|
||||||
// top: ${8 + kStatusBarHeight}px;''');
|
|
||||||
|
|
||||||
PopupMenuController controller;
|
PopupMenuController controller;
|
||||||
|
|
||||||
StockMenu({Object key, this.controller, this.autorefresh: false, this.onAutorefreshChanged}) : super(key: key);
|
StockMenu({Object key, this.controller, this.autorefresh: false, this.onAutorefreshChanged}) : super(key: key);
|
||||||
@ -26,14 +21,18 @@ class StockMenu extends Component {
|
|||||||
onChanged: this.onAutorefreshChanged
|
onChanged: this.onAutorefreshChanged
|
||||||
);
|
);
|
||||||
|
|
||||||
return new PopupMenu(
|
return new StackPositionedChild(
|
||||||
controller: controller,
|
new PopupMenu(
|
||||||
items: [
|
controller: controller,
|
||||||
[new Text('Add stock')],
|
items: [
|
||||||
[new Text('Remove stock')],
|
[new Text('Add stock')],
|
||||||
// [new FlexExpandingChild(new Text('Autorefresh')), checkbox],
|
[new Text('Remove stock')],
|
||||||
],
|
// [new FlexExpandingChild(new Text('Autorefresh')), checkbox],
|
||||||
level: 4
|
],
|
||||||
|
level: 4
|
||||||
|
),
|
||||||
|
right: 8.0,
|
||||||
|
top: 8.0 + kStatusBarHeight
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user