Skip to content

Commit

Permalink
docs(picker): add picker example
Browse files Browse the repository at this point in the history
  • Loading branch information
2534290808 committed Mar 8, 2019
1 parent 34461e9 commit 5ec85b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ To use this plugin, add `flutter_weui` as a [dependency in your pubspec.yaml fil
- [`LoadMore`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/load_more_example.dart)
- [`MediaBox`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/media_box_example.dart)
- [`Panel`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/panel_example.dart)
- [`Picker`]()
- [`Picker`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/picker_example.dart)
- [`Slider`]()
- [`Switch`]()
- [`Toast`]()
Expand Down
2 changes: 1 addition & 1 deletion README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
- [`LoadMore`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/load_more_example.dart)
- [`MediaBox`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/media_box_example.dart)
- [`Panel`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/panel_example.dart)
- [`Picker`]()
- [`Picker`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/picker_example.dart)
- [`Slider`]()
- [`Switch`]()
- [`Toast`]()
Expand Down
17 changes: 4 additions & 13 deletions example/lib/picker_example.dart
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
import 'package:flutter/material.dart';
import 'package:flutter_weui/flutter_weui.dart';
class DialogExample extends StatelessWidget {
class PickerExample extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("Dialog"),),
appBar: AppBar(title: Text("Picker"),),
body: Center(
child: Column(
children: <Widget>[
FlatButton(onPressed: (){
WDialog.show(context,title: "Title",content: "Context",actions: [
DialogActions(text: "取消"),
DialogActions(text: "确定")
]);
}, child: Text("Dialog_Android")),
FlatButton(onPressed: (){
WDialog.show(context,title: "Title",content: "Context",actions: [
DialogActions(text: "取消"),
DialogActions(text: "确定")
],platform: TargetPlatform.iOS);
}, child: Text("Dialog_Ios"))
Picker.show(context,data: ["item1","item2","item2","item4"]);
}, child: Text("Picker"))
],
),
),
Expand Down

0 comments on commit 5ec85b5

Please sign in to comment.