windows_screen_guard 0.1.2
windows_screen_guard: ^0.1.2 copied to clipboard
Prevent screen capture, recording, and PrintScreen on Flutter Windows apps using the Windows display affinity API — the same method used by Netflix and banking apps.
0.1.2 #
- Drop
win32dependency — rewritten with raw Dart FFI againstuser32.dllandkernel32.dlldirectly. Eliminates thewin32version constraint that was blocking the pub points downgrade test. - Replace
WNDENUMPROCtypedef alias with an explicitInt32 Function(IntPtr, IntPtr)native type — compatible with allffiversions from^2.1.0. - Resolves 0/20 pub points on "Compatible with dependency constraint lower bounds".
0.1.1 #
- Fix critical FFI bug:
EnumWindowscallback was a closure — moved to a top-level function as required by Dart FFI. - Fix:
user32.dllwas opened at module init on all platforms — now lazy-initialised, never touched on non-Windows. - Fix:
isPrintScreenBlockednow correctly returnsfalseon non-Windows platforms. - Rewrite README with professional structure, standardized API docs, and coverage table.
- Remove placeholder GIFs.
0.1.0 #
- Initial release.
WindowsScreenGuard.protect()— blocks all screen capture viaSetWindowDisplayAffinity(WDA_MONITOR).WindowsScreenGuard.unprotect()— removes display affinity protection.WindowsScreenGuard.blockPrintScreen()— installs a low-level keyboard hook to swallowVK_SNAPSHOT.WindowsScreenGuard.unblockPrintScreen()— removes the keyboard hook.WindowsScreenGuard.isPrintScreenBlocked— query hook state.ScreenGuardResult— carries success flag and Win32 error code on failure.- All methods are no-ops on non-Windows platforms.