Settings
This commit is contained in:
parent
112b4a65c6
commit
ebe90a515c
|
|
@ -95,22 +95,33 @@ class _FormColorPickerState extends State<FormColorPicker> {
|
||||||
labelText: widget.labelText,
|
labelText: widget.labelText,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (_selectedColor == null)
|
Row(
|
||||||
IconButton(
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
icon: Icon(Icons.color_lens),
|
children: <Widget>[
|
||||||
onPressed: _showPicker,
|
Container(
|
||||||
),
|
color: convertHexStringToColor(widget.initialValue),
|
||||||
if (_selectedColor != null)
|
width: 100,
|
||||||
IconButton(
|
height: 20,
|
||||||
icon: Icon(Icons.clear),
|
),
|
||||||
onPressed: () {
|
SizedBox(width: 20),
|
||||||
_textController.text = '';
|
if (_selectedColor == null)
|
||||||
setState(() {
|
IconButton(
|
||||||
_selectedColor = null;
|
icon: Icon(Icons.color_lens),
|
||||||
});
|
onPressed: _showPicker,
|
||||||
widget.onSelected(null);
|
)
|
||||||
},
|
else
|
||||||
),
|
IconButton(
|
||||||
|
icon: Icon(Icons.clear),
|
||||||
|
onPressed: () {
|
||||||
|
_textController.text = '';
|
||||||
|
setState(() {
|
||||||
|
_selectedColor = null;
|
||||||
|
});
|
||||||
|
widget.onSelected(null);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue