$ show nightmare-space/any_share
This is a Flutter-based cross-platform peer-to-peer file sharing application designed for local network transfers without server reliance. The app enables sharing of files, text, clipboard content, and folders between Android, iOS, Windows, macOS, Linux, and Web devices. Architecture follows a modular pattern with GetX for state management, featuring separate controllers (chat, device, settings, download), services (HTTP-based messaging via shelf, file serving, UDP discovery, clipboard), and platform-specific adapters. Key workflows include device discovery via multicast, HTTP-based message/file transfer, and adaptive UI rendering. The application demonstrates solid engineering practices with platform abstraction, reusable UI components, and thoughtful handling of cross-platform file operations, though exhibits some coupling between controllers and platform-specific code paths.
The LLM identified 3 files worth highlighting for reuse:
Implements a highly customizable animated switch with smooth transitions and haptic feedback. Self-contained with minimal dependencies (only Flutter core and internal utils), featuring custom paint logic and configurable animation curves. Easily extractable to any Flutter project needing advanced toggle controls.
Provides robust cross-platform file handling including safe path resolution, MIME type detection, and file size formatting. Isolates platform-specific logic (Android SAF, iOS sandbox, desktop paths) behind a unified API. Demonstrates careful handling of edge cases like permission scopes and URI conversions, making it suitable for reuse in any Flutter file management context.
GestureWithScale widget combines tap detection with visual scale feedback and haptic vibration. Encapsulates common interaction patterns with configurable animation parameters and platform-aware haptics. Low coupling (only depends on Flutter and vibration utils) allows direct reuse in UI components requiring tactile feedback.