Search packages, repositories and app categories

Package detailsv3.5.8

minio

Unofficial MinIO Dart Client SDK that provides simple APIs to access any Amazon S3 compatible object storage server.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
66K
Likes
130
Pub points
140

Install package

flutter pub add minio

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The minio package is an unofficial Dart SDK for interacting with any Amazon S3-compatible object storage server, such as MinIO. It provides a simple and intuitive API to perform common operations like uploading, downloading, listing, and deleting objects. Designed for cross-platform use, it supports Android, iOS, Web, macOS, Windows, and Linux. The client enables seamless integration with cloud storage services that follow the S3 protocol, making it ideal for apps needing scalable file storage. It's lightweight and well-suited for developers building applications requiring secure, durable, and high-performance data persistence.

Use cases

  • Storing user-generated content
  • Backing up application data
  • Hosting static assets
  • Integrating with S3-compatible storage
  • Enabling file sharing across platforms

Key features

  • S3-compatible API
  • Cross-platform support
  • Simple upload/download methods
  • Secure authentication
  • Object lifecycle management

Suitable for

  • Flutter apps needing cloud storage
  • Developers using MinIO or S3
  • Apps requiring file persistence
  • Backendless file handling
  • Projects with multi-platform deployment

Considerations

  • Unofficial SDK – not maintained by MinIO
  • Requires proper access credentials
  • Limited to S3-compatible servers
  • No built-in retry logic
  • Depends on external GitHub repository

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

MinIO Dart

This is the unofficial MinIO Dart Client SDK that provides simple APIs to access any Amazon S3 compatible object storage server.

API

Bucket operations Object operations Presigned operations Bucket Policy & Notification operations
makeBucket getObject presignedUrl getBucketNotification
listBuckets getPartialObject presignedGetObject setBucketNotification
bucketExists fGetObject presignedPutObject removeAllBucketNotification
removeBucket putObject presignedPostPolicy listenBucketNotification
listObjects fPutObject getBucketPolicy
listObjectsV2 copyObject setBucketPolicy
listIncompleteUploads statObject
listAllObjects removeObject
listAllObjectsV2 removeObjects
removeIncompleteUpload

Usage

Initialize MinIO Client

MinIO

final minio = Minio(
  endPoint: 'play.min.io',
  accessKey: 'Q3AM3UQ867SPQQA43P2F',
  secretKey: 'zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG',
);

AWS S3

final minio = Minio(
  endPoint: 's3.amazonaws.com',
  accessKey: 'YOUR-ACCESSKEYID',
  secretKey: 'YOUR-SECRETACCESSKEY',
);

Filebase

final minio = Minio(
  endPoint: 's3.filebase.com',
  accessKey: 'YOUR-ACCESSKEYID',
  secretKey: 'YOUR-SECRETACCESSKEY',
  useSSL: true,
);

File upload

import 'package:minio/io.dart';
import 'package:minio/minio.dart';

void main() async {
  final minio = Minio(
    endPoint: 'play.min.io',
    accessKey: 'Q3AM3UQ867SPQQA43P2F',
    secretKey: 'zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG',
  );

  await minio.fPutObject('mybucket', 'myobject', 'path/to/file');
}

For complete example, see: example

To use fPutObject() and fGetObject, you have to import 'package:minio/io.dart';

Upload with progress

import 'package:minio/minio.dart';

void main() async {
  final minio = Minio(
    endPoint: 'play.min.io',
    accessKey: 'Q3AM3UQ867SPQQA43P2F',
    secretKey: 'zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG',
  );

  await minio.putObject(
    'mybucket',
    'myobject',
    Stream<Uint8List>.value(Uint8List(1024)),
    onProgress: (bytes) => print('$bytes uploaded'),
  );
}

Get object

import 'dart:io';
import 'package:minio/minio.dart';

void main() async {
  final minio = Minio(
    endPoint: 's3.amazonaws.com',
    accessKey: 'YOUR-ACCESSKEYID',
    secretKey: 'YOUR-SECRETACCESSKEY',
  );

  final stream = await minio.getObject('BUCKET-NAME', 'OBJECT-NAME');

  // Get object length
  print(stream.contentLength);

  // Write object data stream to file
  await stream.pipe(File('output.txt').openWrite());
}

Features and bugs

Please file feature requests and bugs at the issue tracker.

Contributions to this repository are welcome.

License

MIT

Categories

Dependencies

Dependency list 9 items

Source repository

Projects using this package

Rankings