Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'package:smooth_app/generic_lib/duration_constants.dart';
import 'package:smooth_app/helpers/image_field_extension.dart';
import 'package:smooth_app/helpers/product_cards_helper.dart';
import 'package:smooth_app/helpers/ui_helpers.dart';
import 'package:smooth_app/pages/product/common/product_picture_banner.dart';
import 'package:smooth_app/pages/product/helpers/pinch_to_zoom_indicator.dart';
import 'package:smooth_app/query/product_query.dart';
import 'package:smooth_app/resources/app_icons.dart' as icons;
Expand Down Expand Up @@ -116,6 +117,38 @@ class _EditProductImageViewerState extends State<EditProductImageViewer>
),
),
),
PositionedDirectional(
bottom: 60.0,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @may-tas
I believe the parent component has 20% vertical height, so using the fixed bottom might not be a great way to center the icon, in case of diff mobile height devices,
I might be wrong, but if possible, can you try the same UI in diff mobile devices ? Preferably on any emulator.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just followed the code logic other icons were using, I know this could lead to overflow, If you want I can change the approach, but then we would have to change others too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested it in android emulator and my physical device it didnt overflow.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if should change the approach here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

end: 3.5,
child: Offstage(
offstage: _animation.value != 1.0,
child: Material(
type: MaterialType.transparency,
child: InkWell(
customBorder: const CircleBorder(),
onTap: () async {
final Product product = context.read<Product>();
await showPhotoBanner(
context: context,
product: product,
imageField: widget.imageField,
language:
widget.language ?? ProductQuery.getLanguage(),
);
},
child: Tooltip(
message: AppLocalizations.of(context)
.edit_photo_button_label,
child: const SmoothIndicatorIcon(
icon: icons.Edit(
size: 14.0,
),
),
),
),
),
),
),
PositionedDirectional(
bottom: 1.0,
end: 3.5,
Expand Down