PickImage method

Future<void> PickImage()

Implementation

Future<void> PickImage() async {
  await FilePicker.platform.pickFiles(
    allowMultiple:false,
    type: FileType.image,
    withData:true,
  ).then((files)  async {
    if(files != null && files.count>0){
      files.files.forEach((element) {
        ImpactSingleImageFile     = element;
        ImpactSingleImageFileB64  = "data:image/png;base64,"+base64Encode(element.bytes!);
        setState(() {
          IsChanged=true;
        });
      });
    }
  });
  print("~~~~~~~~~~~~~ImpactSingleImageFile~~~~~~~~~~~");
  print(ImpactSingleImageFile);
  print("~~~~~~~~~~~~~ImpactSingleImageFileB64~~~~~~~~~~~");
  print(ImpactSingleImageFileB64);
}