Better add wool modal
This commit is contained in:
parent
c9d62743f6
commit
aa25288c3e
3 changed files with 78 additions and 19 deletions
|
|
@ -1,32 +1,83 @@
|
|||
import 'package:flex_color_picker/flex_color_picker.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_colorpicker/flutter_colorpicker.dart';
|
||||
import 'package:hexcolor/hexcolor.dart';
|
||||
import 'package:temperaturdecke/widgets/modal_wrapper.dart';
|
||||
|
||||
class AddWoolModal extends StatelessWidget {
|
||||
AddWoolModal({super.key});
|
||||
|
||||
String selectedColor = "#FFFFFF";
|
||||
Color selectedColor = Colors.white;
|
||||
|
||||
void setSelectedColor(Color color) {
|
||||
selectedColor = colorToHex(color);
|
||||
selectedColor = color;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ModalWrapper(
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
TextField(),
|
||||
TextField(),
|
||||
SizedBox(
|
||||
height: 25,
|
||||
),
|
||||
Text(
|
||||
"Randdaten",
|
||||
textAlign: TextAlign.start,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
TextField(
|
||||
decoration: InputDecoration(
|
||||
border: OutlineInputBorder(),
|
||||
labelText: 'Name',
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 25,
|
||||
),
|
||||
TextField(
|
||||
decoration: InputDecoration(
|
||||
border: OutlineInputBorder(),
|
||||
labelText: 'Marke',
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 25,
|
||||
),
|
||||
Text(
|
||||
"Farbe",
|
||||
textAlign: TextAlign.start,
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
ColorPicker(
|
||||
displayThumbColor: false,
|
||||
colorPickerWidth: 200,
|
||||
enableAlpha: false,
|
||||
pickerColor: Colors.black,
|
||||
onColorChanged: setSelectedColor,
|
||||
spacing: 8,
|
||||
padding: EdgeInsets.all(0),
|
||||
borderRadius: 10,
|
||||
onColorChanged: (value) => setSelectedColor(value),
|
||||
enableShadesSelection: false,
|
||||
enableTonalPalette: true,
|
||||
tonalColorSameSize: true,
|
||||
pickersEnabled: {ColorPickerType.accent: false},
|
||||
tonalSubheading: Divider(),
|
||||
),
|
||||
SizedBox(
|
||||
height: 25,
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: FilledButton(
|
||||
onPressed: () => () {},
|
||||
child: Text(
|
||||
"Hinzufügen",
|
||||
style: TextStyle(fontSize: 16),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
|
|
|||
Reference in a new issue