shyun_link 2.2.3
shyun_link: ^2.2.3 copied to clipboard
Complete deeplink and short URL management with native platform integration. Ultra-simple ShyunLinkManager API, Android/iOS native setup included, Clean Architecture, and enterprise-grade error handling.
Changelog #
All notable changes to the shyun_link package will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
2.2.3 - 2025-08-12 #
๐ง App Links Integration Improvements #
- Enhanced Guidance: Improved app_links package detection and user guidance
- Manual Integration: Added comprehensive examples for manual app_links setup
- Better Error Messages: More helpful error messages when app_links is not automatically detected
- Documentation Updates: Added detailed integration guide for app_links package
๐ New Examples #
- AppLinks Integration: Added
example/lib/app_links_example.dartwith complete integration examples - Manual Setup Guide: Step-by-step instructions for manual app_links configuration
- Troubleshooting: Enhanced troubleshooting section in documentation
๐ Bug Fixes #
- Detection Issue: Resolved app_links package detection issues that caused false warnings
- User Experience: Improved user experience when app_links package is present but not auto-detected
2.2.2 - 2025-08-12 #
๐ Privacy & Security #
- Domain Sanitization: Removed all personal domain information from package files
- Generic Examples: Replaced
nearound,cocl.nearound.co, andnear.lywith genericmyapp,myapp.com, andmyapp.lyexamples - Package Privacy: Ensured no personal information is exposed in the published package
๐ Documentation Updates #
- Updated all example code and documentation to use generic domain names
- Replaced 64 occurrences of personal domain information across all files
- Maintained full functionality while protecting privacy
2.2.1 - 2025-08-12 #
๐ง Package Structure Improvements #
- ๐ Documentation: Renamed
docs/todoc/following pub.dev conventions - ๐ Links Updated: All documentation links updated to use
doc/paths - ๐ฆ Package Compliance: Fixed pub.dev validation warnings for better package listing
๐ Documentation Path Updates #
- All README.md links now point to
doc/directory - Maintains full compatibility with all documentation guides
- Improved pub.dev package browsing experience
2.2.0 - 2025-08-12 #
๐ Complete Native Platform Integration #
- ๐ฑ Android Native Setup: Complete AndroidManifest.xml configuration with intent filters
- ๐ iOS Native Setup: Full iOS configuration with Info.plist, URL schemes, and Universal Links
- ๐ง Native Plugins: Swift/Kotlin plugins for advanced deep link handling
- ๐ Example Configurations: Ready-to-use native setup files in
/androidand/iosdirectories
๐ ๏ธ Enhanced Developer Experience #
- ๐ Platform Setup Guide: Comprehensive step-by-step native configuration guide
- โก Complete Example App: Updated example with full native integration and testing
- ๐งช Native Testing: Built-in deep link testing with Method Channel integration
- ๐ Updated Documentation: All guides updated with native setup instructions
๐ฏ Production-Ready Features #
- ๐ Universal Link Support: iOS Universal Links with associated domains
- ๐ฑ App Links Support: Android App Links with domain verification
- ๐จ Custom URL Schemes: Both platforms support custom scheme deep links
- ๐ Fallback Mechanisms: Graceful degradation when native features unavailable
๐ฆ Native File Structure #
android/
โโโ src/main/AndroidManifest.xml # Intent filter configuration
โโโ src/main/kotlin/MainActivity.kt # Deep link handling example
โโโ src/main/kotlin/DeepLinkPlugin.kt # Advanced plugin (optional)
ios/
โโโ Classes/SwiftShyunLinkPlugin.swift # Swift deep link plugin
โโโ Classes/ShyunLinkPlugin.m # Objective-C bridge
โโโ Classes/ShyunLinkPlugin.h # Header file
โโโ shyun_link.podspec # CocoaPods specification
โโโ Info.plist.example # iOS configuration template
๐งช Testing & Validation #
- ADB Commands: Android deep link testing with adb shell commands
- iOS Simulator: xcrun simctl testing for iOS deep links
- Native-Flutter Bridge: Method Channel integration for testing
- Real Device Testing: QR codes, browser testing, and messenger integration
๐ Usage Before vs After #
Before (v2.1.0):
// Flutter only - native setup required separately
await ShyunLinkManager.initialize(...);
After (v2.2.0):
// Flutter setup (same as before)
await ShyunLinkManager.initialize(...);
// + Complete native files included in package
// + Step-by-step platform setup guide
// + Working example with native integration
// + Testing tools and validation methods
๐ Documentation Updates #
- Platform Setup Guide: Complete Android/iOS configuration
- Easy Usage Guide: Updated with native setup requirements
- Example App: Complete native integration demonstration
- INDEX.md: Updated documentation structure and navigation
2.1.0 - 2025-08-11 #
๐ Major Features #
- ๐ฏ Ultra-Simple API: Introduced
ShyunLinkManager- a convenience wrapper that reduces setup from 50+ lines to just 5 lines! - ๐ฑ One-Line Initialization: Complete deeplink system initialization with automatic listeners, error handling, and fallback mechanisms
- ๐ Convenience Methods: Added dedicated methods for common operations:
ShyunLinkManager.shareStore(),shareCuration(),shareEvent(),shareApp()ShyunLinkManager.createShortLink()with simplified parametersShyunLinkManager.createBatchLinks()for multiple link creation
โจ Enhanced User Experience #
- ๐ค Automatic Setup: Auto-configures AppLinks listeners, duplicate prevention, and error recovery
- ๐ Smart Context Parsing:
DeepLinkContextclass provides structured deeplink information - ๐๏ธ Flexible Configuration: Optional app_links dependency with graceful degradation
- ๐ Built-in Debugging: Comprehensive logging and system status reporting
๐๏ธ Architecture Improvements #
- ๐ Service Pattern Independence:
ShyunLinkServicenow completely independent from deprecatedDeepLinkFacade - ๐งฉ Direct Dependency Injection: Service receives dependencies directly instead of wrapping facade
- โก Improved Performance: Eliminated wrapper layer for better performance
- ๐ฆ Zero External Dependencies: Works without GetX or other DI frameworks
๐ Documentation Overhaul #
- ๐ Easy Usage Guide: New
EASY_USAGE_GUIDE.mdfor 5-minute setup - ๐ Updated Short Link Guide: Completely rewritten
SHORTLINK_GUIDE.mdwith new API - ๐ Migration Guide:
MIGRATION_GUIDE.mdfor smooth transition from facade to service pattern - ๐ก Best Practices: Comprehensive troubleshooting and optimization tips
๐ง Developer Experience #
- 90% Code Reduction: From 50+ lines of complex setup to 5 lines of simple configuration
- Type Safety: Strongly typed
DeepLinkContextwithpageType,pageId, andparams - Error Recovery: Automatic fallback mechanisms with detailed error reporting
- Multi-Project Ready: Designed for easy reuse across multiple projects
๐ Usage Before vs After #
Before (v2.0.x):
// Complex 50+ line setup with manual AppLinks configuration
static Future<void> _initializeDeepLinkSystem() async {
final config = ShyunLinkConfig.defaults(...);
ShyunLink.initialize(config: config);
await _setupDeepLinkListener(); // Complex manual setup
// ... lots of boilerplate code
}
After (v2.1.0):
// Simple 5-line setup - everything automated!
await ShyunLinkManager.initialize(
appScheme: 'myapp',
webBaseUrl: 'https://myapp.com',
onDeepLink: (context) => Navigator.pushNamed(context.route),
);
// Easy link creation and sharing
await ShyunLinkManager.shareStore(12345);
โ ๏ธ Deprecation Notice #
DeepLinkFacadeis now deprecated and will be removed in v3.0.0- Use
ShyunLinkServicedirectly or the newShyunLinkManagerfor convenience - Existing code continues to work but will show deprecation warnings
2.0.1 - 2025-08-12 #
๐ง Fixed #
- Critical Bug Fix: Fixed
pageTypeandpageIdparameters being sent as null in API requests - URL Parsing Enhancement: Added intelligent URL parsing to extract
pageType,pageId, anddeepLinkPathfrom query parameters and URL paths - DeepLinkFacade Improvement: Enhanced
createLink()method to automatically detect and use appropriate factory methods based on URL content
โจ Enhanced #
- Automatic Parameter Extraction: The system now automatically extracts:
pageTypefrom URL?type=parameterpageIdfrom URL?id=parameterdeepLinkPathfrom URL path (e.g.,/curationDetailโcurationDetail) or?deepLinkPath=parameter
- Smart Factory Method Selection:
- Curation URLs automatically use
createCurationRequest() - Store URLs automatically use
createStoreRequest() - Other URLs use
createPageRequest()with extracted parameters
- Curation URLs automatically use
- Enhanced Factory Methods: Added optional
deepLinkPathparameter to:createCurationRequest()createStoreRequest()
๐ Documentation #
- New Comprehensive Guide: Added
SHORTLINK_GUIDE.mdwith complete usage examples - Best Practices: Included troubleshooting tips and best practices for short link creation
- Real-world Examples: Added practical examples including ProductLinkService implementation
โก Performance #
- Fallback Strategy: Added robust error handling with graceful fallback to generic requests when URL parsing fails
- URL Validation: Enhanced URL format validation before processing
This update ensures that pageType and pageId are correctly included in all API requests, resolving the critical issue where these parameters were being sent as null.
2.0.0 - 2025-08-10 #
๐ฅ Breaking Changes #
- API Alignment: Refactored core data models (
ShortLinkEntity,CreateShortLinkRequest) to align with the backend API specification. This is a major breaking change affecting how short links are created and parsed. - Simplified Fields: Removed
customAlias,expiresAt, andmetadatafromCreateShortLinkRequestto match the new API DTO. - Entity Structure:
ShortLinkEntitynow includespageType,pageId, anddeepLinkPathdirectly, and no longer contains a nestedShortLinkStatsobject in its constructor for API responses.
๐ง Fixed #
- Compilation Errors: Fixed all compilation errors across the facade, factory, and repository layers caused by the data model refactoring.
- In-Memory Repository: Updated
MemoryShortLinkRepositoryto correctly handle the new entity structure and request objects.
โจ Improved #
- API-First Design: The data models are now a direct reflection of the backend API, ensuring more reliable network communication.
- Code Consistency: Ensured that all layers of the application now use the same, consistent data structures for creating and handling short links.
1.0.2 - 2025-08-09 #
๐ Major Improvements #
- HTTP Repository: Enabled HTTP repository by default (
useHttpRepository: true) - Real HTTP Client: Replaced mock HTTP client with actual Dio implementation
- Network Logging: Added comprehensive request/response logging for debugging
- Error Handling: Enhanced DioException handling with detailed error messages
๐ง Fixed #
- NoSuchMethodError: Fixed
createShortLink()method not existing (usecreateLink()instead) - Mock HTTP Client: Replaced with real Dio-based HTTP client for actual network requests
- Network Requests: HTTP requests now actually reach the configured API server
- Debug Logging: Added detailed logging to track network requests and responses
๐ API Clarification #
- Correct Method: Use
createLink(GenericLinkRequest)instead of non-existentcreateShortLink() - Share Methods:
share()andshareLink()return void (not null) - this is expected behavior - GenericLinkRequest.curation(): Confirmed working correctly with
curationTypeandidparameters
โก Performance #
- Real Network Requests: HTTP calls now use Dio client with proper timeout and error handling
- Request Interceptors: Added logging interceptors for debugging network issues
- Connection Management: Proper connection pooling and timeout configuration
1.0.1 - 2025-08-09 #
๐ง Fixed #
- Repository Selection: Fixed HTTP repository not being used when
useHttpRepository: true - System Initializer: Added conditional repository initialization based on configuration
- Fallback Mechanism: Added graceful fallback to memory repository when HTTP repository fails
โจ Improved #
- Testing Support: Added
repositoryTypegetter for testing repository selection - Error Handling: Enhanced error handling with fallback strategies
1.0.0 - 2025-08-08 #
๐ Initial Release #
โจ Added
-
Core Domain Entities
DeepLinkEntity- Comprehensive deep link representationShortLinkEntity- Short URL management with analyticsNavigationRouteEntity- Route configuration and metadataResult<T>- Functional error handling pattern
-
DeepLink Management System
- Universal Link Support for both app schemes and web URLs
- Parametrized link processing with query parameter extraction
- Fallback strategies for handling unknown or malformed links
- Route validation to ensure links point to valid destinations
- Preview mode for debugging and testing deeplinks
-
Short URL System
- HTTP-based short link creation and management
- Click analytics with geographic, device, and referrer tracking
- Expiration management with time-based link expiration
- Custom alias support for branded short links
- Batch operations for efficient multiple link creation
-
Framework-Agnostic DI System
- Support for GetX, get_it, Provider, and built-in DI
- Automatic adapter detection and initialization
- Custom adapter interface for extending to other DI frameworks
- Comprehensive lifecycle management with disposable pattern
-
Configuration Management
- Environment-based configuration (development, staging, production)
- Runtime configuration modification without rebuilding
- Security controls including domain whitelisting and rate limiting
- Performance tuning with caching and request optimization
-
Enterprise Features
- Comprehensive logging with debug, performance, and error tracking
- Type safety with full Dart null safety support
- Testing utilities with built-in mocks and test helpers
- Performance optimization with caching and request coalescing
๐๏ธ Architecture Components
- Domain Layer: Pure business logic with entities, repositories, and services
- Application Layer: Use cases, factories, and facades orchestrating domain logic
- Infrastructure Layer: External integrations, HTTP clients, and platform services
- Configuration Layer: Framework-agnostic setup and dependency management
๐ง Integration Points
- GetX Integration: Seamless integration with GetX state management and routing
- get_it Integration: Support for get_it service locator pattern
- Built-in DI: No external dependencies required for basic functionality
- Custom DI: Extensible adapter pattern for any DI framework
๐ฑ Platform Support
- โ Android - App Links and Custom Schemes
- โ iOS - Universal Links and Custom Schemes
- โ Web - URL Routing with History API
- โ macOS - Custom URL Schemes
- โ Windows - Protocol Registration
- โ Linux - Desktop Integration
๐งช Testing Support
- Unit test utilities with mock implementations
- Integration test helpers for end-to-end scenarios
- Test configuration presets for different environments
- Comprehensive example app demonstrating all features
๐ Documentation
- Complete README with quickstart guide
- API documentation with detailed examples
- Architecture overview with diagrams
- Migration guides for existing implementations
- Best practices and common patterns
๐ก๏ธ Security Features #
- URL validation with configurable domain whitelisting
- Rate limiting to prevent abuse
- Input sanitization and validation
- Secure error handling without information leakage
โก Performance Features #
- Request caching with configurable timeout
- Request coalescing to prevent duplicate operations
- Lazy loading of non-critical components
- Memory-efficient data structures
- Optimized batch operations
๐ Debugging & Monitoring #
- Detailed logging with configurable levels
- Performance metrics and timing information
- Error tracking with context preservation
- System status reporting and diagnostics
- Preview mode for deeplink testing
[Unreleased] #
๐ฎ Planned Features #
- Analytics dashboard integration
- A/B testing support for deeplinks
- Advanced caching strategies
- GraphQL integration for short links
- Custom domain support
- QR code generation
- Link expiration notifications
- Webhook integration for link events
Migration Guide #
From Custom Implementation #
If you're migrating from a custom deeplink implementation:
-
Install the package:
dependencies: flutter_deeplink_architect: ^1.0.0 -
Initialize the system:
final config = DeepLinkConfig.defaults( appScheme: 'your-app-scheme', baseUrl: 'https://your-domain.com', ); await DeepLinkArchitect.initialize(config); -
Replace deeplink handling:
// Old way void handleDeepLink(String url) { // Custom parsing and routing logic } // New way final facade = DIContainer.get<DeepLinkFacade>(); final success = await facade.handleDeepLink(url); -
Update short link creation:
// Old way final shortUrl = await createShortLink(originalUrl); // New way final shortUrl = await facade.createPageLink( pageType: 'product', pageId: productId, originalUrl: originalUrl, );
Breaking Changes #
- None (initial release)
Deprecations #
- None (initial release)
For more information, visit our GitHub repository.