Use native image reset controls on each host

This commit is contained in:
2026-11-07 22:08:52 +00:00
parent 5917827bc5
commit 421e2e8887
2 changed files with 91 additions and 65 deletions
@@ -219,12 +219,24 @@ class _ZoomableImageState extends State<_ZoomableImage> {
PositionedDirectional(
top: 8,
end: 8,
child: IconButton(
key: const Key('artifact-image-reset-zoom'),
tooltip: 'Reset image zoom',
onPressed: _reset,
icon: const Icon(Icons.zoom_out_map),
),
child: usesCupertinoHost(context)
? Tooltip(
message: 'Reset image zoom',
child: CupertinoButton(
key: const Key('artifact-image-reset-zoom'),
sizeStyle: CupertinoButtonSize.small,
onPressed: _reset,
child: const Icon(
CupertinoIcons.arrow_down_right_arrow_up_left,
),
),
)
: IconButton(
key: const Key('artifact-image-reset-zoom'),
tooltip: 'Reset image zoom',
onPressed: _reset,
icon: const Icon(Icons.zoom_out_map),
),
),
],
);