mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-02 16:31:30 +03:00
use InteractiveViewer instead of GestureDetector
This commit is contained in:
@@ -118,20 +118,18 @@ class _RemotePageState extends State<RemotePage> {
|
|||||||
// https://stackoverflow.com/questions/46640116/make-flutter-application-fullscreen
|
// https://stackoverflow.com/questions/46640116/make-flutter-application-fullscreen
|
||||||
SystemChrome.setEnabledSystemUIOverlays([]);
|
SystemChrome.setEnabledSystemUIOverlays([]);
|
||||||
return FlutterEasyLoading(
|
return FlutterEasyLoading(
|
||||||
child: GestureDetector(
|
child: InteractiveViewer(
|
||||||
child: Container(
|
constrained: false,
|
||||||
child: CustomPaint(
|
panEnabled: true,
|
||||||
painter: new ImageEditor(image: _image),
|
onInteractionUpdate: (details) {
|
||||||
),
|
print("$details");
|
||||||
color: MyTheme.grayBg),
|
},
|
||||||
onPanStart: (DragDownDetails) {
|
child: Container(
|
||||||
print('onPanStart $DragDownDetails');
|
child: CustomPaint(
|
||||||
// hero.moveTo(DragDownDetails.globalPosition.dx, DragDownDetails.globalPosition.dy);
|
painter: new ImageEditor(image: _image),
|
||||||
},
|
),
|
||||||
onPanUpdate: (DragDownDetails) {
|
color: MyTheme.grayBg),
|
||||||
print('onPanUpdate $DragDownDetails');
|
));
|
||||||
// hero.moveTo(DragDownDetails.globalPosition.dx, DragDownDetails.globalPosition.dy);
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -145,7 +143,7 @@ class ImageEditor extends CustomPainter {
|
|||||||
@override
|
@override
|
||||||
void paint(Canvas canvas, Size size) {
|
void paint(Canvas canvas, Size size) {
|
||||||
if (image == null) return;
|
if (image == null) return;
|
||||||
canvas.drawImage(image, new Offset(0.0, 0.0), new Paint());
|
canvas.drawImage(image, new Offset(0, 0), new Paint());
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
Reference in New Issue
Block a user