downloader_notifier 1.0.3 copy "downloader_notifier: ^1.0.3" to clipboard
downloader_notifier: ^1.0.3 copied to clipboard

A floating bar for real-time download progress updates, designed for both Android and iOS.

example/lib/main.dart

import 'dart:developer' as console;
import 'package:downloader_notifier/downloader_notifier.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(
    DownloaderNotifier.initialize(
      // onProgress: (queue) => console.log('Queue: $queue'),
      onError: (e, s) => console.log(e.toString()),
      app: const MaterialApp(
        title: 'Downloader Notifier',
        home: MyApp(),
      ),
    ),
  );
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Builder(
        builder: (x) => Center(
          child: Material(
            color: Colors.blue,
            child: DownloaderNotifier.button(
              url:
                  'https://freetestdata.com/wp-content/uploads/2022/11/Free_Test_Data_10.5MB_PDF.pdf',
              onError: (e, s) {
                ScaffoldMessenger.maybeOf(x)?.showSnackBar(
                  SnackBar(
                    content: Text('$e'),
                  ),
                );
              },
              child: const Padding(
                padding: EdgeInsets.symmetric(
                  horizontal: 16.0,
                  vertical: 8.0,
                ),
                child: Text(
                  'Download',
                  style: TextStyle(
                    color: Colors.white,
                    fontWeight: FontWeight.bold,
                  ),
                ),
              ),
            ),
          ),
        ),
      ),
    );
  }
}
1
likes
80
points
29
downloads

Publisher

unverified uploader

Weekly Downloads

A floating bar for real-time download progress updates, designed for both Android and iOS.

Homepage
Repository (GitHub)

Topics

#utility #downloader #notification

Documentation

API reference

Funding

Consider supporting this project:

ko-fi.com

License

MIT (license)

Dependencies

fl_downloader, flutter, flutter_in_app_pip

More

Packages that depend on downloader_notifier