Skip to content

Commit

Permalink
Merge pull request #47 from efoxTeam/dev
Browse files Browse the repository at this point in the history
1.0.2
  • Loading branch information
ckken authored Mar 23, 2019
2 parents a1cd705 + c400197 commit 87426cd
Show file tree
Hide file tree
Showing 46 changed files with 1,587 additions and 391 deletions.
33 changes: 32 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.flutter.beer">
package="com.flutter.beer"
android:installLocation="preferExternal">

<!-- The INTERNET permission is required for development. Specifically,
flutter needs it to communicate with the running application
Expand Down Expand Up @@ -35,5 +36,35 @@
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>

<!-- Flutterdownloader configuration -->
<provider
android:name="vn.hunghd.flutterdownloader.DownloadedFileProvider"
android:authorities="${applicationId}.flutter_downloader.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/>
</provider>

<provider
android:name="androidx.work.impl.WorkManagerInitializer"
android:authorities="${applicationId}.workmanager-init"
android:enabled="false"
android:exported="false" />

<provider
android:name="vn.hunghd.flutterdownloader.FlutterDownloaderInitializer"
android:authorities="${applicationId}.flutter-downloader-init"
android:exported="false">
<meta-data
android:name="vn.hunghd.flutterdownloader.MAX_CONCURRENT_TASKS"
android:value="5" />
</provider>

<!-- Flutterdownloader configuration end -->

</application>
</manifest>

81 changes: 80 additions & 1 deletion docs/widget/gestures/gesturedetector/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,80 @@
## **文档完善中**
## **GestureDetector**
> 该组件可监听触摸事件,可包裹需要监听的组件后使用带有的触摸事件。
### 构造函数
```
GestureDetector({
Key key,
this.child,
this.onTapDown,
this.onTapUp,
this.onTap,
this.onTapCancel,
this.onDoubleTap,
this.onLongPress,
this.onLongPressUp,
this.onLongPressDragStart,
this.onLongPressDragUpdate,
this.onLongPressDragUp,
this.onVerticalDragDown,
this.onVerticalDragStart,
this.onVerticalDragUpdate,
this.onVerticalDragEnd,
this.onVerticalDragCancel,
this.onHorizontalDragDown,
this.onHorizontalDragStart,
this.onHorizontalDragUpdate,
this.onHorizontalDragEnd,
this.onHorizontalDragCancel,
this.onForcePressStart,
this.onForcePressPeak,
this.onForcePressUpdate,
this.onForcePressEnd,
this.onPanDown,
this.onPanStart,
this.onPanUpdate,
this.onPanEnd,
this.onPanCancel,
this.onScaleStart,
this.onScaleUpdate,
this.onScaleEnd,
this.behavior,
this.excludeFromSemantics = false,
this.dragStartBehavior = DragStartBehavior.down,
})
```

### 属性介绍
> 点击事件可用Tap属性,执行顺序如下罗列
- onTapDown: 触摸时触发
- onTapUp: 触摸离开时触发
- onTap: 点击后触发
- onTapCancel: 触发时取消
- onDoubleTap: 200毫秒内触摸时触发,但不触发onTap
> 拖动事件可用Pan属性,执行顺序如下罗列,拖动时返回是手势位移数据
- onPanDown:
- onPanStart: (DragStartDetails e) {} 返回相对屏幕位置
- onPanUpdate: (DragUpdateDetails e) {} 回调函数中返回是手势位移数据
- onPanEnd: (DragEndDetails e) {} 回调函数中返回Velocity,手势瞬时速度,可结合动画使用
- onPanCancel: 回调取消
> 以下也可执行拖动事件,使用后不会触发Tap/Pan事件,执行顺序如下罗列,拖动时返回相对整个屏幕距离数据
- onForcePressStart: (ForcePressDetails e) {}
- onForcePressPeak: (ForcePressDetails e) {}
- onForcePressUpdate: (ForcePressDetails e) {}
- onForcePressEnd: (ForcePressDetails e) {}
> 监听垂直或水平方向
- onVerticalDragDown
- onVerticalDragStart
- onVerticalDragUpdate
- onVerticalDragEnd
- onVerticalDragCancel
- onHorizontalDragDown
- onHorizontalDragStart
- onHorizontalDragUpdate
- onHorizontalDragEnd
- onHorizontalDragCancel
> 手势放大
- onScaleStart
- onScaleUpdate
- onScaleEnd

25 changes: 24 additions & 1 deletion docs/widget/vision/transform/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
## **文档完善中**
## **Transform**

> 在绘制子元素前应用转换的组件
### 构造方法
```
Transform({
Key key,
@required Matrix4 transform,
Offset origin,
AlignmentGeometry alignment,
bool transformHitTests: true,
Widget child
})
```

### 属性介绍
origin:坐标系的原点(相对于此渲染对象的左上角)应用矩阵的原点
alignment:原点的对齐方式
transform: 在绘制过程中改变子元素的矩阵
transformHitTests:在测试时是否执行转换


### 实例
10 changes: 5 additions & 5 deletions lib/components/exampleComp.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ class Index extends StatelessWidget {
@override
Widget build(BuildContext context) {
Size size = MediaQuery.of(context).size;
double _dp = 1.5;
return Store.connect(
builder: (context, child, MainStateModel model) {
return Center(
child: Container(
width: size.width,
height: size.height / _dp,
margin: EdgeInsets.all(30 / _dp),
margin: EdgeInsets.all(10),
decoration: BoxDecoration(
border: Border.all(color: Color(AppTheme.mainColor), width: 1.0),
),
child: this.child,
child: SizedBox.fromSize(
size: size / 1.3,
child: this.child,
),
),
);
},
Expand Down
Loading

0 comments on commit 87426cd

Please sign in to comment.