initial commit

This commit is contained in:
2024-03-19 15:51:03 +01:00
parent 5c18ba7beb
commit 5e671eeb08
9 changed files with 241 additions and 114 deletions
+46
View File
@@ -0,0 +1,46 @@
import 'package:flutter/material.dart';
import 'package:flutter_shopping_list/models/category.dart';
const categories = {
Categories.vegetables: Category(
'Vegetables',
Color.fromARGB(255, 0, 255, 128),
),
Categories.fruit: Category(
'Fruit',
Color.fromARGB(255, 145, 255, 0),
),
Categories.meat: Category(
'Meat',
Color.fromARGB(255, 255, 102, 0),
),
Categories.dairy: Category(
'Dairy',
Color.fromARGB(255, 0, 208, 255),
),
Categories.carbs: Category(
'Carbs',
Color.fromARGB(255, 0, 60, 255),
),
Categories.sweets: Category(
'Sweets',
Color.fromARGB(255, 255, 149, 0),
),
Categories.spices: Category(
'Spices',
Color.fromARGB(255, 255, 187, 0),
),
Categories.convenience: Category(
'Convenience',
Color.fromARGB(255, 191, 0, 255),
),
Categories.hygiene: Category(
'Hygiene',
Color.fromARGB(255, 149, 0, 255),
),
Categories.other: Category(
'Other',
Color.fromARGB(255, 0, 225, 255),
),
};
+21
View File
@@ -0,0 +1,21 @@
import 'package:flutter_shopping_list/models/grocery_item.dart';
import 'package:flutter_shopping_list/models/category.dart';
import 'package:flutter_shopping_list/data/categories.dart';
final groceryItems = [
GroceryItem(
id: 'a',
name: 'Milk',
quantity: 1,
category: categories[Categories.dairy]!),
GroceryItem(
id: 'b',
name: 'Bananas',
quantity: 5,
category: categories[Categories.fruit]!),
GroceryItem(
id: 'c',
name: 'Beef Steak',
quantity: 1,
category: categories[Categories.meat]!),
];