aliyun_oss_flutter 1.0.1
aliyun_oss_flutter: ^1.0.1 copied to clipboard

aliyun oss plugin for flutter. Use this plugin to upload files to aliyun oss.

aliyun_oss_flutter #

aliyun oss plugin for flutter. Use this plugin to upload files to aliyun oss.

Usage #

To use this plugin, add aliyun_oss_flutter as a dependency in your pubspec.yaml file.

OSSClient is a static class

Example #

import 'package:flutter/material.dart';
import 'package:aliyun_oss_flutter/aliyun_oss.dart';

void main() {

  // 初始化OSSClient
  OSSClient.init(
    endpoint: 'oss-cn-hangzhou.aliyuncs.com',
    bucket: 'xxxx',
    credentials: () {
      // Future Credentials
      return Credentials.fromJson(response.data);
    },
  );

  runApp(...);
}

Future<void> upload() async {
  final object = await OSSClient().putObject(
    object: OSSObject
    bucket: xxx, // String?
    endpoint: xxx, // String?
    path: xxx, // String?
  );
}
0
likes
90
pub points
50%
popularity

Publisher

Unknown

aliyun oss plugin for flutter. Use this plugin to upload files to aliyun oss.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

crypto, dio, flutter, http_parser, image, intl, path, uuid

More

Packages that depend on aliyun_oss_flutter