Skip to content

simplezhli/flutter_remote_control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flutter_remote_control

主要使用LongPressDraggableDragTarget实现的万能遥控器交互效果。

Android 原生实现版本:RemoteControlView

实现效果

单指 多指
Preview Preview1

实现过程

flutter 1.20 在DragTarget新增onAcceptWithDetails回调,目前对于本项目实现无作用。还是需要去修改源码实现。。。

发现flutter 2.0.0 在Draggable新增onDragUpdate回调、DragTarget新增onMove回调,基本可以满足此项目使用,但无法实现二次拖动。还是需要去修改源码实现。。。

修改源码部分有TODO标记,感兴趣可自行查看。

玩玩Flutter的拖拽——实现一款万能遥控器

License

Copyright 2020 simplezhli

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.