[photos][mobile] Performance improvement (#1080)

## Description

Stack has `clipBehaviour = Clip.hardEdge` by default. This is necessary
if content inside the stack is overflowing it's boundary and it has to
be clipped. Clipping is expensive so it's worth removing it when it
makes sense.

In this case of `GalleryFileWidget`, content doesn't overflow the
Stack's boundary so the clip operation can be removed by setting
`clipBehaviour = Clip.none`.
This commit is contained in:
Ashil 2024-03-13 13:52:03 +05:30 committed by GitHub
parent ccb6a4a283
commit 6ef1da68e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -68,6 +68,7 @@ class GalleryFileWidget extends StatelessWidget {
: _onLongPressNoSelectionLimit(context, file);
},
child: Stack(
clipBehavior: Clip.none,
children: [
ClipRRect(
borderRadius: BorderRadius.circular(1),