disable desktop_drop for now
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
a054c9520e
commit
72b19a27d3
@ -4,7 +4,7 @@ import 'dart:math';
|
|||||||
|
|
||||||
import 'package:flutter_hbb/desktop/widgets/dragable_divider.dart';
|
import 'package:flutter_hbb/desktop/widgets/dragable_divider.dart';
|
||||||
import 'package:percent_indicator/percent_indicator.dart';
|
import 'package:percent_indicator/percent_indicator.dart';
|
||||||
import 'package:desktop_drop/desktop_drop.dart';
|
// import 'package:desktop_drop/desktop_drop.dart';
|
||||||
import 'package:flutter/gestures.dart';
|
import 'package:flutter/gestures.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
@ -62,7 +62,8 @@ class _FileManagerPageState extends State<FileManagerPage>
|
|||||||
with AutomaticKeepAliveClientMixin {
|
with AutomaticKeepAliveClientMixin {
|
||||||
final _mouseFocusScope = Rx<MouseFocusScope>(MouseFocusScope.none);
|
final _mouseFocusScope = Rx<MouseFocusScope>(MouseFocusScope.none);
|
||||||
|
|
||||||
final _dropMaskVisible = false.obs; // TODO impl drop mask
|
// Disable desktop_drop for now
|
||||||
|
// final _dropMaskVisible = false.obs; // TODO impl drop mask
|
||||||
final _overlayKeyState = OverlayKeyState();
|
final _overlayKeyState = OverlayKeyState();
|
||||||
|
|
||||||
late FFI _ffi;
|
late FFI _ffi;
|
||||||
@ -129,16 +130,21 @@ class _FileManagerPageState extends State<FileManagerPage>
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget dropArea(FileManagerView fileView) {
|
Widget dropArea(FileManagerView fileView) {
|
||||||
return DropTarget(
|
return Container(
|
||||||
onDragDone: (detail) =>
|
child: fileView,
|
||||||
handleDragDone(detail, fileView.controller.isLocal),
|
);
|
||||||
onDragEntered: (enter) {
|
// Disable desktop_drop for now
|
||||||
_dropMaskVisible.value = true;
|
//
|
||||||
},
|
// return DropTarget(
|
||||||
onDragExited: (exit) {
|
// onDragDone: (detail) =>
|
||||||
_dropMaskVisible.value = false;
|
// handleDragDone(detail, fileView.controller.isLocal),
|
||||||
},
|
// onDragEntered: (enter) {
|
||||||
child: fileView);
|
// _dropMaskVisible.value = true;
|
||||||
|
// },
|
||||||
|
// onDragExited: (exit) {
|
||||||
|
// _dropMaskVisible.value = false;
|
||||||
|
// },
|
||||||
|
// child: fileView);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget generateCard(Widget child) {
|
Widget generateCard(Widget child) {
|
||||||
@ -316,22 +322,24 @@ class _FileManagerPageState extends State<FileManagerPage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void handleDragDone(DropDoneDetails details, bool isLocal) {
|
// Disable desktop_drop for now
|
||||||
if (isLocal) {
|
//
|
||||||
// ignore local
|
// void handleDragDone(DropDoneDetails details, bool isLocal) {
|
||||||
return;
|
// if (isLocal) {
|
||||||
}
|
// // ignore local
|
||||||
final items = SelectedItems(isLocal: false);
|
// return;
|
||||||
for (var file in details.files) {
|
// }
|
||||||
final f = File(file.path);
|
// final items = SelectedItems(isLocal: false);
|
||||||
items.add(Entry()
|
// for (var file in details.files) {
|
||||||
..path = file.path
|
// final f = File(file.path);
|
||||||
..name = file.name
|
// items.add(Entry()
|
||||||
..size = FileSystemEntity.isDirectorySync(f.path) ? 0 : f.lengthSync());
|
// ..path = file.path
|
||||||
}
|
// ..name = file.name
|
||||||
final otherSideData = model.localController.directoryData();
|
// ..size = FileSystemEntity.isDirectorySync(f.path) ? 0 : f.lengthSync());
|
||||||
model.remoteController.sendFiles(items, otherSideData);
|
// }
|
||||||
}
|
// final otherSideData = model.localController.directoryData();
|
||||||
|
// model.remoteController.sendFiles(items, otherSideData);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
class FileManagerView extends StatefulWidget {
|
class FileManagerView extends StatefulWidget {
|
||||||
|
@ -38,7 +38,7 @@ dependencies:
|
|||||||
wakelock: ^0.6.2
|
wakelock: ^0.6.2
|
||||||
device_info_plus: ^4.1.2
|
device_info_plus: ^4.1.2
|
||||||
#firebase_analytics: ^9.1.5
|
#firebase_analytics: ^9.1.5
|
||||||
package_info_plus: ^1.4.2
|
package_info_plus: ^3.1.0
|
||||||
url_launcher: ^6.0.9
|
url_launcher: ^6.0.9
|
||||||
toggle_switch: ^1.4.0
|
toggle_switch: ^1.4.0
|
||||||
dash_chat_2: ^0.0.14
|
dash_chat_2: ^0.0.14
|
||||||
@ -70,7 +70,8 @@ dependencies:
|
|||||||
get: ^4.6.5
|
get: ^4.6.5
|
||||||
visibility_detector: ^0.3.3
|
visibility_detector: ^0.3.3
|
||||||
contextmenu: ^3.0.0
|
contextmenu: ^3.0.0
|
||||||
desktop_drop: ^0.3.3
|
# Disable desktop_drop for now, because it may cause crash on Win11 when destructing.
|
||||||
|
# desktop_drop: ^0.4.1
|
||||||
scroll_pos: ^0.3.0
|
scroll_pos: ^0.3.0
|
||||||
debounce_throttle: ^2.0.0
|
debounce_throttle: ^2.0.0
|
||||||
file_picker: ^5.1.0
|
file_picker: ^5.1.0
|
||||||
@ -109,6 +110,9 @@ dev_dependencies:
|
|||||||
flutter_lints: ^2.0.0
|
flutter_lints: ^2.0.0
|
||||||
ffigen: ^7.2.4
|
ffigen: ^7.2.4
|
||||||
|
|
||||||
|
dependency_overrides:
|
||||||
|
intl: ^0.17.0-nullsafety.2
|
||||||
|
|
||||||
# rerun: flutter pub run flutter_launcher_icons
|
# rerun: flutter pub run flutter_launcher_icons
|
||||||
flutter_icons:
|
flutter_icons:
|
||||||
image_path: "../res/icon.png"
|
image_path: "../res/icon.png"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user