Add extra controller condition
This commit is contained in:
parent
df85b6271e
commit
926c0afe0a
|
@ -43,15 +43,16 @@ class CreatePostCommunityPicker extends HookWidget {
|
||||||
vertical: 16,
|
vertical: 16,
|
||||||
horizontal: 20,
|
horizontal: 20,
|
||||||
),
|
),
|
||||||
suffixIcon: store.selectedCommunity == null
|
suffixIcon:
|
||||||
? const Icon(Icons.arrow_drop_down)
|
store.selectedCommunity == null && controller.text.isEmpty
|
||||||
: IconButton(
|
? const Icon(Icons.arrow_drop_down)
|
||||||
onPressed: () {
|
: IconButton(
|
||||||
store.selectedCommunity = null;
|
onPressed: () {
|
||||||
controller.clear();
|
store.selectedCommunity = null;
|
||||||
},
|
controller.clear();
|
||||||
icon: const Icon(Icons.close),
|
},
|
||||||
),
|
icon: const Icon(Icons.close),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
onChanged: (_) => store.selectedCommunity = null,
|
onChanged: (_) => store.selectedCommunity = null,
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue