VB10 / vexana

Vexana is network manager project with dio.
https://pub.dev/packages/vexana
MIT License
147 stars 42 forks source link

Improve Network Model #102

Closed mysCod3r closed 2 months ago

mysCod3r commented 3 months ago

Improved Network Handling and Added New Method sendRequest

Description

This PR introduces significant improvements to the Vexana package, focusing on enhancing network handling and ensuring backward compatibility. The key changes include:

1. New Method sendRequest

Reason: The current send method, while functional, lacks the flexibility and robustness needed for more complex HTTP requests and responses.

2. Deprecation of send Method

Reason: To ensure backward compatibility while encouraging users to migrate to the new and improved method.

3. NetworkResult Improvements

Reason: Enhance error handling and reduce unnecessary null checks, making the codebase cleaner and more maintainable.

4. Additional Methods

Reason: Provide utility methods to streamline response handling and error management, improving overall code quality and maintainability.

5. Documentation

Reason: Ensure that users have clear guidance on how to use the new and modified methods.

6. Unit Tests

Reason: Ensure code reliability and functionality by thoroughly testing new and modified methods.

Changes

Testing

Migration Guide

Users are encouraged to start using the sendRequest method. The send method is deprecated but still available for use. It will be removed in future versions, so migrating to sendRequest is recommended.

Closing

These changes aim to enhance the functionality and maintainability of the Vexana package. Feedback and suggestions are welcome to further improve the package.

Thank you for considering this PR!

MehmetKaranlik commented 3 months ago

For deprecation case @VB10 need to decide, mb we want to keep both versions.

VB10 commented 2 months ago

@mysCod3r could you fix this conflict

mysCod3r commented 2 months ago

@mysCod3r could you fix this conflict

Sure. resolved @VB10

VB10 commented 2 months ago

@mysCod3r unit test has some issue could you check it again?

mysCod3r commented 2 months ago

@mysCod3r unit test has some issue could you check it again?

I checked and saw that 'MockNetworkManager' was duplicated and Implementation missing in CustomNetworkManager. I fixed both.