title: Flutter how to download a file using flutter_downloader package
body: <p>hello i want to download a file using flutter_downloader package i try to use the code in the exemple
  of the dowumentation i got a black screen sometimes i got a white screen and i do n't know why i tryed to use only one function of the exemple i have an error and it did not work</p>
  <pre><code> import 'dart:isolate';
  import 'dart:ui';
  
  import 'package:flutter/material.dart';
  import 'dart:async';
  import 'package:path_provider/path_provider.dart';
  import 'package:flutter_downloader/flutter_downloader.dart';
  import 'package:permission_handler/permission_handler.dart';
  import 'dart:io';
  
  const debug = true;
  
  
  class download extends StatefulWidget with WidgetsBindingObserver {
    final TargetPlatform platform;
  
    download({Key key, this.title, this.platform}) : super(key: key);
  
    final String title;
  
    @override
    _MyHomePageState createState() =&gt; new _MyHomePageState();
  }
  
  class _MyHomePageState extends State&lt;download&gt; {
  
  
  
    String _localPath;
  
    @override
    void initState() {
      super.initState();
  
  
     WidgetsFlutterBinding.ensureInitialized();
     FlutterDownloader.initialize(
         debug: true // optional: set false to disable printing logs to console
     );
   
    }
  
    @override
    void dispose() {
      super.dispose();
    }
  
  
    @override
    Widget build(BuildContext context) {
      return new Scaffold(
        appBar: new AppBar(
          title: new Text('bonjour'),
        ),
      body:FlatButton(
      child:Text('bbbbb'),
      onPressed: _requestDownload,
      )
      );
    }
  
  
  
    void _requestDownload() async {
       await FlutterDownloader.enqueue(
          url:'http://barbra-coco.dyndns.org/student/learning_android_studio.pdf' ,
          headers: {&quot;auth&quot;: &quot;test_for_sql_encoding&quot;},
          savedDir: _localPath,
          showNotification: true,
          openFileFromNotification: true);
    }
  </code></pre>
  <p>and i got this exception</p>
  <pre><code>[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: 'package:flutter_downloader/src/downloader.dart': Failed assertion: line 73 pos 12: '_initialized': FlutterDownloader.initialize() must be called first
  </code></pre>
  <p>i'm asking if there is an explicationn or a solution or a worked exemple with explication and details thank you</p>