rt_api 1.0.5 copy "rt_api: ^1.0.5" to clipboard
rt_api: ^1.0.5 copied to clipboard

A RulTech API project.

Changelog #

All notable changes to the RT API package will be documented in this file.

0.0.2 - 2025-11-09 #

Added #

  • Debug Logging System: Comprehensive debug logging that only activates in debug mode (kDebugMode)

    • Logs API initialization, configuration, requests, responses, and errors
    • Visual indicators: ✅ for info logs, ❌ for error logs
    • Controlled via showDebugLog() method (enabled by default)
    • Zero performance impact in release builds
    • Detailed logging for all HTTP methods (GET, POST, PUT, PATCH, DELETE)
    • Request/response tracking with status codes, headers, body, and query parameters
    • Exception type identification in error logs
  • Custom Allowed Status Codes: Support for configurable success status codes

    • New allowedStatusCodes parameter in constructors
    • Defaults to [200] but can be customized (e.g., [200, 201, 204])
    • Allows flexible response validation based on API requirements

Changed #

  • Replaced flutter/material.dart import with flutter/foundation.dart for better dependency management
  • Enhanced error logging with detailed exception information
  • Improved response processing with comprehensive debug output
  • Default _showDebugLog now set to true for better development experience

Documentation #

  • Comprehensive README Update: Expanded from basic placeholder to complete technical reference (524 lines)
    • Added detailed usage examples for all HTTP methods
    • Complete environment requirements and dependencies documentation
    • Architecture overview with response flow visualization
    • Package structure diagram
    • Design principles and best practices
    • Performance considerations and security features
    • Testing guidelines
  • Technical Information: Verified and updated with actual development environment details
    • Flutter 3.32.0, Dart 3.8.0
    • macOS 26.0.1, Xcode 26.1
    • Android SDK 36.1.0, Java OpenJDK 21.0.8

Technical Details #

  • Debug logging uses kDebugMode constant to ensure production safety
  • All API lifecycle events now logged: initialization, requests, responses, errors
  • Logging includes: URLs, headers, query parameters, request bodies, response status, data types
  • Error logs include exception types and stack traces where applicable

0.0.1 Initial Release #

Features #

  • Initial implementation of RT API package
  • Callback-based API handler with two patterns (ApiHandler and ClassApiHandler)
  • GetX GetConnect integration for HTTP operations
  • Automatic connectivity detection via connectivity_plus
  • Bearer token management with GetStorage
  • Fluent API configuration with chainable methods
  • Automatic error handling and snackbar support
  • Support for GET, POST, PUT, PATCH, DELETE HTTP methods
  • ApiSuccess and ApiError response models
  • Status code constants for common scenarios
  • Base URL configuration via GetStorage or AppString mixin
  • Timeout and retry configuration
  • Custom header support
0
likes
115
points
99
downloads

Documentation

API reference

Publisher

verified publisherrultech.com

Weekly Downloads

A RulTech API project.

Homepage

License

MIT (license)

Dependencies

connectivity_plus, flutter, get, get_storage

More

Packages that depend on rt_api