Feature Request: Drag & drop file to upload #490

This commit is contained in:
Hillel Coren 2023-05-31 21:50:17 +03:00
parent c9c2436894
commit da08ac02d8
8 changed files with 21 additions and 0 deletions

View File

@ -6,6 +6,7 @@
#include "generated_plugin_registrant.h"
#include <desktop_drop/desktop_drop_plugin.h>
#include <printing/printing_plugin.h>
#include <screen_retriever/screen_retriever_plugin.h>
#include <sentry_flutter/sentry_flutter_plugin.h>
@ -14,6 +15,9 @@
#include <window_manager/window_manager_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) desktop_drop_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "DesktopDropPlugin");
desktop_drop_plugin_register_with_registrar(desktop_drop_registrar);
g_autoptr(FlPluginRegistrar) printing_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "PrintingPlugin");
printing_plugin_register_with_registrar(printing_registrar);

View File

@ -3,6 +3,7 @@
#
list(APPEND FLUTTER_PLUGIN_LIST
desktop_drop
printing
screen_retriever
sentry_flutter

View File

@ -5,6 +5,7 @@
import FlutterMacOS
import Foundation
import desktop_drop
import in_app_purchase_storekit
import in_app_review
import package_info
@ -22,6 +23,7 @@ import url_launcher_macos
import window_manager
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
DesktopDropPlugin.register(with: registry.registrar(forPlugin: "DesktopDropPlugin"))
InAppPurchasePlugin.register(with: registry.registrar(forPlugin: "InAppPurchasePlugin"))
InAppReviewPlugin.register(with: registry.registrar(forPlugin: "InAppReviewPlugin"))
FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin"))

View File

@ -78,6 +78,7 @@ dependencies:
# bitsdojo_window: ^0.1.5
intl_phone_field: ^3.1.0
flutter_staggered_grid_view: ^0.6.2
desktop_drop: ^0.4.1
# quick_actions: ^0.2.1
# idb_shim: ^1.11.1+1

View File

@ -297,6 +297,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.2.4"
desktop_drop:
dependency: "direct main"
description:
name: desktop_drop
sha256: "4ca4d960f4b11c032e9adfd2a0a8ac615bc3fddb4cbe73dcf840dd8077582186"
url: "https://pub.dev"
source: hosted
version: "0.4.1"
diacritic:
dependency: "direct main"
description:

View File

@ -84,6 +84,7 @@ dependencies:
# bitsdojo_window: ^0.1.5
intl_phone_field: ^3.1.0
flutter_staggered_grid_view: ^0.6.2
desktop_drop: ^0.4.1
# quick_actions: ^0.2.1
# idb_shim: ^1.11.1+1

View File

@ -6,6 +6,7 @@
#include "generated_plugin_registrant.h"
#include <desktop_drop/desktop_drop_plugin.h>
#include <local_auth_windows/local_auth_plugin.h>
#include <printing/printing_plugin.h>
#include <screen_retriever/screen_retriever_plugin.h>
@ -16,6 +17,8 @@
#include <window_manager/window_manager_plugin.h>
void RegisterPlugins(flutter::PluginRegistry* registry) {
DesktopDropPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("DesktopDropPlugin"));
LocalAuthPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("LocalAuthPlugin"));
PrintingPluginRegisterWithRegistrar(

View File

@ -3,6 +3,7 @@
#
list(APPEND FLUTTER_PLUGIN_LIST
desktop_drop
local_auth_windows
printing
screen_retriever