You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an issue where if I want to have a larger in as preview in a GridView it won't work, while it expands to the larger preview normally when there's no GridView, there seems to be a constraint in the GridView that's effecting the previewBuilders size, it also happens in SliverGridViews I ran into it while build a photo gallery app, I wanted the original large photo to show when I hold a photo, so it would be great if it gets fixed, or if there is a workaround or something else I may be unaware of.
There is an issue where if I want to have a larger in as preview in a GridView it won't work, while it expands to the larger preview normally when there's no GridView, there seems to be a constraint in the GridView that's effecting the previewBuilders size, it also happens in SliverGridViews I ran into it while build a photo gallery app, I wanted the original large photo to show when I hold a photo, so it would be great if it gets fixed, or if there is a workaround or something else I may be unaware of.
Recording.at.2024-12-19.00.41.27.mp4
Recording.at.2024-12-19.00.43.16.mp4
code for a normal use case example:
`
class ContextMenuExample extends StatelessWidget {
const ContextMenuExample({super.key});
@OverRide
Widget build(BuildContext context) {
return CupertinoPageScaffold(
child: Center(
child: ContextMenuWidget(
previewBuilder: (context, child) {
return Container(
height: 500,
width: 500,
color: Colors.amber.shade600,
padding: const EdgeInsets.all(54),
child: const Text('Custom menu preview'),
);
},
child: Container(
height: 100,
width: 100,
padding: const EdgeInsets.all(20),
decoration: BoxDecoration(
color: CupertinoColors.systemBlue,
borderRadius: BorderRadius.circular(15),
),
child: const Center(child: Text('Menu')),
),
menuProvider: (_) {
return Menu(
children: [
MenuAction(
image: MenuImage.icon(Icons.access_time),
title: 'Menu Item 1',
callback: () {},
),
],
);
},
),
),
);
}
}
`
code for the GridView example:
`class ContextMenuGrid extends StatelessWidget {
const ContextMenuGrid({super.key});
@OverRide
Widget build(BuildContext context) {
return GridView.builder(
}
}
`
The text was updated successfully, but these errors were encountered: