When using Flutter App development, involving the function of the camera photo album, so using the plugin image_picker, but in use process encountered a problem:
Android client application automatically restart when taking pictures occasionally happen, actually also not restart, is photographed after return will return to the first page to start running, namely re-execute initState,
I've tested put the camera on the first, second and third page, if it is the first page, will be rerun initState, then run the build, if this is the second, third page, will be immediately rerun initState and build the first page, and this two page execution not dispose of don't know, because of the console log directly to empty, to print,
The diagram below:
The problem is in the official document has explained:
Reference