Slight UI improvement on Add App page

This commit is contained in:
Imran Remtulla
2023-05-06 01:25:39 -04:00
parent 91ad9efa43
commit 3be5543df4

View File

@@ -340,8 +340,8 @@ class _AddAppPageState extends State<AddAppPage> {
], ],
), ),
const SizedBox( const SizedBox(
height: 25, height: 16,
), )
]); ]);
bool shouldShowSearchBar() => bool shouldShowSearchBar() =>
@@ -383,20 +383,18 @@ class _AddAppPageState extends State<AddAppPage> {
Widget getAdditionalOptsCol() => Column( Widget getAdditionalOptsCol() => Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [
const Divider( const SizedBox(
height: 64, height: 16,
), ),
Text( Text(
tr('additionalOptsFor', tr('additionalOptsFor',
args: [pickedSource?.name ?? tr('source')]), args: [pickedSource?.name ?? tr('source')]),
style: TextStyle(color: Theme.of(context).colorScheme.primary)), style: TextStyle(
color: Theme.of(context).colorScheme.primary,
fontWeight: FontWeight.bold)),
const SizedBox( const SizedBox(
height: 16, height: 16,
), ),
if (pickedSourceOverride != null ||
pickedSource.runtimeType.toString() ==
HTML().runtimeType.toString())
getHTMLSourceOverrideDropdown(),
GeneratedForm( GeneratedForm(
key: Key(pickedSource.runtimeType.toString()), key: Key(pickedSource.runtimeType.toString()),
items: pickedSource!.combinedAppSpecificSettingFormItems, items: pickedSource!.combinedAppSpecificSettingFormItems,
@@ -470,11 +468,15 @@ class _AddAppPageState extends State<AddAppPage> {
const SizedBox( const SizedBox(
height: 16, height: 16,
), ),
if (shouldShowSearchBar()) if (pickedSourceOverride != null ||
const SizedBox( (pickedSource != null &&
height: 16, pickedSource.runtimeType.toString() ==
), HTML().runtimeType.toString()))
getHTMLSourceOverrideDropdown(),
if (shouldShowSearchBar()) getSearchBarRow(), if (shouldShowSearchBar()) getSearchBarRow(),
const SizedBox(
height: 16,
),
if (pickedSource != null) if (pickedSource != null)
getAdditionalOptsCol() getAdditionalOptsCol()
else else