djangoflow_openapi_extensions 0.0.3+3 copy "djangoflow_openapi_extensions: ^0.0.3+3" to clipboard
djangoflow_openapi_extensions: ^0.0.3+3 copied to clipboard

djangoflow_openapi_extensions is a Flutter package that empowers your Dio error handling in DjangoFlow OpenAPI projects with style and ease.

DjangoFlow Logo

DjangoFlow OpenAPI Extensions 👻

GitHub Repository Pub Package

Overview #

🚀 djangoflow_openapi_extensions is a Flutter package that empowers your Dio error handling in DjangoFlow OpenAPI projects with style and ease. Say goodbye to confusing error messages!

Features #

🎉 Configurable Error Messages: Customize error messages according to your app's vibe.

🔮 Enhanced Error Handling: Transform Dio error messages into user-friendly and meaningful forms.

🛠️ Easy Integration: Effortlessly integrate enhanced error handling into your Dio client.

Installation #

Add the following line to your pubspec.yaml file:

dependencies:
  djangoflow_openapi_extensions: <latest_version>

Usage #

  1. Configure Error Messages:
import 'package:djangoflow_openapi_extensions/djangoflow_openapi_extensions.dart';

void main() {
  // Customize error messages as needed
  final customConfig = ErrorMessageConfig(
    serverUnreachable: 'Cannot reach the server',
    maintenance: 'Under maintenance - try again later',
    // ... other custom messages
  );

  final transformer = ErrorMessageTransformer(config: customConfig);

  final errorInterceptor = ErrorInterceptor(errorMessageTransformer: transformer);

  // Use errorInterceptor with your Dio client
  final dio = Dio();
  dio.interceptors.add(errorInterceptor);
  DjangoflowOpenapi(
    dio:dio
    // other properties...
  );
}
  1. Handling Dio Errors:
try {
  // Make Dio requests
} on DioException catch (error) {
  // Errors will be transformed based on your configuration
  print(error.message);
}

Additiona tools #

Contributing #

🙌 Contributions are welcome! Feel free to submit issues and pull requests to enhance this package.

License #

📜 This package is released under the MIT License.


If you encounter any issues or have questions, please feel free to open an issue.

Happy coding! ✨🚀

0
likes
120
pub points
41%
popularity

Publisher

verified publisherapexive.com

djangoflow_openapi_extensions is a Flutter package that empowers your Dio error handling in DjangoFlow OpenAPI projects with style and ease.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

dio, djangoflow_openapi, flutter

More

Packages that depend on djangoflow_openapi_extensions