oss_flutter 0.2.2 copy "oss_flutter: ^0.2.2" to clipboard
oss_flutter: ^0.2.2 copied to clipboard

A pure Dart Aliyun OSS (Object Storage Service) client for Flutter and Dart, supporting STS authentication, file upload/download, multipart upload, and bucket management. Null safety and Flutter 3.x supported.

oss_flutter! #

pure dart oss client for flutter (only support STS authentication)

Only generate signature and http request wrapper instance

your have to implement 2 things

  1. request to update STS token
  2. request to do real http request

Features #

  • ✅ Null Safety Support
  • ✅ Latest Flutter 3.x Support
  • ✅ STS Authentication
  • ✅ File Upload/Download
  • ✅ Multipart Upload
  • ✅ Bucket Management

Usage #

1. Install

dependencies:
    oss_flutter: ^0.2.0

2. Initialization

import 'package:oss_flutter/oss_flutter.dart';

final client = Client('url to fetch sts token', 'oss bucket domain', (url) async{
    // use your favorite http lib to fetch sts token
    // return as 
    //{
    //    "AccessKeyId": "STS.NJt3c8tHjMzwzPvxoB6QHFwLY", 
    //    "AccessKeySecret": "2momjH1gfJ9RFA57cPwTA1of6Pr29qijGGkeXsVyoSqt", 
    //   "Expiration": "2019-06-23T16:40:01Z", 
    //    "SecurityToken": "CAIS9gF1q6Ft5B2yfSjIr4nBeNmMmZdL+riceHbHnG8XOt5kqbLnuzz2IH9OeHhqB+kWsPkyn2FW7fwalrh+W4NIX0rNaY5t9ZlN9wqkbtJUNnF0PflW5qe+EE2/VjTZvqaLEcibIfrZfvCyESOm8gZ43br9cxi7QlWhKufnoJV7b9MRLGLaBHg8c7UwHAZ5r9IAPnb8LOukNgWQ4lDdF011oAFx+wgdgOadupDGtUOC0QCilrZM99yre8WeApMybMcvYbCcx/drc6fN6ilU5iVR+b1+5K4+omid4oDHXQABvUjbaLuKqYc3NmF+fbMzEKVUczQjVFHbfI0agAEqTKBFvjnmklHx9Gg8O9Hw4V0oIhmodRXGMT0NxFSBa+GghJOrfjNiNl60P8Z72OOsww2fXsubwkz7u9dAifyb8oZ0z1o60NRCBXOZxSFxOHDpljq+wByr4yE2n5qIkjeqSkJrMKnhBxtXKGEbyIU8WdJXjOkQxWaxIEXlFgfE1A==", 
    //    "StatusCode": 200
    //}
});

3 Access OSS Services

final req = client.list_buckets() // return wrapper
// make real http request with req use your favorite http lib

Requirements #

  • Dart SDK: >=3.0.0 <4.0.0
  • Flutter: >=3.0.0

Breaking Changes in v0.2.0 #

  • Null Safety: This version is fully null-safe and requires Dart 3.0+
  • Updated Dependencies: All dependencies have been updated to their latest versions
  • Type Safety: Improved type safety throughout the codebase
6
likes
120
points
45
downloads

Publisher

unverified uploader

Weekly Downloads

A pure Dart Aliyun OSS (Object Storage Service) client for Flutter and Dart, supporting STS authentication, file upload/download, multipart upload, and bucket management. Null safety and Flutter 3.x supported.

Repository (GitHub)
View/report issues

Topics

#aliyun #oss #storage #flutter #null-safety

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

crypto, intl, xml

More

Packages that depend on oss_flutter