Dart / Flutter

Learn how to configure a Dart or Flutter app for use with Filebase.

What is Dart?

Dart is a programming language developed by Google that is designed for client and app development, such as desktop or mobile applications.

What is Flutter?

Flutter is an open-source user interface development kit created for use with Dart. Flutter is used to develop mobile applications for Android and iOS, and desktop applications for Linux, Mac, Windows and Google.

Read below to learn how to configure a Dart or Flutter app to be used with Filebase.

Prerequisites:

Initialize the MinIO Client

The following code example showcases how to initialize the MinIO Client using the minio-dart package. Replace the following values in the code to match your configuration:

  • accessKey: Your Filebase Access Key

  • secretKey: Your Filebase Secret Key

Object Upload

The following code example showcases how to upload an object using the minio-dart package. Replace the following values in the code to match your configuration:

  • accessKey: Your Filebase Access Key

  • secretKey: Your Filebase Secret Key

  • filebase-sample-bucket: Your Filebase Bucket Name

  • myobject: The Object Name to be Uploaded

  • /path/to/object: The local path to the object

Get Object

The following code example showcases how to download an object using the minio-dart package. Replace the following values in the code to match your configuration:

  • accessKey: Your Filebase Access Key

  • secretKey: Your Filebase Secret Key

  • filebase-sample-bucket: Your Filebase Bucket Name

  • myobject: The Object Name to be downloaded.

Full Example

The following code example showcases a complete code example using the minio-dart package. Replace values as necessary to match your configuration.

Last updated

Was this helpful?