Skip to content

Commit 8957bec

Browse files
committed
Merge branch 'test'
2 parents 6624935 + c1d8f5d commit 8957bec

File tree

28 files changed

+313
-99
lines changed

28 files changed

+313
-99
lines changed

assets/config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"version": 1.0
3+
}
Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,20 @@
1-
## ****
1+
## **Divider**
2+
3+
>
4+
分割线
5+
* 常用使用Container包裹一层厚,使用padding可以构造出你需要的长度水平线
6+
7+
### 构造方法
8+
``` dart
9+
Divider({
10+
Key key,
11+
this.height = 16.0,
12+
this.indent = 0.0,
13+
this.color
14+
})
15+
```
16+
17+
### 属性介绍
18+
* height: 分割线的高度范围
19+
* indent: 分割线左侧的空白空间量
20+
* color: 线条颜色
Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,36 @@
1-
## ****
1+
## **FlatButton**
2+
3+
>
4+
文本标签按钮
5+
* onPressed回调为null,则该按钮将被禁用
6+
7+
### 构造方法
8+
``` dart
9+
FlatButton({
10+
Key key,
11+
@required VoidCallback onPressed,
12+
ValueChanged<bool> onHighlightChanged,
13+
ButtonTextTheme textTheme,
14+
Color textColor,
15+
Color disabledTextColor,
16+
Color color,
17+
Color disabledColor,
18+
Color highlightColor,
19+
Color splashColor,
20+
Brightness colorBrightness,
21+
EdgeInsetsGeometry padding,
22+
ShapeBorder shape,
23+
Clip clipBehavior = Clip.none,
24+
MaterialTapTargetSize materialTapTargetSize,
25+
@required Widget child,
26+
})
27+
```
28+
29+
### 属性介绍
30+
* onPressed: 点击回调
31+
* textColor:文本颜色
32+
* disabledTextColor:禁用文本颜色
33+
* color:按钮颜色
34+
* disabledColor: 禁用按钮颜色
35+
* highlightColor:长按按钮颜色
36+
* child:按钮中的Widget
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## **CheckboxListTile**
2+
3+
>
4+
带有标签的复选框
5+
6+
### 构造方法
7+
``` dart
8+
CheckboxListTile({
9+
Key key,
10+
@required this.value,
11+
@required this.onChanged,
12+
this.activeColor,
13+
this.title,
14+
this.subtitle,
15+
this.isThreeLine = false,
16+
this.dense,
17+
this.secondary,
18+
this.selected = false,
19+
this.controlAffinity = ListTileControlAffinity.platform,
20+
})
21+
```
22+
23+
### 属性介绍
24+
* value: 复选框选择状态
25+
* onChanged: 点击复选框的回调函数
26+
* activeColor: 选中此复选框时要使用的颜色
27+
* title: 标题
28+
* subtitle: 子标题
29+
* isThreeLine: 是否显示三行文本
30+
* dense: 是否垂直密集显示
31+
* secondary: 显示复选框一侧的小组件
32+
* selected: 是否使用activeColor渲染图标和文本
33+
* controlAffinity: 相对于文本放置控件位置

