camera_camera icon indicating copy to clipboard operation
camera_camera copied to clipboard

new feature: add loading spin or wait spin

Open robertoltrocha opened this issue 4 years ago • 4 comments

Hi, congratulations on the plugin. I saw that there are some seconds until the file image is returned in the onFile function and the button is still active, could you put an option to disable the button or put a spin while the image is being processed? thanks

robertoltrocha avatar Apr 09 '21 23:04 robertoltrocha

Thanks. Disabled button when awating process file?

gabuldev avatar Apr 28 '21 18:04 gabuldev

yes. It would be best to stay while you are processing the save file function, as I have to send the file to the server in async mode. When I use Async, its application crashes.

robertoltrocha avatar Apr 28 '21 22:04 robertoltrocha

You add async this function?

 onFile: (file) {
                    photos.add(file);
                    Navigator.pop(context);
                    setState(() {});
                  },

gabuldev avatar May 19 '21 17:05 gabuldev

You can create new function and call on onFile(file)

onFile: (file){
yourFunction(File);
},

Future<void> yourFunction(file) async{
final response = await yourDatabase.push(file);
}

gabuldev avatar May 19 '21 17:05 gabuldev