Skip to content

Commit e4029c6

Browse files
cleaner
1 parent 9ee53b9 commit e4029c6

File tree

6 files changed

+45
-95
lines changed

6 files changed

+45
-95
lines changed

permission_handler/pubspec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ dependencies:
2727
permission_handler_android: ^13.0.0
2828
permission_handler_apple: ^9.4.6
2929
permission_handler_html: ^0.1.1
30-
permission_handler_windows: ^0.2.1
30+
permission_handler_windows:
31+
path: ../permission_handler_windows
3132
permission_handler_platform_interface: ^4.3.0
3233

3334
dev_dependencies:

permission_handler_windows/windows/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ include_directories(BEFORE SYSTEM ${CMAKE_BINARY_DIR}/include)
4242

4343
add_library(${PLUGIN_NAME} SHARED
4444
"include/permission_handler_windows/permission_handler_windows_plugin.h"
45-
"include/permission_handler/permission_handler_plugin.h"
45+
"include/permission_handler_windows/permission_handler_plugin.h"
4646
"permission_handler_windows_plugin.cpp"
4747
)
4848
apply_standard_settings(${PLUGIN_NAME})
Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,23 @@
11
#ifndef PACKAGES_PERMISSION_HANDLER_PERMISSION_HANDLER_WINDOWS_WINDOWS_INCLUDE_PERMISSION_HANDLER_PERMISSION_HANDLER_PLUGIN_H_
22
#define PACKAGES_PERMISSION_HANDLER_PERMISSION_HANDLER_WINDOWS_WINDOWS_INCLUDE_PERMISSION_HANDLER_PERMISSION_HANDLER_PLUGIN_H_
33

4-
// Compatibility header for permission_handler_windows plugin
5-
// This header redirects to the actual plugin header to maintain compatibility
6-
#include "../permission_handler_windows/permission_handler_windows_plugin.h"
4+
#include <flutter/plugin_registrar.h>
5+
6+
#ifdef FLUTTER_PLUGIN_IMPL
7+
#define FLUTTER_PLUGIN_EXPORT __declspec(dllexport)
8+
#else
9+
#define FLUTTER_PLUGIN_EXPORT __declspec(dllimport)
10+
#endif
11+
12+
#if defined(__cplusplus)
13+
extern "C" {
14+
#endif
15+
16+
FLUTTER_PLUGIN_EXPORT void PermissionHandlerWindowsPluginRegisterWithRegistrar(
17+
FlutterDesktopPluginRegistrarRef registrar);
18+
19+
#if defined(__cplusplus)
20+
} // extern "C"
21+
#endif
722

823
#endif // PACKAGES_PERMISSION_HANDLER_PERMISSION_HANDLER_WINDOWS_WINDOWS_INCLUDE_PERMISSION_HANDLER_PERMISSION_HANDLER_PLUGIN_H_
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#ifndef PACKAGES_PERMISSION_HANDLER_PERMISSION_HANDLER_WINDOWS_WINDOWS_INCLUDE_PERMISSION_HANDLER_WINDOWS_PERMISSION_HANDLER_PLUGIN_H_
2+
#define PACKAGES_PERMISSION_HANDLER_PERMISSION_HANDLER_WINDOWS_WINDOWS_INCLUDE_PERMISSION_HANDLER_WINDOWS_PERMISSION_HANDLER_PLUGIN_H_
3+
4+
#include <flutter/plugin_registrar.h>
5+
6+
#ifdef FLUTTER_PLUGIN_IMPL
7+
#define FLUTTER_PLUGIN_EXPORT __declspec(dllexport)
8+
#else
9+
#define FLUTTER_PLUGIN_EXPORT __declspec(dllimport)
10+
#endif
11+
12+
#if defined(__cplusplus)
13+
extern "C" {
14+
#endif
15+
16+
FLUTTER_PLUGIN_EXPORT void PermissionHandlerWindowsPluginRegisterWithRegistrar(
17+
FlutterDesktopPluginRegistrarRef registrar);
18+
19+
#if defined(__cplusplus)
20+
} // extern "C"
21+
#endif
22+
23+
#endif // PACKAGES_PERMISSION_HANDLER_PERMISSION_HANDLER_WINDOWS_WINDOWS_INCLUDE_PERMISSION_HANDLER_WINDOWS_PERMISSION_HANDLER_PLUGIN_H_

permission_handler_windows/windows/permission_handler_windows_plugin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "include/permission_handler_windows/permission_handler_windows_plugin.h"
1+
#include "include/permission_handler_windows/permission_handler_plugin.h"
22

33
#include <flutter/method_channel.h>
44
#include <flutter/plugin_registrar_windows.h>

test_permission_app/pubspec.yaml

Lines changed: 0 additions & 89 deletions
This file was deleted.

0 commit comments

Comments
 (0)