I am not able to set image file after captured by camera

java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: Binder:25867_2

dependencies:-

image_picker: ^0.4.5
path_provider: ^0.4.1

imported plugin:-

import ‘dart:io’;
import ‘package:image_picker/image_picker.dart’;