8000 Feature proposal: Switch from http to dio · Issue #93 · xtyxtyx/minio-dart · GitHub
[go: up one dir, main page]

Skip to content

Feature proposal: Switch from http to dio #93

Open

Description

@JacoFaberSA

Using Dio would enable real send and receive progress updates and allow requests to be canceled with a cancel token.

I've implemented a preliminary conversion here to demonstrate these capabilities: https://github.com/JacoFaberSA/minio-dart/tree/convert-from-http-to-dio

However, in its current state, the user would need to include Dio in their app to access cancel tokens. To address this, I would implement a custom callback controller to relay the getter and callbacks to the cancel token.

Additionally, I would add onProgress callbacks to other features, as this is straightforward to implement.

Activity

  1. arrrrny commented on Oct 22, 2026

    @arrrrny

    The fork did not switch to dio, but it does give you the two things you were
    after without taking on a new dependency:

    • Progress: putObject reports upload progress through onProgress, and
      getObject now reports download progress as well.
    • Cancellation: the http.Client is injectable and there is a
      cancellation token, so an in-flight request can be aborted.

    If you still want dio, you can pass your own client — but note that a dio
    Dio instance is not an http.Client, so it would need an adapter.

  2. arrrrny commented on Oct 22, 2026

    @arrrrny

    This ships in zuraffa_minio — the maintained fork of this package, which upstream has not touched since August 2025.

    The fork keeps the API of the original package unchanged, so moving over is an import swap:

    // before
    import 'package:minio/minio.dart';
    // after
    import 'package:zuraffa_minio/minio.dart';

    Source, the changelog and the sweep of the open issues of this tracker: https://github.com/arrrrny/zuraffa_minio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0