mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-10-26 19:23:45 +01:00
Broke GeneratedFormItem into sub-types
Prep for "chips" input type
This commit is contained in:
@@ -155,12 +155,12 @@ class SettingsProvider with ChangeNotifier {
|
||||
prefs?.setString('categories', jsonEncode(cats));
|
||||
}
|
||||
|
||||
getCategoryFormItem({String initCategory = ''}) =>
|
||||
GeneratedFormItem('category',
|
||||
label: tr('category'),
|
||||
opts: [
|
||||
MapEntry('', tr('noCategory')),
|
||||
...categories.entries.map((e) => MapEntry(e.key, e.key)).toList()
|
||||
],
|
||||
defaultValue: initCategory);
|
||||
getCategoryFormItem({String initCategory = ''}) => GeneratedFormDropdown(
|
||||
'category',
|
||||
label: tr('category'),
|
||||
[
|
||||
MapEntry('', tr('noCategory')),
|
||||
...categories.entries.map((e) => MapEntry(e.key, e.key)).toList()
|
||||
],
|
||||
defaultValue: initCategory);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user