33 lines
771 B
Dart
33 lines
771 B
Dart
import 'package:flutter/material.dart';
|
|
import 'sample_data.dart';
|
|
|
|
/* todo:
|
|
- Flag für Ansicht/Bearbeitung
|
|
- individuelle Icons je nach Kategorie
|
|
- Pfand
|
|
- Gesamtpreis
|
|
*/
|
|
|
|
class ShowBasket extends StatelessWidget {
|
|
ShowBasket({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ListView.builder(
|
|
itemCount: null,
|
|
itemBuilder: (context, index) {
|
|
if (index < SampleData().basket.purchases.length) {
|
|
return Card(
|
|
child: ListTile(
|
|
leading: const Icon(Icons.abc),
|
|
title: Text(SampleData().basket.purchases.keys.elementAt(index).name),
|
|
//trailing: Text(),
|
|
),
|
|
);
|
|
} else {
|
|
return null;
|
|
}
|
|
},
|
|
);
|
|
}
|
|
}
|