Skip to content
pubscout

libtorrent_flutter

2.0.0, released 3 months ago by playtorrio.xyz

Native libtorrent 2.0 bindings with built-in HTTP streaming server for torrent video playback.

Copyleft license
$ flutter pub add libtorrent_flutter
Source repository

What it does

Wraps the C++ libtorrent engine via FFI to download torrents, monitor progress, and provide an HTTP streaming server for instant video playback via local URLs. Supports Windows, Linux, macOS, iOS, and Android.

AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to stream video or media files directly from magnet links or torrent files in a Flutter application.
  • You require high-performance torrent downloads on mobile or desktop without relying on external native wrappers.

Skip it when

  • You need a pure Dart torrent implementation without native binaries or complex C++ dependencies.
  • Your target environment operates entirely offline without downloading prebuilt native binaries on the first build.

Strengths

  • Powered by libtorrent 2.1.1 C++ engine for high download speeds and efficient peer discovery.
  • Built-in HTTP streaming server with range-request support for media players.
  • Cross-platform support across Android, iOS, Windows, Linux, and macOS.

Weaknesses

  • First build requires downloading 10–80 MB of prebuilt native binaries.
  • Android requires foreground services to maintain downloads while the app is in the background.

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
1

Requires INTERNET permission on Android, network client entitlements on macOS, and optional foreground service setup for background Android streaming.

import 'package:libtorrent_flutter/libtorrent_flutter.dart';

await LibtorrentFlutter.init();
final engine = LibtorrentFlutter.instance;
final id = engine.addMagnet('magnet:?xt=urn:btih:...');

Alternatives

Packages that do the same job and could replace libtorrent_flutter.

Works with

Packages commonly used together with libtorrent_flutter: ones it builds on, ones built on it, and its own family.