Files
2019-02-19 11:53:15 +08:00

45 lines
1.2 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/// Created with Android Studio.
/// User: 一晟
/// Date: 2019/1/20
/// Time: 下午10:57
/// email: zhu.yan@alibaba-inc.com
/// target: CupertinoPicker 的示例
import 'package:flutter/material.dart';
import 'package:flutter_go/components/widget_demo.dart';
import './demo.dart' as demoBox;
const String content0 = '''
### **简介**
> iOS风格的选择器
- 以 wheel 的方式显示子 widget选择发生改变后的回调;
- 通常和 showModalBottomSheet 搭配在屏幕底部显示 picker 选择器;
''';
const String content1 = '''
### **基本用法**
> CupertinoPicker 的一个示例
''';
class Demo extends StatefulWidget {
static const String routeName = '/themes/Cupertino/CupertinoPicker';
_DemoState createState() => _DemoState();
}
class _DemoState extends State<Demo> {
@override
Widget build(BuildContext context) {
return WidgetDemo(
contentList: [
content0,
content1,
demoBox.CupertinoPickerDemo(),
SizedBox(height:50)
],
title: 'CupertinoPicker',
docUrl: 'https://docs.flutter.io/flutter/cupertino/CupertinoPicker-class.html',
codeUrl: 'themes/Cupertino/CupertinoPicker/demo.dart',
);
}
}