Dart - bucket.file.write()

This is reference documentation for the Nitric Dart SDK. To learn about Storage and Buckets in Nitric start with the Storage docs.

Write a file to a bucket.

import 'package:nitric_sdk/nitric.dart';
final assets = Nitric.bucket("assets").allow([
BucketPermission.write,
]);
final logo = assets.file("images/logo.png");
await logo.writ("someImageData");

Parameters

  • Name
    data
    Required
    Required
    Type
    String
    Description

    The data to write to the file.

Examples

Write a file

import 'package:nitric_sdk/nitric.dart';
final assets = Nitric.bucket("assets").allow([
BucketPermission.write,
]);
final logo = assets.file("images/logo.png");
await logo.writ("someImageData");
Last updated on Apr 3, 2025