Skip to content

feat: 合并test分支 #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Mar 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3754f65
style:切换icon
ckken Mar 11, 2019
57c1da3
up
ckken Mar 11, 2019
c4ef687
Merge branch 'test' into dev-ken
ckken Mar 11, 2019
72e19a2
Merge pull request #23 from efoxTeam/dev-ken
ckken Mar 11, 2019
50213ec
style:优化文档 合并组件类
ckken Mar 11, 2019
2e91f0a
Merge pull request #25 from efoxTeam/dev-ken
ckken Mar 11, 2019
050c4ae
style:增加pr格式
ckken Mar 11, 2019
e49c01d
Merge pull request #26 from efoxTeam/dev-ken
ckken Mar 11, 2019
509d914
feat: add appbar‘
wanwusangzhi Mar 11, 2019
1b43e48
Merge branch 'test' of https://github.com/efoxTeam/flutter-ui into test
wanwusangzhi Mar 11, 2019
d238eff
fix: webview
DIVINER-only Mar 11, 2019
468c9d2
feat: switch
DIVINER-only Mar 11, 2019
614bc57
feat: SwitchListTile
DIVINER-only Mar 11, 2019
4b8b7fb
feat:首页增加点击展开收缩功能
wanwusangzhi Mar 11, 2019
b5f7eee
fix:增加md
wanwusangzhi Mar 11, 2019
7a9bec3
feat: SwitchListTile
DIVINER-only Mar 12, 2019
2a0dc02
Merge branch 'lhr' into test
DIVINER-only Mar 12, 2019
794da40
feat:增加md’
wanwusangzhi Mar 12, 2019
8776c77
Merge branch 'ysz' into test
wanwusangzhi Mar 12, 2019
059c940
feat: PickerDate
DIVINER-only Mar 12, 2019
814d9ec
Merge branch 'lhr' into test
DIVINER-only Mar 12, 2019
cecdd2f
feat: Radio
DIVINER-only Mar 12, 2019
741b1a6
RadioListTile
DIVINER-only Mar 12, 2019
fe6e1bb
feat: NoDemo
DIVINER-only Mar 12, 2019
85b0201
feat:增加空显示示页面
wanwusangzhi Mar 12, 2019
57db272
TextField
DIVINER-only Mar 12, 2019
5fa4af6
feat:add draw component
wanwusangzhi Mar 12, 2019
5ffdc87
Merge branch 'ysz' into test
wanwusangzhi Mar 12, 2019
043d180
feat:增加文档热更功能
wanwusangzhi Mar 13, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added android/app/src/main/res/playstore-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/imgs/avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 35 additions & 1 deletion docs/widget/form/daypicker/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,35 @@
## **文档完善中**
## **DatePicker**

>
显示给定月份的日期并允许选择一天
* 日期选择器很少直接使用,请考虑使用 showDatePicker 或者 showTimePicker,它会创建一个日期/时间选择器对话框

### showDatePicker构造方法
``` dart
showDatePicker({
@required BuildContext context,
@required DateTime initialDate,
@required DateTime firstDate,
@required DateTime lastDate,
SelectableDayPredicate selectableDayPredicate,
DatePickerMode initialDatePickerMode = DatePickerMode.day,
Locale locale,
TextDirection textDirection,
TransitionBuilder builder,
})
```

### showTimePicker构造方法
``` dart
showTimePicker({
@required BuildContext context,
@required TimeOfDay initialTime,
TransitionBuilder builder,
})
```

### 属性介绍
* context: 上下文
* initialDate: 初始时间
* firstDate: 设置选择的最早时间
* lastDate: 设置选择的最晚时间
23 changes: 22 additions & 1 deletion docs/widget/form/radio/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,22 @@
## **文档完善中**
## **Radio**

>
单选按钮

### 构造方法
``` dart
Radio({
Key key,
@required this.value,
@required this.groupValue,
@required this.onChanged,
this.activeColor,
this.materialTapTargetSize,
})
```

