djangoflow_openapi_extensions 0.0.1 copy "djangoflow_openapi_extensions: ^0.0.1" to clipboard
djangoflow_openapi_extensions: ^0.0.1 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);
}

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
0
pub points
37%
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.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dio, djangoflow_openapi, flutter

More

Packages that depend on djangoflow_openapi_extensions