Use native image reset controls on each host
This commit is contained in:
@@ -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),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user