diff --git a/lib/pages/settings.dart b/lib/pages/settings.dart index d840134..0129f46 100644 --- a/lib/pages/settings.dart +++ b/lib/pages/settings.dart @@ -28,7 +28,13 @@ class _SettingsPageState extends State { child: settingsProvider.prefs == null ? Container() : Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text( + 'Appearance', + style: TextStyle( + color: Theme.of(context).colorScheme.primary), + ), DropdownButtonFormField( decoration: const InputDecoration(labelText: 'Theme'), @@ -77,6 +83,84 @@ class _SettingsPageState extends State { const SizedBox( 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( decoration: const InputDecoration( labelText: @@ -117,68 +201,6 @@ class _SettingsPageState extends State { 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(), Row( mainAxisAlignment: MainAxisAlignment.center,