lucky_dart 1.1.0 copy "lucky_dart: ^1.1.0" to clipboard
lucky_dart: ^1.1.0 copied to clipboard

A framework for building elegant and maintainable API integrations in Dart/Flutter, inspired by Saloon PHP. Lucky Dart makes your API calls fast and elegant!

Changelog #

1.1.0 - 2026-02-20 #

Added #

  • LuckyLogCallback and LuckyDebugCallback named typedefs exported from the package — use them to annotate your own callback variables instead of repeating the verbose inline function types
  • LuckyParseException extends LuckyException — thrown by response parsing helpers when the body cannot be cast to the expected type; exposes cause (the original TypeError) and a descriptive message ("Expected Map<String, dynamic>, got String")

Changed #

  • LuckyResponse.json(), jsonList(), text(), bytes() now throw LuckyParseException instead of a raw TypeError on type mismatch

1.0.2 - 2026-02-19 #

Fixed #

  • Simplify example: single connector, linear flow, no redundant class

1.0.1 - 2026-02-19 #

Fixed #

  • Add example/lucky_dart_example.dart for pub.dev scoring
  • Document implicit constructors on Authenticator and ConfigMerger
  • Fix repository URL in pubspec.yaml (owlnext-fr/lucky)

All notable changes to Lucky Dart will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

1.0.0 - 2026-02-19 #

Added #

  • Core layer — abstract Connector, Request, LuckyResponse, ConfigMerger
  • Body mixinsHasJsonBody, HasFormBody, HasMultipartBody, HasXmlBody, HasTextBody, HasStreamBody
  • AuthenticationAuthenticator interface, TokenAuthenticator, BasicAuthenticator, QueryAuthenticator, HeaderAuthenticator
  • Pluggable per-request authConnector.authenticator (runtime-mutable getter), Connector.useAuth, Request.useAuth (bool? override)
  • InterceptorsLoggingInterceptor, DebugInterceptor (callback-based, no logging dependency)
  • Typed exceptionsLuckyException, ConnectionException, LuckyTimeoutException, NotFoundException (404), UnauthorizedException (401), ValidationException (422)
  • Dio integrationvalidateStatus: (_) => true so Lucky controls all HTTP error handling, not Dio
  • Full English dartdoc on all public APIs
  • 112 tests (89 unit + 13 integration via dart:io mock server)
0
likes
0
points
283
downloads

Publisher

verified publisherowlnext.fr

Weekly Downloads

A framework for building elegant and maintainable API integrations in Dart/Flutter, inspired by Saloon PHP. Lucky Dart makes your API calls fast and elegant!

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dio

More

Packages that depend on lucky_dart