### 属性介绍
* value:单选按钮的值
* groupValue:此组单选按钮的当前选定值,当value=groupValue时表示该按钮被选中
* onChanged:选择单选按钮时的回调
* activeColor:选中该按钮的颜色
35 changes: 35 additions & 0 deletions docs/widget/form/radiolisttile/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## **RadioListTile**

>
带标签的单选按钮

### 构造方法
``` dart
RadioListTile({
Key key,
@required this.value,
@required this.groupValue,
@required this.onChanged,
this.activeColor,
this.title,
this.subtitle,
this.isThreeLine = false,
this.dense,
this.secondary,
this.selected = false,
this.controlAffinity = ListTileControlAffinity.platform,
})
```

### 属性介绍
* value:单选按钮的值
* groupValue:此组单选按钮的当前选定值,当value=groupValue时表示该按钮被选中
* onChanged:选择单选按钮时的回调
* activeColor:选中该按钮的颜色
* title: 标题
* subtitle: 子标题
* isThreeLine: 是否显示三行文本
* dense: 是否垂直密集显示
* secondary: 显示单选按钮一侧的小组件
* selected: 是否使用activeColor渲染图标和文本
* controlAffinity: 相对于文本放置控件位置
34 changes: 33 additions & 1 deletion docs/widget/form/switch/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
## **文档完善中**
## **Switch**

>
Switch是切换按钮控件,通常用于设置的选项里

### 构造方法
``` dart
Switch({
Key key,
@required this.value,
@required this.onChanged,
this.activeColor,
this.activeTrackColor,
this.inactiveThumbColor,
this.inactiveTrackColor,
this.activeThumbImage,
this.inactiveThumbImage,
this.materialTapTargetSize,
this.dragStartBehavior = DragStartBehavior.start,
})
```

### 属性介绍
* value: true:开 false:关
* onChanged: 变化时回调
* activeColor: 打开状态下颜色
* activeTrackColor: 打开状态下track颜色
* inactiveThumbColor: 关闭状态thumb颜色
* inactiveTrackColor: 关闭状态track颜色
* activeThumbImage: 打开状态下thumb图片
* inactiveThumbImage: 关闭状态thumb图片
* materialTapTargetSize: 配置点击目标的最小尺寸
* dragStartBehavior: 确定处理拖动开始行为的方式
41 changes: 41 additions & 0 deletions docs/widget/form/switchlisttile/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## **SwitchListTile**

>
带有标签的开关

### 构造方法
``` dart
SwitchListTile({
Key key,
@required this.value,
@required this.onChanged,
this.activeColor,
this.activeTrackColor,
this.inactiveThumbColor,
this.inactiveTrackColor,
this.activeThumbImage,
this.inactiveThumbImage,
this.title,
this.subtitle,
this.isThreeLine = false,
this.dense,
this.secondary,
this.selected = false,
})
```

### 属性介绍
* value: true:开 false:关
* onChanged: 变化时回调
* activeColor: 打开状态下颜色
* activeTrackColor: 打开状态下track颜色
* inactiveThumbColor: 关闭状态thumb颜色
* inactiveTrackColor: 关闭状态track颜色
* activeThumbImage: 打开状态下thumb图片
* inactiveThumbImage: 关闭状态thumb图片
* title: 标题
* subtitle: 子标题
* isThreeLine: 是否显示三行文本
* dense: 是否垂直密集显示
* secondary: 显示左侧侧的小组件
* selected: 是否使用activeColor渲染图标和文本
65 changes: 64 additions & 1 deletion docs/widget/form/textfield/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,64 @@
## **文档完善中**
## **TextField**

>
TextField最常用的文本输入Widget


