image method

Widget image()

Implementation

Widget image() {
  Widget? widget;
  try {

    widget  = Image.file(
      _file,
      // Loading image from file path
      fit: BoxFit.fitHeight,
    );
  }catch(e){

  }
  return widget?? Container(
    height: 100,
    width: 100,
    color: Colors.red,
  );
}