docs/widget/scrollview/customscrollview/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ CustomScrollView({
2222
```
2323

2424
### 属性介绍
25-
> viewportBuilder:显示滚动组件的属性,实例CustomScrollView/SingleChildScrollView实现不同的滚动效果。
25+
> viewportBuilder:显示滚动组件的属性,实例CustomScrollView/SingleChildScrollView实现不同的滚动效果。
2626
- CustomScrollView: 实现随滚动条,appbar向上移动效果
2727
- SingleChildScrollView:参考SingleChildScrollView
2828

@@ -32,7 +32,8 @@ CustomScrollView({
3232
- SliverFixedExtentList
3333
- ...
3434

35-
> SliverAppBar: 滚动标题头小组件
35+
> SliverAppBar: 滚动标题头小组件
36+
3637
```
3738
SliverAppBar({
3839
Key key,

lib/components/baseComp.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'package:flutter/material.dart';
2-
import 'package:efox_flutter/store/store.dart' show Store;
2+
import 'package:efox_flutter/store/index.dart' show Store;
33
import 'header.dart' as Header;
44

55
class Index extends StatelessWidget {

lib/components/exampleComp.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'package:flutter/material.dart';
22
import 'package:efox_flutter/store/models/main_state_model.dart'
33
show MainStateModel;
4-
import 'package:efox_flutter/store/store.dart' show Store;
4+
import 'package:efox_flutter/store/index.dart' show Store;
55
import 'package:efox_flutter/config/theme.dart' show AppTheme;
66

77
class Index extends StatelessWidget {

lib/components/webviewComp.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import 'package:flutter/material.dart';
22
import 'header.dart' as Header;
3-
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';
3+
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart' show FlutterWebviewPlugin, WebviewScaffold;
44

55
class Index extends StatelessWidget {
66
final String url;

lib/components/widgetComp.dart

Lines changed: 7 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'package:flutter/material.dart';
2-
import 'package:efox_flutter/store/store.dart' show Store;
2+
import 'package:efox_flutter/store/index.dart' show Store;
33
import 'header.dart' as Header;
44
import 'package:efox_flutter/components/markdownComp.dart' as MarkDownComp;
55
import 'package:efox_flutter/lang/app_translations.dart' show AppTranslations;
@@ -88,20 +88,19 @@ class IndexState extends State<Index> {
8888
),
8989
actions: this.getActions(
9090
context,
91-
model,
9291
),
9392
),
9493
body: this.loading ? this.renderLoading() : this.renderWidget(),
9594
);
9695
});
9796
}
9897

99-
openPage(context, model) async {
98+
openPage(context) async {
10099
String url = this.mdUrl;
101100
// 加载页面
102-
if (model.config.state.isPro) {
101+
if (this.model.config.state.isPro) {
103102
FluroRouter.router.navigateTo(context,
104-
'/webview?url=${Uri.encodeComponent(model.config.state.env.GithubAssetOrigin + url.replaceAll(RegExp('/index.md'), ''))}');
103+
'/webview?url=${Uri.encodeComponent(this.model.config.state.env.GithubAssetOrigin + url.replaceAll(RegExp('/index.md'), ''))}');
105104
} else {
106105
// 加载本地
107106
String mdStr = await FileUtils.readLocaleFile(url);
@@ -123,7 +122,7 @@ class IndexState extends State<Index> {
123122
return mdStr;
124123
}
125124

126-
getActions(context, model) {
125+
getActions(context) {
127126
return [
128127
IconButton(
129128
icon: Icon(
@@ -141,62 +140,17 @@ class IndexState extends State<Index> {
141140
Icons.code,
142141
),
143142
onPressed: () async {
144-
this.openPage(context, model);
143+
this.openPage(context);
145144
},
146145
),
147146
IconButton(
148147
icon: Icon(Icons.share),
149148
onPressed: () {
150149
final String msg =
151-
model.config.state.env.GithubAssetOrigin + this.mdUrl;
150+
this.model.config.state.env.GithubAssetOrigin + this.mdUrl;
152151
AppShare.shareText(msg);
153152
},
154153
),
155-
// PopupMenuButton(
156-
// offset: Offset(0, 80),
157-
// onSelected: (index) {
158-
// switch (index) {
159-
// case 0:
160-
// FluroRouter.router.navigateTo(
161-
// context,
162-
// '/webview?url=${Uri.encodeComponent('https://github.com/efoxTeam/flutter-ui')}',
163-
// );
164-
// break;
165-
// case 1:
166-
// FluroRouter.router.navigateTo(
167-
// context,
168-
// '/webview?url=${Uri.encodeComponent(this.originCodeUrl)}',
169-
// );
170-
// break;
171-
// }
172-
// },
173-
// itemBuilder: (context) {
174-
// return [
175-
// PopupMenuItem(
176-
// child: Row(children: [
177-
// Icon(
178-
// Icons.home,
179-
// color: Color(AppTheme.greyColor),
180-
// ),
181-
// Text(" "),
182-
// Text('Flutter-UI'),
183-
// ]),
184-
// value: 0,
185-
// ),
186-
// PopupMenuItem(
187-
// child: Row(children: [
188-
// Icon(
189-
// Icons.code,
190-
// color: Color(AppTheme.greyColor),
191-
// ),
192-
// Text(" "),
193-
// Text(this.title),
194-
// ]),
195-
// value: 1,
196-
// ),
197-
// ];
198-
// },
199-
// ),
200154
];
201155
}
202156

lib/config/development.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
class Config {
2-
String GithubAssetOrigin =
2+
String versionUrl = 'https://raw.githubusercontent.com/efoxTeam/flutter-ui/master/assets/config.json';
3+
String githubAssetOrigin =
34
'https://github.com/efoxTeam/flutter-ui/blob/master/';
4-
String GithubMarkdownOrigin =
5+
String githubMarkdownOrigin =
56
'https://raw.githubusercontent.com/efoxTeam/flutter-ui/master/';
67
}

0 commit comments

Comments
 (0)