From 5ec85b55fd41cfeb40595893894ece62809658dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=98=8E?= <2534290808@qq.com> Date: Fri, 8 Mar 2019 14:18:32 +0800 Subject: [PATCH] docs(picker): add picker example --- README.md | 2 +- README_zh-CN.md | 2 +- example/lib/picker_example.dart | 17 ++++------------- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 9677aa6..08ff871 100644 --- a/README.md +++ b/README.md @@ -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`]() diff --git a/README_zh-CN.md b/README_zh-CN.md index 26813f9..f8375b7 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -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`]() diff --git a/example/lib/picker_example.dart b/example/lib/picker_example.dart index 3001f4b..e2087ad 100644 --- a/example/lib/picker_example.dart +++ b/example/lib/picker_example.dart @@ -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: [ 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")) ], ), ),