feat: replace ListView with SingleChildScrollView for better layout in admin panels
Test Suite / test (24.15.0) (push) Has been cancelled
Test Suite / test (24.15.0) (push) Has been cancelled
This commit is contained in:
@@ -296,13 +296,16 @@ class _AdminAliasesPanelState extends ConsumerState<AdminAliasesPanel> {
|
|||||||
|
|
||||||
if (filteredAliases.isEmpty) return content;
|
if (filteredAliases.isEmpty) return content;
|
||||||
|
|
||||||
return Column(
|
return SingleChildScrollView(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
padding: const EdgeInsets.all(12),
|
||||||
children: [
|
child: Column(
|
||||||
content,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
const SizedBox(height: 8),
|
children: [
|
||||||
Expanded(child: buildAliasList()),
|
content,
|
||||||
],
|
const SizedBox(height: 8),
|
||||||
|
...filteredAliases.map(buildAliasCard),
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,16 +140,19 @@ class _AdminPendingProductsPanelState
|
|||||||
|
|
||||||
if (!widget.embedded) return content;
|
if (!widget.embedded) return content;
|
||||||
|
|
||||||
return Column(
|
return SingleChildScrollView(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
padding: const EdgeInsets.all(12),
|
||||||
children: [
|
child: Column(
|
||||||
Text(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
context.l10n.adminPendingDescription,
|
children: [
|
||||||
style: theme.textTheme.bodyMedium,
|
Text(
|
||||||
),
|
context.l10n.adminPendingDescription,
|
||||||
const SizedBox(height: 12),
|
style: theme.textTheme.bodyMedium,
|
||||||
Expanded(child: content),
|
),
|
||||||
],
|
const SizedBox(height: 12),
|
||||||
|
content,
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -738,9 +738,9 @@ class _AdminProductsPanelState extends ConsumerState<AdminProductsPanel> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ListView(
|
return SingleChildScrollView(
|
||||||
padding: EdgeInsets.zero,
|
padding: const EdgeInsets.all(12),
|
||||||
children: [content],
|
child: content,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -349,33 +349,36 @@ class _AdminUsersPanelState extends ConsumerState<AdminUsersPanel> {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Column(
|
return SingleChildScrollView(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
padding: const EdgeInsets.all(12),
|
||||||
children: [
|
child: Column(
|
||||||
Row(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Row(
|
||||||
child: Text(
|
children: [
|
||||||
context.l10n.adminUsersDescription,
|
Expanded(
|
||||||
style: theme.textTheme.bodyMedium,
|
child: Text(
|
||||||
|
context.l10n.adminUsersDescription,
|
||||||
|
style: theme.textTheme.bodyMedium,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
IconButton(
|
||||||
IconButton(
|
icon: const Icon(Icons.refresh),
|
||||||
icon: const Icon(Icons.refresh),
|
tooltip: 'Uppdatera',
|
||||||
tooltip: 'Uppdatera',
|
onPressed: _load,
|
||||||
onPressed: _load,
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
const SizedBox(height: 8),
|
||||||
const SizedBox(height: 8),
|
FilledButton.icon(
|
||||||
FilledButton.icon(
|
onPressed: _createUser,
|
||||||
onPressed: _createUser,
|
icon: const Icon(Icons.person_add_outlined),
|
||||||
icon: const Icon(Icons.person_add_outlined),
|
label: Text(context.l10n.adminNewUser),
|
||||||
label: Text(context.l10n.adminNewUser),
|
),
|
||||||
),
|
const SizedBox(height: 16),
|
||||||
const SizedBox(height: 16),
|
list,
|
||||||
Expanded(child: list),
|
],
|
||||||
],
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user