mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-16 10:46:00 -07:00
fix: Sorting of items in option dialog
fix: Translation of sizes
This commit is contained in:
parent
2a5e2b4be1
commit
11189455ed
2 changed files with 7 additions and 1 deletions
|
|
@ -26,7 +26,7 @@ List<Widget> buildClientSettingsAdvanced(BuildContext context, WidgetRef ref) {
|
||||||
contentPadding: EdgeInsets.zero,
|
contentPadding: EdgeInsets.zero,
|
||||||
value: selected,
|
value: selected,
|
||||||
onChanged: (value) => tap(),
|
onChanged: (value) => tap(),
|
||||||
title: Text(type.name),
|
title: Text(type.label(context)),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
ref.read(homeSettingsProvider.notifier).setViewSize(newItems.toSet());
|
ref.read(homeSettingsProvider.notifier).setViewSize(newItems.toSet());
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
import 'dart:collection';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
Future<List<T>> openMultiSelectOptions<T>(
|
Future<List<T>> openMultiSelectOptions<T>(
|
||||||
|
|
@ -40,6 +42,10 @@ Future<List<T>> openMultiSelectOptions<T>(
|
||||||
currentSelection = {item};
|
currentSelection = {item};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
currentSelection = SplayTreeSet.of(
|
||||||
|
currentSelection,
|
||||||
|
(a, b) => items.indexOf(a).compareTo(items.indexOf(b)),
|
||||||
|
);
|
||||||
onChanged?.call(currentSelection.toList());
|
onChanged?.call(currentSelection.toList());
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue