flutter_media_downloader 2.0.0 copy "flutter_media_downloader: ^2.0.0" to clipboard
flutter_media_downloader: ^2.0.0 copied to clipboard

This plugin helps user to download medias for example pdf files, image files etc.

example/lib/main.dart

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
  void initState() {
    super.initState();
  }

  @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.kasandbox.org/programming-images/avatars/spunky-sam-green.png');
              },
              child: const Text('Media Download')),
        ),
      ),
    );
  }
}
copied to clipboard
50
likes
150
points
1.99k
downloads

Publisher

verified publisherparthshethflutterblog.blogspot.com

Weekly Downloads

2024.09.29 - 2025.04.13

This plugin helps user to download medias for example pdf files, image files etc.

Repository (GitHub)

Documentation

Documentation
API reference

License

BSD-3-Clause (license)

Dependencies

flutter, flutter_web_plugins, path_provider, permission_handler, plugin_platform_interface

More

Packages that depend on flutter_media_downloader