getExtraPhotoWidget method

  1. @protected
Widget getExtraPhotoWidget(
  1. BuildContext context,
  2. Product product,
  3. String title
)

Typical extra widget for the "add other pics" button.

Implementation

@protected
Widget getExtraPhotoWidget(
  BuildContext context,
  Product product,
  String title,
) => Padding(
  padding: const EdgeInsetsDirectional.only(
    top: 0,
    start: SMALL_SPACE,
    end: SMALL_SPACE,
    bottom: SMALL_SPACE,
  ),
  child: addPanelButton(
    title,
    onPressed: () async => confirmAndUploadNewPicture(
      context,
      imageField: ImageField.OTHER,
      barcode: product.barcode!,
      productType: product.productType,
      language: ProductQuery.getLanguage(),
      // we're already logged in if needed
      isLoggedInMandatory: false,
    ),
    leadingIcon: const Icon(Icons.add_a_photo),
    elevation: const WidgetStatePropertyAll<double>(0.0),
    padding: const EdgeInsetsDirectional.only(
      top: SMALL_SPACE,
      bottom: SMALL_SPACE,
      start: VERY_SMALL_SPACE,
    ),
  ),
);