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

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

example/lib/main.dart

import 'dart:io';

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.gstatic.com/webp/gallery3/1.sm.png');
              },
              child: const Text('Media Download')),
        ),
      ),
    );
  }
}
50
likes
150
points
2.5k
downloads

Publisher

verified publisherparthshethflutterblog.blogspot.com

Weekly Downloads

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