diff --git a/packages/smooth_app/lib/pages/product/edit_ocr_page.dart b/packages/smooth_app/lib/pages/product/edit_ocr_page.dart index b6f9d304eb6..0205fc3145f 100644 --- a/packages/smooth_app/lib/pages/product/edit_ocr_page.dart +++ b/packages/smooth_app/lib/pages/product/edit_ocr_page.dart @@ -249,39 +249,43 @@ class _EditOcrPageState extends State { start: LARGE_SPACE, end: LARGE_SPACE, ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisSize: MainAxisSize.max, - children: [ - Expanded( - child: Padding( - padding: - const EdgeInsets.symmetric(horizontal: SMALL_SPACE), - child: ProductImageServerButton( - product: _product, - imageField: _helper.getImageField(), - language: language, - isLoggedInMandatory: widget.isLoggedInMandatory, - borderWidth: 2, + child: IntrinsicHeight( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.stretch, + mainAxisSize: MainAxisSize.max, + children: [ + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: SMALL_SPACE, + ), + child: ProductImageServerButton( + product: _product, + imageField: _helper.getImageField(), + language: language, + isLoggedInMandatory: widget.isLoggedInMandatory, + borderWidth: 2, + ), ), ), - ), - Expanded( - child: Padding( - padding: - const EdgeInsets.symmetric(horizontal: SMALL_SPACE), - child: ProductImageLocalButton( - firstPhoto: !transientFile.isImageAvailable(), - barcode: widget.product.barcode!, - imageField: _helper.getImageField(), - language: language, - isLoggedInMandatory: widget.isLoggedInMandatory, - borderWidth: 2, + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: SMALL_SPACE, + ), + child: ProductImageLocalButton( + firstPhoto: !transientFile.isImageAvailable(), + barcode: widget.product.barcode!, + imageField: _helper.getImageField(), + language: language, + isLoggedInMandatory: widget.isLoggedInMandatory, + borderWidth: 2, + ), ), ), - ), - ], + ], + ), ), ), ), diff --git a/packages/smooth_app/lib/pages/product/product_image_viewer.dart b/packages/smooth_app/lib/pages/product/product_image_viewer.dart index 009c98208d5..fbf7928642e 100644 --- a/packages/smooth_app/lib/pages/product/product_image_viewer.dart +++ b/packages/smooth_app/lib/pages/product/product_image_viewer.dart @@ -179,57 +179,70 @@ class _ProductImageViewerState extends State { ) ], ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisSize: MainAxisSize.max, - children: [ - Expanded( - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: SMALL_SPACE), - child: ProductImageServerButton( - product: _product, - imageField: widget.imageField, - language: widget.language, - isLoggedInMandatory: true, + Padding( + padding: const EdgeInsets.only(bottom: SMALL_SPACE), + child: IntrinsicHeight( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.stretch, + mainAxisSize: MainAxisSize.max, + children: [ + Expanded( + child: Padding( + padding: + const EdgeInsets.symmetric(horizontal: SMALL_SPACE), + child: ProductImageServerButton( + product: _product, + imageField: widget.imageField, + language: widget.language, + isLoggedInMandatory: true, + ), + ), ), - ), - ), - Expanded( - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: SMALL_SPACE), - child: ProductImageLocalButton( - firstPhoto: imageProvider == null, - barcode: _barcode, - imageField: widget.imageField, - language: widget.language, - isLoggedInMandatory: true, + Expanded( + child: Padding( + padding: + const EdgeInsets.symmetric( + horizontal: SMALL_SPACE, + ), + child: ProductImageLocalButton( + firstPhoto: imageProvider == null, + barcode: _barcode, + imageField: widget.imageField, + language: widget.language, + isLoggedInMandatory: true, + ), + ), ), - ), + ], ), - ], + ), ), if (imageProvider != null) - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisSize: MainAxisSize.max, - children: [ - Expanded( - child: Padding( - padding: - const EdgeInsets.symmetric(horizontal: SMALL_SPACE), - child: _getUnselectImageButton(appLocalizations), + IntrinsicHeight( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.stretch, + mainAxisSize: MainAxisSize.max, + children: [ + Expanded( + child: Padding( + padding: + const EdgeInsets.symmetric(horizontal: SMALL_SPACE), + child: _getUnselectImageButton(appLocalizations), + ), ), - ), - Expanded( - child: Padding( - padding: - const EdgeInsets.symmetric(horizontal: SMALL_SPACE), - child: _getEditImageButton(appLocalizations), + Expanded( + child: Padding( + padding: + const EdgeInsets.symmetric( + horizontal: SMALL_SPACE, + ), + child: _getEditImageButton(appLocalizations), + ), ), - ), - ], + ], + ), ), ], ),