wukong_easy_sdk 1.0.1
wukong_easy_sdk: ^1.0.1 copied to clipboard
A lightweight Flutter SDK for WuKongIM that enables real-time chat functionality in 5 minutes.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.1 - 2025-08-08 #
Added #
- Add GitHub Actions workflow for automated testing and publishing
- Add OIDC authentication for secure package publishing
- Add documentation for automated publishing process
- Add documentation for OIDC authentication setup
1.0.0 - 2025-01-06 #
Added #
- Initial release of WuKong Easy SDK for Flutter
- WebSocket-based real-time communication with WuKongIM server
- JSON-RPC protocol implementation
- Singleton SDK pattern with
WuKongEasySDK.getInstance()
- Configuration-driven initialization with
WuKongConfig
- Event-driven architecture with type-safe event listeners
- Support for multiple event listeners per event type
- Automatic reconnection with exponential backoff
- Ping/pong heartbeat mechanism
- Message sending and receiving functionality
- Comprehensive error handling with custom exception types
- Cross-platform support (iOS, Android, Web, Desktop)
Core Features #
- Connection Management: Connect, disconnect, and automatic reconnection
- Message Handling: Send and receive messages with acknowledgments
- Event System: Connect, disconnect, message, and error events
- Type Safety: Full Dart type safety with null safety support
- Error Handling: Specific exception types for different error scenarios
API Components #
WuKongEasySDK
- Main SDK class with singleton patternWuKongConfig
- Configuration class for server connectionWuKongEvent
- Event types enum (connect, disconnect, message, error)WuKongChannelType
- Channel types enum (person, group, etc.)WuKongDeviceFlag
- Device flag enum (app, web)ConnectResult
- Connection result data classDisconnectInfo
- Disconnection information data classMessage
- Received message data classMessagePayload
- Message payload data classSendResult
- Message send result data classWuKongError
- Error information data class
Exception Types #
WuKongNotConnectedException
- Thrown when not connectedWuKongInvalidChannelException
- Thrown for invalid channelsWuKongMessageTooLargeException
- Thrown for oversized messagesWuKongAuthenticationException
- Thrown for auth failuresWuKongConnectionTimeoutException
- Thrown for timeoutsWuKongNetworkException
- Thrown for network errorsWuKongConfigurationException
- Thrown for config errorsWuKongProtocolException
- Thrown for protocol errors
Documentation #
- Comprehensive README with quick start guide
- API reference documentation
- Best practices for event listener management
- Example application demonstrating all features
- Unit tests covering core functionality
Dependencies #
web_socket_channel: ^3.0.0
- Cross-platform WebSocket supportuuid: ^4.0.0
- UUID generation for message IDs
Requirements #
- Flutter 3.0.0 or higher
- Dart 2.17.0 or higher