newImgButton method

Widget newImgButton({
  1. BuildContext? context,
})

Implementation

Widget newImgButton({BuildContext? context}) => IconButton(
      // padding: EdgeInsets.zero,
      icon: Icon(Icons.add_a_photo),
      onPressed: () async {
        if (context == null) {
          debugPrint("no context from wich we could alert");
          return;
        }
        //get model from context
        var model =
            Provider.of<CheckPointDefectsModel>(context, listen: false);
        model.open(context, this, MyListTileData(title: 'Fotos'),
            addImgIntend: true);
      },
    );