This commit is contained in:
Hillel Coren 2019-11-05 17:02:14 +02:00
parent 112b4a65c6
commit ebe90a515c
1 changed files with 27 additions and 16 deletions

View File

@ -95,12 +95,21 @@ class _FormColorPickerState extends State<FormColorPicker> {
labelText: widget.labelText,
),
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Container(
color: convertHexStringToColor(widget.initialValue),
width: 100,
height: 20,
),
SizedBox(width: 20),
if (_selectedColor == null)
IconButton(
icon: Icon(Icons.color_lens),
onPressed: _showPicker,
),
if (_selectedColor != null)
)
else
IconButton(
icon: Icon(Icons.clear),
onPressed: () {
@ -112,6 +121,8 @@ class _FormColorPickerState extends State<FormColorPicker> {
},
),
],
),
],
);
}
}