Share Widget Screenshots with Flutter | Day 09 -

Поділитися
Вставка
  • Опубліковано 23 січ 2025

КОМЕНТАРІ • 59

  • @El-lj5pz
    @El-lj5pz 3 роки тому +29

    Thank Kilo Loco for the video. For those who are using the new Screenshot package you need to change the _takeScreenshot() function code to this :
    void _takeScreenshot() async {
    final uint8List = await screenshotController.capture();
    String tempPath = (await getTemporaryDirectory()).path;
    File file = File('$tempPath/image.png');
    await file.writeAsBytes(uint8List);
    await Share.shareFiles([file.path]);
    }

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

      Thanks bro !

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

      Thank so much bro. You saved my hours

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

      what about getTemporaryDirectory, and image.png, and writeAsBytes, they are all showing errors

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

      Thank you! Life saver.

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

      @@runningsky Me too bro, did you find a solution for this?

  • @RalphShillington
    @RalphShillington 4 роки тому +15

    Breaking change to Screenshot (0.3.0 10/02/2021) . The capture method now returns Uint8List instead of File. If you want to follow along with the video exactly, you'll need fix the reference the previous version of the package, in the pubspec.yml to version 0.2.0 specifically (i.e. remove the ^ )

    • @Kilo_Loco
      @Kilo_Loco  4 роки тому +2

      Thanks for sharing

    • @viveks.
      @viveks. 3 роки тому

      Hey @Ralph Shillington what is the solution for screenshot ^0.3.0

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

      and for 030?

    • @El-lj5pz
      @El-lj5pz 3 роки тому

      @@viveks. checkout my comment above if you haven't found any workaround

    • @El-lj5pz
      @El-lj5pz 3 роки тому

      ​@@marcelhh5722 checkout my comment above if you haven't found any workaround

  • @psatler
    @psatler 4 роки тому +2

    I just found your channel and I think it its amazing!!

    • @Kilo_Loco
      @Kilo_Loco  4 роки тому

      Haha thanks!! Glad you like it!

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

    It's very useful. I had been looking for these kind of stuff since 20 days almost.

  • @angelinadyer4411
    @angelinadyer4411 Рік тому

    can I use this on flutterflow?

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

    Can we directly share screenshot without saving in directory from flutter web ?

  • @SanjarbekFayz
    @SanjarbekFayz Рік тому

    Thank you, I am from Uzbekistan

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

    Great! Just what I needed 🙏

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

    Awesome! This is really helpful

  • @MoAdel92
    @MoAdel92 2 роки тому +5

    newest solution will be
    shareImage() async {
    final uint8List = await screenshotController.capture();
    String tempPath = (await getTemporaryDirectory()).path;
    String fileName =" ";>>>>>your file name between ""
    File file = await File('$tempPath/$fileName" }.png').create();
    file.writeAsBytesSync(uint8List!);
    await Share.shareFiles([file.path]);
    }

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

    How to add watermark on full screen capture with Flutter

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

    This doesn't work for 0.3.0 version, how to handle saving and sharing SS with the latest version.

    • @El-lj5pz
      @El-lj5pz 3 роки тому +1

      See my comment above

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

      @@El-lj5pz Thank so much bro. I hope your comment will be upvoted.

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

    path error, help please

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

    Hey there,
    Thanks for the video. When I try to share the image along with text on WhatsApp, the image does not get shared. If I try this messenger or any other service it works well. It even works well on android WhatsApp. Can you please provide a solution for this error?

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

    Screenshot is not working with webview widget
    How to make it work

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

    Dont work more with 0.3.0 any solution?

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

    Can we add watermark to screen shot

  • @masihreyhani3910
    @masihreyhani3910 4 роки тому

    You're amazing 😊💙🙏

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

    Sir, Do i need to have the screen open for taking the screenshot? Or can it be done in background?

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

    Thank you. You always help.

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

    anyone get problem with Screenshot on samsung device ? , it works only first time ,another device works fine

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

    path error plz ans and give me solution

  • @ezone2726
    @ezone2726 4 роки тому

    How can we make an flutter app where one app can login only one device ; if user will add another account it won't sign in the app?
    Does it possible to do?
    If yes please help me out!
    #thankyourforthisawesometutorial #flutter #happycoding #awesometutorial #stayhealthy

    • @Kilo_Loco
      @Kilo_Loco  4 роки тому +1

      This could probably be done by saving a unique value like the user ID to the keychain and checking that before allowing the user to sign it, but i dont think that would be a good user experience. Most big apps allow you to sign in to different accounts from the same device no problem

    • @ezone2726
      @ezone2726 4 роки тому

      @@Kilo_Loco i think if one user have only one account in his/her phone that might be safe and less chance of misues!

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

    var imageuint = await screenshotController.capture();
    var directory = (await getApplicationDocumentsDirectory()).path;
    File imgFile = new File('$directory/sfs.png');