main #1

Open
fdenzer wants to merge 46 commits from mgl_crew/Mitgliederladen:main into main
4 changed files with 47 additions and 19 deletions
Showing only changes of commit 000f141b5a - Show all commits

View file

@ -4,7 +4,7 @@ import 'sample_data.dart';
/* todo:
- individuelle Icons je nach Kategorie
- Gesamtpreis
- editing
*/
class ShowBasket extends StatelessWidget {
@ -84,7 +84,7 @@ class ShowBasket extends StatelessWidget {
Widget getLeading(Category category) {
switch (category) {
case Category.obstUndGemuese:
return const Text("🍅");
return const Text("🍒");
case Category.brotCerealienUndAufstriche:
return const Text(
'🍞',

View file

@ -7,11 +7,10 @@ import 'sample_data.dart';
/*
todo:
- Einkauf und Settings
- Warenkorb
- farbliche Hervorhebungen
- semanticLabels, Screenreader
- monatliche Aufladung: ausstehende Beträge
- Icons: maybe flutter awesome
- Error-Management (throw)
*/
class Finance extends StatelessWidget {

View file

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:mitgliederladen/shopping.dart';
import 'finance.dart';
void main() {
@ -17,17 +18,19 @@ class MyApp extends StatelessWidget {
//darkgreen:5f7c61, mediumgreen: 66906a, lightgreen: 9cbe96, yellow: f5de64
useMaterial3: true,
brightness: Brightness.light,
textTheme: Typography.englishLike2021,
colorScheme: ColorScheme.fromSeed(
brightness: Brightness.light,
seedColor: const Color(0xff5f7c61))),
darkTheme: ThemeData(
useMaterial3: true,
brightness: Brightness.dark,
textTheme: Typography.englishLike2021,
colorScheme: ColorScheme.fromSeed(
brightness: Brightness.dark,
seedColor: const Color(0xff5f7c61),
)),
themeMode: ThemeMode.system,
themeMode: ThemeMode.dark,
home: const MyHomePage(),
);
}
@ -76,20 +79,7 @@ class _MyHomePageState extends State<MyHomePage> {
],
),
body: <Widget>[
Scaffold(
floatingActionButton: FloatingActionButton(
child: const Icon(Icons.shopping_cart),
onPressed: () {
setState(() {
test++;
});
},
),
body: Container(
color: Colors.green,
alignment: Alignment.center,
child: Text('Page $test'),
)),
Shopping(),
const Finance(),
ListView(children: const <Widget>[
ListTile(

View file

@ -0,0 +1,39 @@
import 'package:flutter/material.dart';
class Shopping extends StatelessWidget {
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),
itemBuilder: ((context, index) {
return Card(
child: Column(children: [
const Expanded(
child: FittedBox(
fit: BoxFit.scaleDown,
child: Text(
'🍒',
style: TextStyle(fontSize: 400),
),
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'Obst und Gemüse',
style: Theme.of(context).textTheme.labelLarge,
),
),
]),
);
})));
}
}