Remove the redundant drop-down button demo (#4380)

Turns out we have the same demo in the "Buttons" section now.
We don't need both.
This commit is contained in:
Ian Hickson 2016-06-04 09:31:32 -07:00
parent 29af5c0317
commit ed48c70aa0
4 changed files with 0 additions and 45 deletions

View file

@ -11,7 +11,6 @@ export 'colors_demo.dart';
export 'data_table_demo.dart';
export 'date_picker_demo.dart';
export 'dialog_demo.dart';
export 'drop_down_demo.dart';
export 'grid_list_demo.dart';
export 'icons_demo.dart';
export 'leave_behind_demo.dart';

View file

@ -1,42 +0,0 @@
// 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:flutter/material.dart';
class DropDownDemo extends StatefulWidget {
static const String routeName = '/dropdown';
@override
_DropDownDemoState createState() => new _DropDownDemoState();
}
class _DropDownDemoState extends State<DropDownDemo> {
String _value = "Free";
List<DropDownMenuItem<String>> buildItems() {
return <String>["One", "Two", "Free", "Four"].map((String value) {
return new DropDownMenuItem<String>(value: value, child: new Text(value));
})
.toList();
}
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(title: new Text('Drop-down button')),
body: new Center(
child: new DropDownButton<String>(
items: buildItems(),
value: _value,
onChanged: (String newValue) {
setState(() {
if (newValue != null)
_value = newValue;
});
}
)
)
);
}
}

View file

@ -20,7 +20,6 @@ final Map<String, WidgetBuilder> kRoutes = <String, WidgetBuilder>{
DatePickerDemo.routeName: (BuildContext context) => new DatePickerDemo(),
DataTableDemo.routeName: (BuildContext context) => new DataTableDemo(),
DialogDemo.routeName: (BuildContext context) => new DialogDemo(),
DropDownDemo.routeName: (BuildContext context) => new DropDownDemo(),
TwoLevelListDemo.routeName: (BuildContext context) => new TwoLevelListDemo(),
TabsFabDemo.routeName: (BuildContext context) => new TabsFabDemo(),
GridListDemo.routeName: (BuildContext context) => new GridListDemo(),

View file

@ -87,7 +87,6 @@ class GalleryHomeState extends State<GalleryHome> {
new GalleryItem(title: 'Date picker', routeName: DatePickerDemo.routeName),
new GalleryItem(title: 'Data tables', routeName: DataTableDemo.routeName),
new GalleryItem(title: 'Dialog', routeName: DialogDemo.routeName),
new GalleryItem(title: 'Drop-down button', routeName: DropDownDemo.routeName),
new GalleryItem(title: 'Expand/collapse list control', routeName: TwoLevelListDemo.routeName),
new GalleryItem(title: 'Floating action button', routeName: TabsFabDemo.routeName),
new GalleryItem(title: 'Grid', routeName: GridListDemo.routeName),