mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

1) Merge input example into widgets example 2) Move single-file, non-fn examples into a "raw" directory 3) Rename stocks-fn and widgets-fn to stocks and widgets R=ojan@chromium.org Review URL: https://codereview.chromium.org/1005393006
42 lines
1.2 KiB
Dart
42 lines
1.2 KiB
Dart
// 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.
|
|
|
|
import 'package:sky/framework/fn.dart';
|
|
import 'package:sky/framework/components/button.dart';
|
|
import 'package:sky/framework/components/input.dart';
|
|
import 'package:sky/framework/components/popup_menu.dart';
|
|
|
|
class WidgetsApp extends App {
|
|
static final Style _menuStyle = new Style('''
|
|
position: absolute;
|
|
top: 200px;
|
|
left: 200px;''');
|
|
|
|
Node build() {
|
|
return new Container(
|
|
children: [
|
|
new Button(key: 'Go', content: new Text('Go'), level: 1),
|
|
new Button(key: 'Back', content: new Text('Back'), level: 3),
|
|
new Input(),
|
|
new Container(
|
|
style: _menuStyle,
|
|
children: [
|
|
new PopupMenu(
|
|
items: [
|
|
[new Text('People & options')],
|
|
[new Text('New group conversation')],
|
|
[new Text('Turn history off')],
|
|
[new Text('Archive')],
|
|
[new Text('Delete')],
|
|
[new Text('Un-merge SMS')],
|
|
[new Text('Help & feeback')],
|
|
],
|
|
level: 4),
|
|
]
|
|
)
|
|
]
|
|
);
|
|
}
|
|
}
|