Added color picker
This commit is contained in:
parent
22aca9618e
commit
dcd05b53b4
5 changed files with 42 additions and 5 deletions
|
|
@ -1,8 +1,15 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_colorpicker/flutter_colorpicker.dart';
|
||||
import 'package:temperaturdecke/widgets/modal_wrapper.dart';
|
||||
|
||||
class AddWoolModal extends StatelessWidget {
|
||||
const AddWoolModal({super.key});
|
||||
AddWoolModal({super.key});
|
||||
|
||||
String selectedColor = "#FFFFFF";
|
||||
|
||||
void setSelectedColor(Color color) {
|
||||
selectedColor = colorToHex(color);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
@ -11,6 +18,16 @@ class AddWoolModal extends StatelessWidget {
|
|||
children: [
|
||||
TextField(),
|
||||
TextField(),
|
||||
SizedBox(
|
||||
height: 25,
|
||||
),
|
||||
ColorPicker(
|
||||
displayThumbColor: false,
|
||||
colorPickerWidth: 200,
|
||||
enableAlpha: false,
|
||||
pickerColor: Colors.black,
|
||||
onColorChanged: setSelectedColor,
|
||||
)
|
||||
],
|
||||
),
|
||||
title: "Wolle hinzufügen",
|
||||
|
|
|
|||
Reference in a new issue