Mitgliederladen/Frontend-user/lib/shopping.dart

41 lines
1.3 KiB
Dart

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