Skip to content

Commit 87426cd

Browse files
authored
Merge pull request #47 from efoxTeam/dev
1.0.2
2 parents a1cd705 + c400197 commit 87426cd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1587
-391
lines changed

android/app/src/main/AndroidManifest.xml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.flutter.beer">
2+
package="com.flutter.beer"
3+
android:installLocation="preferExternal">
34

45
<!-- The INTERNET permission is required for development. Specifically,
56
flutter needs it to communicate with the running application
@@ -35,5 +36,35 @@
3536
<category android:name="android.intent.category.LAUNCHER"/>
3637
</intent-filter>
3738
</activity>
39+
40+
<!-- Flutterdownloader configuration -->
41+
<provider
42+
android:name="vn.hunghd.flutterdownloader.DownloadedFileProvider"
43+
android:authorities="${applicationId}.flutter_downloader.provider"
44+
android:exported="false"
45+
android:grantUriPermissions="true">
46+
<meta-data
47+
android:name="android.support.FILE_PROVIDER_PATHS"
48+
android:resource="@xml/provider_paths"/>
49+
</provider>
50+
51+
<provider
52+
android:name="androidx.work.impl.WorkManagerInitializer"
53+
android:authorities="${applicationId}.workmanager-init"
54+
android:enabled="false"
55+
android:exported="false" />
56+
57+
<provider
58+
android:name="vn.hunghd.flutterdownloader.FlutterDownloaderInitializer"
59+
android:authorities="${applicationId}.flutter-downloader-init"
60+
android:exported="false">
61+
<meta-data
62+
android:name="vn.hunghd.flutterdownloader.MAX_CONCURRENT_TASKS"
63+
android:value="5" />
64+
</provider>
65+
66+
<!-- Flutterdownloader configuration end -->
67+
3868
</application>
3969
</manifest>
70+
Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,80 @@
1-
## **文档完善中**
1+
## **GestureDetector**
2+
> 该组件可监听触摸事件,可包裹需要监听的组件后使用带有的触摸事件。
3+
4+
### 构造函数
5+
```
6+
GestureDetector({
7+
Key key,
8+
this.child,
9+
this.onTapDown,
10+
this.onTapUp,
11+
this.onTap,
12+
this.onTapCancel,
13+
this.onDoubleTap,
14+
this.onLongPress,
15+
this.onLongPressUp,
16+
this.onLongPressDragStart,
17+
this.onLongPressDragUpdate,
18+
this.onLongPressDragUp,
19+
this.onVerticalDragDown,
20+
this.onVerticalDragStart,
21+
this.onVerticalDragUpdate,
22+
this.onVerticalDragEnd,
23+
this.onVerticalDragCancel,
24+
this.onHorizontalDragDown,
25+
this.onHorizontalDragStart,
26+
this.onHorizontalDragUpdate,
27+
this.onHorizontalDragEnd,
28+
this.onHorizontalDragCancel,
29+
this.onForcePressStart,
30+
this.onForcePressPeak,
31+
this.onForcePressUpdate,
32+
this.onForcePressEnd,
33+
this.onPanDown,
34+
this.onPanStart,
35+
this.onPanUpdate,
36+
this.onPanEnd,
37+
this.onPanCancel,
38+
this.onScaleStart,
39+
this.onScaleUpdate,
40+
this.onScaleEnd,
41+
this.behavior,
42+
this.excludeFromSemantics = false,
43+
this.dragStartBehavior = DragStartBehavior.down,
44+
})
45+
```
46+
47+
### 属性介绍
48+
> 点击事件可用Tap属性,执行顺序如下罗列
49+
- onTapDown: 触摸时触发
50+
- onTapUp: 触摸离开时触发
51+
- onTap: 点击后触发
52+
- onTapCancel: 触发时取消
53+
- onDoubleTap: 200毫秒内触摸时触发,但不触发onTap
54+
> 拖动事件可用Pan属性,执行顺序如下罗列,拖动时返回是手势位移数据
55+
- onPanDown:
56+
- onPanStart: (DragStartDetails e) {} 返回相对屏幕位置
57+
- onPanUpdate: (DragUpdateDetails e) {} 回调函数中返回是手势位移数据
58+
- onPanEnd: (DragEndDetails e) {} 回调函数中返回Velocity,手势瞬时速度,可结合动画使用
59+
- onPanCancel: 回调取消
60+
> 以下也可执行拖动事件,使用后不会触发Tap/Pan事件,执行顺序如下罗列,拖动时返回相对整个屏幕距离数据
61+
- onForcePressStart: (ForcePressDetails e) {}
62+
- onForcePressPeak: (ForcePressDetails e) {}
63+
- onForcePressUpdate: (ForcePressDetails e) {}
64+
- onForcePressEnd: (ForcePressDetails e) {}
65+
> 监听垂直或水平方向
66+
- onVerticalDragDown
67+
- onVerticalDragStart
68+
- onVerticalDragUpdate
69+
- onVerticalDragEnd
70+
- onVerticalDragCancel
71+
- onHorizontalDragDown
72+
- onHorizontalDragStart
73+
- onHorizontalDragUpdate
74+
- onHorizontalDragEnd
75+
- onHorizontalDragCancel
76+
> 手势放大
77+
- onScaleStart
78+
- onScaleUpdate
79+
- onScaleEnd
80+

docs/widget/vision/transform/index.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,24 @@
1-
## **文档完善中**
1+
## **Transform**
2+
3+
> 在绘制子元素前应用转换的组件
4+
5+
### 构造方法
6+
```
7+
Transform({
8+
Key key,
9+
@required Matrix4 transform,
10+
Offset origin,
11+
AlignmentGeometry alignment,
12+
bool transformHitTests: true,
13+
Widget child
14+
})
15+
```
16+
17+
### 属性介绍
18+
origin:坐标系的原点(相对于此渲染对象的左上角)应用矩阵的原点
19+
alignment:原点的对齐方式
20+
transform: 在绘制过程中改变子元素的矩阵
21+
transformHitTests:在测试时是否执行转换
22+
23+
24+
### 实例

lib/components/exampleComp.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ class Index extends StatelessWidget {
1212
@override
1313
Widget build(BuildContext context) {
1414
Size size = MediaQuery.of(context).size;
15-
double _dp = 1.5;
1615
return Store.connect(
1716
builder: (context, child, MainStateModel model) {
1817
return Center(
1918
child: Container(
20-
width: size.width,
21-
height: size.height / _dp,
22-
margin: EdgeInsets.all(30 / _dp),
19+
margin: EdgeInsets.all(10),
2320
decoration: BoxDecoration(
2421
border: Border.all(color: Color(AppTheme.mainColor), width: 1.0),
2522
),
26-
child: this.child,
23+
child: SizedBox.fromSize(
24+
size: size / 1.3,
25+
child: this.child,
26+
),
2727
),
2828
);
2929
},

0 commit comments

Comments
 (0)