Skip to content

feat(flutter): add model download task/controller helper for apps #135

@leehack

Description

@leehack

Goal

Provide an app-friendly helper for model download/cache UX so Flutter examples and downstream apps do not need to hand-roll progress/cancel/retry state machines.

Motivation

Large GGUF downloads need clear UI states: resolving, cache check, downloading, verifying, promoting, ready, failed, cancelled. The low-level cache manager exposes the primitives; a higher-level helper could make correct app UX easier.

Possible shape

  • ModelDownloadTask or ModelDownloadController
  • progress stream/value notifier
  • cancel/retry support
  • current stage enum
  • final resolved cache entry/path
  • safe error messages with URL redaction

Acceptance criteria

  • Decide whether this belongs in package API, example utility code, or a separate Flutter helper.
  • Demonstrate usage in example/chat_app.
  • Cover cancel/retry/failure states in tests.
  • Keep low-level DefaultModelDownloadManager usable without Flutter dependencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions