The image is declared inside build function, so it is a local variable and is reset in the rebuild. It should be a property of the State instead.
image
State
File? image; Widget build(BuildContext context) { Future pick() async {