Coder Social home page Coder Social logo

Comments (4)

lisen87 avatar lisen87 commented on August 15, 2024

@AkramChauhan you can try image_pickers 1.0.5+3

from image_gallery_saver.

hyjfine avatar hyjfine commented on August 15, 2024

This plugin works like charm for Network images/videos.
I managed to display local images in the gallery which was created by my flutter app.
I am not sure, how to display video in a gallery from local storage.

Here is my code for saving an image from the temp folder and display in the gallery.

                Uri myUri = Uri.parse(widget.imgPath);
                File originalImageFile = new File.fromUri(myUri);
                Uint8List bytes;
                await originalImageFile.readAsBytes().then((value) {
                  bytes = Uint8List.fromList(value);
                  print('reading of bytes is completed');
                }).catchError((onError) {
                  print('Exception Error while reading audio from path:' +
                      onError.toString());
                });
                final result = await ImageGallerySaver.saveImage(Uint8List.fromList(bytes));
                print(result);

Here is what I am doing for saving temp video to a specific directory.

              File originalVideoFile = File(widget.videoFile);
              Directory directory = await getExternalStorageDirectory();
              if(!Directory("${directory.path}/Downloaded Status/Videos").existsSync()){
                Directory("${directory.path}/Downloaded Status/Videos").createSync(recursive: true);
              }
              String path = directory.path;
              String curDate = DateTime.now().toString();
              String newFileName = "$path/Downloaded Status/Videos/VIDEO-$curDate.mp4";
              print(newFileName);
              await originalVideoFile.copy(newFileName);

but this video is not visible in Gallary.
I need some help to display this video in the gallery.
-Thanks.

any more details? phone and OS info?

from image_gallery_saver.

lisen87 avatar lisen87 commented on August 15, 2024

image_pickers @hyjfine

from image_gallery_saver.

hyjfine avatar hyjfine commented on August 15, 2024

ok

from image_gallery_saver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.