Delte button + create wool from modal
This commit is contained in:
parent
aa25288c3e
commit
732042255a
8 changed files with 52 additions and 29 deletions
|
|
@ -1,12 +1,15 @@
|
|||
import 'package:flex_color_picker/flex_color_picker.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hexcolor/hexcolor.dart';
|
||||
import 'package:temperaturdecke/db_test.dart';
|
||||
import 'package:temperaturdecke/widgets/modal_wrapper.dart';
|
||||
|
||||
class AddWoolModal extends StatelessWidget {
|
||||
AddWoolModal({super.key});
|
||||
|
||||
Color selectedColor = Colors.white;
|
||||
String title = "";
|
||||
String manufacture = "";
|
||||
|
||||
void setSelectedColor(Color color) {
|
||||
selectedColor = color;
|
||||
|
|
@ -19,7 +22,7 @@ class AddWoolModal extends StatelessWidget {
|
|||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 25,
|
||||
height: 15,
|
||||
),
|
||||
Text(
|
||||
"Randdaten",
|
||||
|
|
@ -30,6 +33,7 @@ class AddWoolModal extends StatelessWidget {
|
|||
height: 10,
|
||||
),
|
||||
TextField(
|
||||
onChanged: (value) => {title = value},
|
||||
decoration: InputDecoration(
|
||||
border: OutlineInputBorder(),
|
||||
labelText: 'Name',
|
||||
|
|
@ -39,13 +43,14 @@ class AddWoolModal extends StatelessWidget {
|
|||
height: 25,
|
||||
),
|
||||
TextField(
|
||||
onChanged: (value) => {manufacture = value},
|
||||
decoration: InputDecoration(
|
||||
border: OutlineInputBorder(),
|
||||
labelText: 'Marke',
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 25,
|
||||
height: 30,
|
||||
),
|
||||
Text(
|
||||
"Farbe",
|
||||
|
|
@ -72,7 +77,12 @@ class AddWoolModal extends StatelessWidget {
|
|||
Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: FilledButton(
|
||||
onPressed: () => () {},
|
||||
onPressed: () => addWool(
|
||||
context,
|
||||
title,
|
||||
manufacture,
|
||||
selectedColor,
|
||||
),
|
||||
child: Text(
|
||||
"Hinzufügen",
|
||||
style: TextStyle(fontSize: 16),
|
||||
|
|
|
|||
Reference in a new issue