2023-06-25 19:10:29 +02:00
|
|
|
import 'package:flutter/material.dart';
|
2023-06-25 21:11:10 +02:00
|
|
|
import 'package:mitgliederladen/sample_data.dart';
|
2023-06-25 19:10:29 +02:00
|
|
|
|
|
|
|
class Shopping extends StatelessWidget {
|
2023-06-25 21:11:10 +02:00
|
|
|
const Shopping({super.key});
|
2023-06-25 19:10:29 +02:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
|
|
|
floatingActionButton: FloatingActionButton(
|
|
|
|
child: const Icon(Icons.shopping_cart),
|
|
|
|
onPressed: () {},
|
|
|
|
),
|
|
|
|
body: GridView.builder(
|
|
|
|
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
crossAxisCount: 2),
|
2023-06-25 21:11:10 +02:00
|
|
|
itemCount: SampleData.categories.length,
|
2023-06-25 19:10:29 +02:00
|
|
|
itemBuilder: ((context, index) {
|
|
|
|
return Card(
|
|
|
|
child: Column(children: [
|
2023-06-25 21:11:10 +02:00
|
|
|
Expanded(
|
2023-06-25 19:10:29 +02:00
|
|
|
child: FittedBox(
|
|
|
|
fit: BoxFit.scaleDown,
|
|
|
|
child: Text(
|
2023-06-25 21:11:10 +02:00
|
|
|
SampleData.categories[index].icon,
|
|
|
|
style: const TextStyle(fontSize: 400),
|
2023-06-25 19:10:29 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
child: Text(
|
2023-06-25 21:11:10 +02:00
|
|
|
SampleData.categories[index].name,
|
2023-06-25 19:10:29 +02:00
|
|
|
style: Theme.of(context).textTheme.labelLarge,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
]),
|
|
|
|
);
|
|
|
|
})));
|
|
|
|
}
|
|
|
|
}
|