Calculate number of columns depending on screen size

This commit is contained in:
2024-02-25 20:25:36 +01:00
parent 9252b0eef7
commit 4f23a492ab

View File

@ -12,7 +12,7 @@ class _MixingTabState extends State<MixingTab> {
@override
Widget build(BuildContext context) {
double screenWidth = MediaQuery.of(context).size.width;
int cols = screenWidth > 550 ? 2 : 1;
int cols = 1 + (screenWidth ~/ 550);
int cardHeight = 110;
return SizedBox.expand(