tos 2.0.0 copy "tos: ^2.0.0" to clipboard
tos: ^2.0.0 copied to clipboard

volcengine offical tos flutter sdk

Volcengine Object Storage(TOS) Flutter SDK #

import 'dart:io' show Platform;
import 'package:tos/enum.dart';
import 'package:tos/exception.dart';
import 'package:tos/tos.dart';

void main() async {
    Map<String, String> envVars = Platform.environment;
    TosClient client = TosClientBuilder()
        .ak(envVars['TOS_ACCESS_KEY'] ?? '')
        .sk(envVars['TOS_SECRET_KEY'] ?? '')
        .region('cn-beijing')
        .endpoint('https://tos-cn-beijing.volces.com')
        .build();

    var output = await client.listBuckets(ListBucketsInput());
    print(output.requestId);
    for(var bucket in output.buckets){
        print(bucket.name);
    }
}
copied to clipboard
0
likes
105
points
28
downloads

Publisher

unverified uploader

Weekly Downloads

2024.09.09 - 2025.03.24

volcengine offical tos flutter sdk

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

crypto

More

Packages that depend on tos