mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-21 05:29:29 +02:00
Added sections to settings page
This commit is contained in:
@@ -28,7 +28,13 @@ class _SettingsPageState extends State<SettingsPage> {
|
|||||||
child: settingsProvider.prefs == null
|
child: settingsProvider.prefs == null
|
||||||
? Container()
|
? Container()
|
||||||
: Column(
|
: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
Text(
|
||||||
|
'Appearance',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Theme.of(context).colorScheme.primary),
|
||||||
|
),
|
||||||
DropdownButtonFormField(
|
DropdownButtonFormField(
|
||||||
decoration:
|
decoration:
|
||||||
const InputDecoration(labelText: 'Theme'),
|
const InputDecoration(labelText: 'Theme'),
|
||||||
@@ -77,6 +83,84 @@ class _SettingsPageState extends State<SettingsPage> {
|
|||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 16,
|
height: 16,
|
||||||
),
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: DropdownButtonFormField(
|
||||||
|
decoration: const InputDecoration(
|
||||||
|
labelText: 'App Sort By'),
|
||||||
|
value: settingsProvider.sortColumn,
|
||||||
|
items: const [
|
||||||
|
DropdownMenuItem(
|
||||||
|
value: SortColumnSettings.authorName,
|
||||||
|
child: Text('Author/Name'),
|
||||||
|
),
|
||||||
|
DropdownMenuItem(
|
||||||
|
value: SortColumnSettings.nameAuthor,
|
||||||
|
child: Text('Name/Author'),
|
||||||
|
),
|
||||||
|
DropdownMenuItem(
|
||||||
|
value: SortColumnSettings.added,
|
||||||
|
child: Text('As Added'),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
onChanged: (value) {
|
||||||
|
if (value != null) {
|
||||||
|
settingsProvider.sortColumn = value;
|
||||||
|
}
|
||||||
|
})),
|
||||||
|
const SizedBox(
|
||||||
|
width: 16,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: DropdownButtonFormField(
|
||||||
|
decoration: const InputDecoration(
|
||||||
|
labelText: 'App Sort Order'),
|
||||||
|
value: settingsProvider.sortOrder,
|
||||||
|
items: const [
|
||||||
|
DropdownMenuItem(
|
||||||
|
value: SortOrderSettings.ascending,
|
||||||
|
child: Text('Ascending'),
|
||||||
|
),
|
||||||
|
DropdownMenuItem(
|
||||||
|
value: SortOrderSettings.descending,
|
||||||
|
child: Text('Descending'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
onChanged: (value) {
|
||||||
|
if (value != null) {
|
||||||
|
settingsProvider.sortOrder = value;
|
||||||
|
}
|
||||||
|
})),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
const Text('Show Source Webpage in App View'),
|
||||||
|
Switch(
|
||||||
|
value: settingsProvider.showAppWebpage,
|
||||||
|
onChanged: (value) {
|
||||||
|
settingsProvider.showAppWebpage = value;
|
||||||
|
})
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const Divider(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'More',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Theme.of(context).colorScheme.primary),
|
||||||
|
),
|
||||||
DropdownButtonFormField(
|
DropdownButtonFormField(
|
||||||
decoration: const InputDecoration(
|
decoration: const InputDecoration(
|
||||||
labelText:
|
labelText:
|
||||||
@@ -117,68 +201,6 @@ class _SettingsPageState extends State<SettingsPage> {
|
|||||||
settingsProvider.updateInterval = value;
|
settingsProvider.updateInterval = value;
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
const SizedBox(
|
|
||||||
height: 16,
|
|
||||||
),
|
|
||||||
DropdownButtonFormField(
|
|
||||||
decoration:
|
|
||||||
const InputDecoration(labelText: 'App Sort By'),
|
|
||||||
value: settingsProvider.sortColumn,
|
|
||||||
items: const [
|
|
||||||
DropdownMenuItem(
|
|
||||||
value: SortColumnSettings.authorName,
|
|
||||||
child: Text('Author/Name'),
|
|
||||||
),
|
|
||||||
DropdownMenuItem(
|
|
||||||
value: SortColumnSettings.nameAuthor,
|
|
||||||
child: Text('Name/Author'),
|
|
||||||
),
|
|
||||||
DropdownMenuItem(
|
|
||||||
value: SortColumnSettings.added,
|
|
||||||
child: Text('As Added'),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
onChanged: (value) {
|
|
||||||
if (value != null) {
|
|
||||||
settingsProvider.sortColumn = value;
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
const SizedBox(
|
|
||||||
height: 16,
|
|
||||||
),
|
|
||||||
DropdownButtonFormField(
|
|
||||||
decoration: const InputDecoration(
|
|
||||||
labelText: 'App Sort Order'),
|
|
||||||
value: settingsProvider.sortOrder,
|
|
||||||
items: const [
|
|
||||||
DropdownMenuItem(
|
|
||||||
value: SortOrderSettings.ascending,
|
|
||||||
child: Text('Ascending'),
|
|
||||||
),
|
|
||||||
DropdownMenuItem(
|
|
||||||
value: SortOrderSettings.descending,
|
|
||||||
child: Text('Descending'),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
onChanged: (value) {
|
|
||||||
if (value != null) {
|
|
||||||
settingsProvider.sortOrder = value;
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
const SizedBox(
|
|
||||||
height: 16,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
const Text('Show Source Webpage in App View'),
|
|
||||||
Switch(
|
|
||||||
value: settingsProvider.showAppWebpage,
|
|
||||||
onChanged: (value) {
|
|
||||||
settingsProvider.showAppWebpage = value;
|
|
||||||
})
|
|
||||||
],
|
|
||||||
),
|
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
Reference in New Issue
Block a user