Closed collinjackson closed 7 years ago
Thanks for testing this out. I pushed a fix for the first thing, PTAL. The second fix requires us to randomize the name of the temporary file when picking an image, which I'll do in the image_picker plugin.
LGTM, pending the image_picker change!
once the image picker fix in flutter/image_picker#3 is landed, try flutter packages upgrade
The main thing I'm changing here is that I'm making the meme screen into a full-screen dialog that returns the text in its call to Navigator.pop(). This keeps all the Firebase uploading logic to one place in main.dart. I got rid of the ability to change the photo in the meme dialog; instead you have to dismiss the dialog to change the picture.
To avoid the flash of unstyled content while the image upload happens, the dialog loads the image from file instead of the network (uploading happens in the background). We could also download the network image before adding it to the ListView, so that it will instantly lay out in the ListView correctly. It's not clear to me what the cleanest way to do that is, but I can look into it if you want.