fix
This commit is contained in:
parent
bc146a48a7
commit
678dfd6c8b
@ -192,17 +192,14 @@ class _AddMountScreenState extends State<AddMountScreen> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _handleChange(String mountType) {
|
void _handleChange(String mountType) {
|
||||||
if (_mountType == mountType) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
final changed = _mountType != mountType;
|
final changedFromSia = _mountType != mountType && mountType == 'Sia';
|
||||||
|
|
||||||
_mountType = mountType;
|
_mountType = mountType;
|
||||||
_mountNameController.text =
|
_mountNameController.text =
|
||||||
(mountType == 'Sia' && _mountNameController.text.isEmpty)
|
(mountType == 'Sia' && _mountNameController.text.isEmpty)
|
||||||
? 'default'
|
? 'default'
|
||||||
: changed
|
: changedFromSia
|
||||||
? ''
|
? ''
|
||||||
: _mountNameController.text;
|
: _mountNameController.text;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user