popup_menu_item.dart 693 字节
Newer Older
1 2 3 4
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

5
import 'wrappers.dart';
6 7 8
import 'ink_well.dart';

class PopupMenuItem extends Component {
H
Hixie 已提交
9 10
  PopupMenuItem({ Object key, this.children, this.opacity}) : super(key: key);

11 12
  final List<UINode> children;
  final double opacity;
13 14

  UINode build() {
15 16 17 18 19 20 21 22 23
    return new Opacity(
      opacity: opacity,
      child: new InkWell(
        children: [new Container(
          constraints: const BoxConstraints(minWidth: 112.0),
          padding: const EdgeDims.all(16.0),
          child: new Flex(children)
        )]
      )
24
    );
25 26
  }
}