S3Client class base

Low-level S3 client responsible for signing and sending HTTP requests.

S3Client implements the AWS Signature Version 4 flow used by S3-compatible services and exposes internal helpers used by higher-level S3 operations.

Example:

final client = S3Client(
  S3Config(
    key: 'AKIA...',
    secret: 'super-secret',
    bucket: 'my-app-bucket',
  ),
);
Available extensions

Constructors

S3Client(S3Config config, {bool debug = true})
Creates a new S3 client.

Properties

config S3Config
Runtime S3 configuration.
final
debug bool
Whether debug behavior is enabled.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

deleteObject(String key) Future<bool>

Available on S3Client, provided by the S3Operations extension

Deletes an object using DELETE.
getObject(String key) Future<Uint8List?>

Available on S3Client, provided by the S3Operations extension

Downloads an object as raw bytes.
getString(String key) Future<String?>

Available on S3Client, provided by the S3Operations extension

Downloads an object and decodes it as UTF-8 text.
listObjects({String? prefix, int maxKeys = 1000}) Future<List<String>>

Available on S3Client, provided by the S3Operations extension

Lists object keys in the configured bucket.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
objectExists(String key) Future<bool>

Available on S3Client, provided by the S3Operations extension

Checks whether an object exists using HEAD.
putObject({required String key, required Uint8List data, String? contentType, S3Acl? acl}) Future<bool>

Available on S3Client, provided by the S3Operations extension

Uploads raw bytes to S3 using PUT.
putString(String key, String data, {String? contentType, S3Acl? acl}) Future<bool>

Available on S3Client, provided by the S3Operations extension

Uploads a string to S3.
setObjectAcl(String key, S3Acl acl) Future<bool>

Available on S3Client, provided by the S3Operations extension

Applies a canned ACL to an existing object.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited