Skip to content
pubscout

flutter_media_downloader

2.0.0, released 2 years ago by parthshethflutterblog.blogspot.com

Download media files like PDFs and images on Android and iOS.

$ flutter pub add flutter_media_downloader
Source repository

What it does

Allows users to download media files from URLs on Android and iOS. Handles native permissions and notifications for downloads.

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 download files like PDFs and images directly to mobile devices.
  • You want built-in handling for download permissions and notifications.

Skip it when

  • You need complex background download queues or heavy custom file management.
  • You are targeting platforms other than Android and iOS.

Strengths

  • Simple API to trigger downloads.
  • Handles permissions and notifications natively out of the box.

Weaknesses

  • Limited platform support (only Android and iOS).
  • Minimal documentation and changelog information.

Setup

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

Requires adding storage and notification permissions to AndroidManifest.xml and configuring FileProvider for opening downloaded files.

import 'package:flutter/material.dart';
import 'package:flutter_media_downloader/flutter_media_downloader.dart';

void main() {
  runApp(const MyApp());
  WidgetsFlutterBinding.ensureInitialized();
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final _flutterMediaDownloaderPlugin = MediaDownload();

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Plugin example app')),
        body: Center(
          child: ElevatedButton(
            onPressed: () async {
              _flutterMediaDownloaderPlugin.downloadMedia(context, 'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf');
            },
            child: const Text('Media Download'),
          ),
        ),
      ),
    );
  }
}

Alternatives

Packages that do the same job and could replace flutter_media_downloader.

Works with

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