Uno - Future based HTTP client for the Dart and Flutter.


Logo

Uno, inspired by Axios, bringing a simple and robust experience to the crossplatform apps in Flutter and server apps in Dart.
Explore the docs »

View Demo · Report Bug · Request Feature


License Pub Points Contributors Forks

Pub Publisher Flutterando Youtube


Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project


Uno PNG

Uno brings a simple and robust experience to the crossplatform apps in Flutter and server apps in Dart.

(back to top)

Sponsors

Logo

(back to top)


Getting Started

To install Uno in your project you can follow the instructions below:

a) Add in your pubspec.yaml:

   dependencies:
   uno: <last-version>

b) or use:

   dart pub add uno

(back to top)

How To Use

Uno is ready for the REST. Methods like GET, POST, PUT, PATCH, DELETE are welcome here!

Performing a GET request:

final uno = Uno();

// Make a request for a user with a given ID
uno.get('/users?id=1').then((response){
  print(response.data); // it's a Map<String, dynamic>.
}).catchError((error){
  print(error) // It's a UnoError.
});

// Optionally the request above could also be done as
uno.get('/users',params: {
  'id': '1',
}).then((response){
  print(response.data);
});

// Want to use async/await? Add the `async` keyword to your outer function/method.
Future<void> getUser() async {
  try {
    final response = await uno.get('/user?ID=12345');
    print(response.data);
  } on UnoError catch (error) {
    print(error);
  }
}

Performing a POST request:

  uno.post('/user', data: {
    'firstName': 'Fred',
    'lastName': 'Flintstone'
  })
  .then((response) {
    print(response);
  })
  .catchError((error) {
    print(error);
  });

_For more examples, please refer to the Documentation

(back to top)

Features

  • ✅ GET
  • ✅ POST
  • ✅ PATCH
  • ✅ PUT
  • ✅ DELETE
  • ✅ Interceptors
  • ✅ Error Handler
  • ✅ Multipart/FormData

Right now this package has concluded all his intended features. If you have any suggestions or find something to report, see below how to contribute to it.

(back to top)

Contributing

🚧 Contributing Guidelines - Currently being updated 🚧

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the appropriate tag. Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Remember to include a tag, and to follow Conventional Commits and Semantic Versioning when uploading your commit and/or creating the issue.

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Flutterando Community

(back to top)

Contributors

(back to top)

Maintaned by



Built and maintained by Flutterando.

Libraries

uno