sort items in dialogs
This commit is contained in:
parent
9ef317f0ba
commit
02e73eed1b
@ -32,6 +32,7 @@ class _AddActorDialogState extends State<AddActorDialog> {
|
|||||||
return Text("Error");
|
return Text("Error");
|
||||||
} else if (snapshot.hasData) {
|
} else if (snapshot.hasData) {
|
||||||
final data = snapshot.data! as List<Actor>;
|
final data = snapshot.data! as List<Actor>;
|
||||||
|
data.sort((a, b) => a.name.compareTo(b.name));
|
||||||
return Column(
|
return Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: data
|
children: data
|
||||||
|
@ -32,6 +32,9 @@ class _AddTagDialogState extends State<AddTagDialog> {
|
|||||||
return Text("Error");
|
return Text("Error");
|
||||||
} else if (snapshot.hasData) {
|
} else if (snapshot.hasData) {
|
||||||
final data = snapshot.data! as List<Tag>;
|
final data = snapshot.data! as List<Tag>;
|
||||||
|
data.sort(
|
||||||
|
(a, b) => a.tagName.compareTo(b.tagName),
|
||||||
|
);
|
||||||
return Column(
|
return Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: data
|
children: data
|
||||||
|
Loading…
Reference in New Issue
Block a user