### 构造方法
``` dart
TextField({
Key key,
this.controller,
this.focusNode,
this.decoration = const InputDecoration(),
TextInputType keyboardType,
this.textInputAction,
this.textCapitalization = TextCapitalization.none,
this.style,
this.strutStyle,
this.textAlign = TextAlign.start,
this.textDirection,
this.autofocus = false,
this.obscureText = false,
this.autocorrect = true,
this.maxLines = 1,
this.maxLength,
this.maxLengthEnforced = true,
this.onChanged,
this.onEditingComplete,
this.onSubmitted,
this.inputFormatters,
this.enabled,
this.cursorWidth = 2.0,
this.cursorRadius,
this.cursorColor,
this.keyboardAppearance,
this.scrollPadding = const EdgeInsets.all(20.0),
this.dragStartBehavior = DragStartBehavior.start,
this.enableInteractiveSelection,
this.onTap,
this.buildCounter,
})
```

### 属性介绍
* controller:TextField的控制器,可用来添加通知或者获取TextField的值,如controller.text
* decoration = const InputDecoration():装饰器,设置相关的属性能构造出各种TextField效果,详情见Demo
* TextInputType keyboardType:TextField获得焦点时弹出的键盘类型
* style:输入框文本样式
* textAlign:文本对齐方式
* textDirection:文本方向
* autofocus:是否自动对焦
* obscureText:是否以密码形式显示
* autocorrect:是否自动更正
* maxLines:最大行数
* maxLength:最大长度,设置此项会让TextField右下角有一个输入数量的统计字符串
* maxLengthEnforced = true:
* onChanged:输入框内容改变进行回调
* onEditingComplete:输入完毕回调
* onSubmitted:内容提交,回车的回调
* enabled:是否禁用
* cursorWidth = 2.0:光标的宽度
* cursorRadius:光标的角的圆角
* cursorColor:光标的颜色
* onTap:点击文本时调用
33 changes: 32 additions & 1 deletion docs/widget/navigator/appbar/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,32 @@
## **AppBar**
## **AppBar**
> 创建导航栏,

### 构造函数
```
AppBar({
Key key,
Widget leading,
bool automaticallyImplyLeading: true,
Widget title,
List<Widget> actions,
Widget flexibleSpace,
PreferredSizeWidget bottom,
double elevation,
Color backgroundColor,
Brightness brightness,
IconThemeData iconTheme,
TextTheme textTheme,
bool primary: true,
bool centerTitle,
double titleSpacing: NavigationToolbar.kMiddleSpacing,
double toolbarOpacity: 1.0,
double bottomOpacity: 1.0
})
```

### 属性介绍
- leading: 导航栏左侧图标
- title: 导航栏标题
- actions: 导航栏右侧扩展图标,可添加PopupMenuButton,点开有下拉展开更多按钮。
- automaticallyImplyLeading: 默认true, 当有上一级页面时,默认显示back按钮
- bottom: 通过与Tabbar使用
51 changes: 50 additions & 1 deletion docs/widget/navigator/drawer/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,50 @@
## **文档完善中**
## **Drawer**
> 抽屉式组件,从Scaffold边缘水平滑出左侧菜单,也可通过Scaffold.of(context).openDrawer()显示左侧菜单。关闭页面通过Navigator.pop(context)。

### 构造函数
```
Drawer({
Key key,
double elevation: 16.0,
Widget child,
String semanticLabel
})
```

### 属性介绍
- child: 菜单内容
- elevation:导航栏底部阴影

### 高级用法
- 关闭菜单
> Navigator.pop(context)
- 打开菜单
> 方法一: Scaffold.of(context).openDrawer()
```
使用context变量时,需要注意在scaffold中增加Builder来获取到context,该context才是scaffold中的上下文对象,而Build build(BuildContext context)是外层类的上下文,没法操作菜单
Builder(
builder: (context) {
return RaisedButton(
onPressed: () {
Scaffold.of(context).openDrawer();
},
child: Text("点击滑出左侧菜单"),
);
},
),
```

> 方法二: static GlobalKey<ScaffoldState> _globalKey= new GlobalKey();
```
定义globalKey

static GlobalKey<ScaffoldState> _globalKey= new GlobalKey();
...
Scaffold(
key: _globalKey , //设置key
...
)

通过globalkey操作菜单状态
_globalKey.currentState.openDrawer()
```
Loading