Skip to content

Commit 5ec85b5

Browse files
committed
docs(picker): add picker example
1 parent 34461e9 commit 5ec85b5

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ To use this plugin, add `flutter_weui` as a [dependency in your pubspec.yaml fil
2121
- [`LoadMore`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/load_more_example.dart)
2222
- [`MediaBox`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/media_box_example.dart)
2323
- [`Panel`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/panel_example.dart)
24-
- [`Picker`]()
24+
- [`Picker`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/picker_example.dart)
2525
- [`Slider`]()
2626
- [`Switch`]()
2727
- [`Toast`]()

README_zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
- [`LoadMore`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/load_more_example.dart)
2222
- [`MediaBox`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/media_box_example.dart)
2323
- [`Panel`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/panel_example.dart)
24-
- [`Picker`]()
24+
- [`Picker`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/picker_example.dart)
2525
- [`Slider`]()
2626
- [`Switch`]()
2727
- [`Toast`]()

example/lib/picker_example.dart

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,16 @@
11
import 'package:flutter/material.dart';
22
import 'package:flutter_weui/flutter_weui.dart';
3-
class DialogExample extends StatelessWidget {
3+
class PickerExample extends StatelessWidget {
44
@override
55
Widget build(BuildContext context) {
66
return Scaffold(
7-
appBar: AppBar(title: Text("Dialog"),),
7+
appBar: AppBar(title: Text("Picker"),),
88
body: Center(
99
child: Column(
1010
children: <Widget>[
1111
FlatButton(onPressed: (){
12-
WDialog.show(context,title: "Title",content: "Context",actions: [
13-
DialogActions(text: "取消"),
14-
DialogActions(text: "确定")
15-
]);
16-
}, child: Text("Dialog_Android")),
17-
FlatButton(onPressed: (){
18-
WDialog.show(context,title: "Title",content: "Context",actions: [
19-
DialogActions(text: "取消"),
20-
DialogActions(text: "确定")
21-
],platform: TargetPlatform.iOS);
22-
}, child: Text("Dialog_Ios"))
12+
Picker.show(context,data: ["item1","item2","item2","item4"]);
13+
}, child: Text("Picker"))
2314
],
2415
),
2516
),

0 commit comments

Comments
 (0)