Flutter Tutorial - Progress Indicator - Deep Dive

Поділитися
Вставка
  • Опубліковано 22 лип 2024
  • Create a linear and circular progress indicator while downloading a file from the web in Flutter.
    Click here to Subscribe to Johannes Milke: ua-cam.com/users/JohannesMilke...
    - Source Code: github.com/JohannesMilke/prog...
    - Buy My Courses: johannesmilke.teachable.com/p...
    - Follow Twitter: intent/follow?ori...
    -- JOIN THE CREW --
    bit.ly/JohannesMilke
    SHARE | SUBSCRIBE | LIKE FOR MORE VIDEOS LIKE THIS
    *********
    SOCIAL MEDIA: Follow Me :-)
    - Twitter: intent/follow?ori...
    - Linkedin: / johannesmilke
    - Github: github.com/JohannesMilke
    PLAYLISTS
    - All Flutter Videos: • Flutter Tutorial - Flu...
    - Widgets - Flutter: • Flutter Tutorial - Flu...
    - Plugins - Flutter: • Flutter Tutorial - Flu...
    - Animations - Flutter: • Flutter Tutorial - Tra...
    - Designs - Flutter: • Flutter Tutorial - Flu...
    - Firebase - Flutter: • Flutter Tutorial - Pag...
    If you find this video useful, LIKE & SHARE this video to help other people who also learn Flutter :)
    bit.ly/JohannesMilke
    CREDITS
    Copyright song "Corporate Technology" by scottholmesmusic.com
    #Flutter #Tutorial #JohannesMilke
    LIKE & SHARE & ACTIVATE THE BELL
    Thanks For Watching :-)
  • Наука та технологія

КОМЕНТАРІ • 17

  • @HeyFlutter
    @HeyFlutter  2 роки тому +1

    This might help you :)
    Source Code: github.com/JohannesMilke/progress_indicator_example

  • @programingtales7514
    @programingtales7514 2 роки тому

    Always the best ❤ thank you verymuch...

  • @TrikNgonlen
    @TrikNgonlen 3 роки тому +1

    oooh, man! I love you contents...

  • @kibromhs7566
    @kibromhs7566 2 роки тому

    Can we add borders to the LinearProgressIndicator

  • @user-ks5rv8wz4w
    @user-ks5rv8wz4w 2 роки тому

    thank you very much

  • @pedromaratones9852
    @pedromaratones9852 3 роки тому +2

    Love this video, it should have more view. I was searching for this and all pther tutorials used the CustomPaint to reach this result. But this way is much more clean and easy

  • @hieulee84
    @hieulee84 2 роки тому

    get some error with ColorTween
    // animation =
    // controller.drive(ColorTween(begin: Colors.yellow, end: Colors.red));
    Now have to change to this:
    late Animation animation;
    and when initilze state:
    animation =
    ColorTween(begin: Colors.yellow, end: Colors.blue).animate(controller);

  • @hectorprx
    @hectorprx 3 роки тому

    Thanks

  • @anujrathore2517
    @anujrathore2517 3 роки тому +1

    I am working on to-do list app and I want to fill the progress bar when any user complete one task and percentages will be acc. To number of task user created on that app
    Is it possible in flutter (I am complete newbie)
    Any help will be appreciated
    I searched a lot but all I can find is how to create progress bar for download button so it will be really helpful

    • @HeyFlutter
      @HeyFlutter  2 роки тому

      Yes it is possible! Watch also my Flutter videos on creating a ToDo App!
      1) Todo App Tutorial: ua-cam.com/video/kN9Yfd4fu04/v-deo.html
      2) Todo App Tutorial: ua-cam.com/video/cltCpXY60Sk/v-deo.html
      3) Todo App + Firebase Tutorial: ua-cam.com/video/EV2DyrKOqrY/v-deo.html

  • @exploring_thailand
    @exploring_thailand 2 роки тому

    It would be useful to see a demo of this in which the Progress Indicator automatically appears as a modal while the file is downloading, and disappears once the download is complete.

    • @HeyFlutter
      @HeyFlutter  2 роки тому

      Thank You Exploring Thailand! Follow this link: medium.com/flutter-community/how-to-show-download-progress-in-a-flutter-app-8810e294acbd
      I hope you will get your answer 🙂

  • @rahulmp7109
    @rahulmp7109 3 роки тому

    Can I use this for upload progress

    • @rahulmp7109
      @rahulmp7109 3 роки тому

      @@HeyFlutteriam using http with put request ,and I want to send a vido as binary to gcp I followed your tutorial and I got result but upload progress not working

    • @rahulmp7109
      @rahulmp7109 3 роки тому

      @@HeyFlutter here is code
      Future uploadVideo(File file, String url) async {
      int totalLength = 0;
      double progress = 0;
      List bytes = [];
      final request = http.Request('PUT', Uri.parse(url));
      request.bodyBytes = file.readAsBytesSync();
      request.headers['content-type'] = 'video/mp4';
      request.headers['accept'] = '*/*';
      request.headers['content-length'] = file.lengthSync().toString();
      int byteCount = 0;
      try {
      final http.StreamedResponse streamedResponse = await request.send();
      totalLength = streamedResponse.contentLength ?? 0;
      streamedResponse.stream.listen(
      (value) {
      bytes.addAll(value);
      final downloadedLength = bytes.length;
      progress = downloadedLength / totalLength;
      log('progress = $progress');
      },
      onDone: () async {
      log('upload completed');
      },
      onError: (error) {
      log(error.toString());
      throw HttpFailure(message: 'Could not complete upload');
      },
      cancelOnError: true,
      );
      //ignore: prefer_final_locals
      int statusCode = streamedResponse.statusCode;
      log(statusCode.toString());
      if (statusCode ~/ 100 != 2) {
      throw HttpFailure(message: 'Error while uploading');
      }
      } on SocketException {
      throw HttpFailure(message: 'No internet connection');
      } on http.ClientException catch (e) {
      log(e.message);
      throw HttpFailure(message: e.message);
      }
      }
      please help on this

  • @amjadahmed3822
    @amjadahmed3822 2 роки тому

    I DON'T FROM FILE I WANT FROM JSON

  • @himesh_89
    @himesh_89 3 роки тому

    Thanks