Replace `describeEnum` by nice lookin string
This commit is contained in:
parent
b9337a43ae
commit
ececfaf93e
|
@ -31,9 +31,7 @@ class PostListOptions extends HookWidget {
|
||||||
RadioListTile<SortType>(
|
RadioListTile<SortType>(
|
||||||
value: x,
|
value: x,
|
||||||
groupValue: sort.value,
|
groupValue: sort.value,
|
||||||
// TODO: use something more robust and user-friendly
|
title: Text(x.value),
|
||||||
// than describeEnum
|
|
||||||
title: Text(describeEnum(x)),
|
|
||||||
onChanged: (val) {
|
onChanged: (val) {
|
||||||
sort.value = val;
|
sort.value = val;
|
||||||
onChange(val);
|
onChange(val);
|
||||||
|
@ -57,7 +55,7 @@ class PostListOptions extends HookWidget {
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(describeEnum(sort.value)),
|
Text(sort.value.value),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Icon(Icons.arrow_drop_down),
|
Icon(Icons.arrow_drop_down),
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue