Skip to content

Commit 3d4f9ad

Browse files
authored
fix: start proposal wide screen (#2681)
1 parent 79b3756 commit 3d4f9ad

File tree

2 files changed

+34
-30
lines changed

2 files changed

+34
-30
lines changed

catalyst_voices/apps/voices/lib/widgets/modals/proposals/create_new_proposal_category_selection.dart

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,34 +24,36 @@ class CreateNewProposalCategorySelection extends StatelessWidget {
2424

2525
@override
2626
Widget build(BuildContext context) {
27-
return ConstrainedBox(
28-
constraints: const BoxConstraints(maxHeight: 430),
29-
child: Row(
30-
crossAxisAlignment: CrossAxisAlignment.start,
31-
children: [
32-
Expanded(
33-
child: ListView.separated(
34-
itemBuilder: (context, index) => _CategoryCard(
35-
name: categories[index].formattedName,
36-
description: categories[index].shortDescription,
37-
ref: categories[index].id,
38-
isSelected: categories[index].id == selectedCategory,
39-
onCategorySelected: onCategorySelected,
27+
return Expanded(
28+
child: Padding(
29+
padding: const EdgeInsets.only(bottom: 50),
30+
child: Row(
31+
crossAxisAlignment: CrossAxisAlignment.start,
32+
children: [
33+
Expanded(
34+
child: ListView.separated(
35+
itemBuilder: (context, index) => _CategoryCard(
36+
name: categories[index].formattedName,
37+
description: categories[index].shortDescription,
38+
ref: categories[index].id,
39+
isSelected: categories[index].id == selectedCategory,
40+
onCategorySelected: onCategorySelected,
41+
),
42+
separatorBuilder: (context, index) => const SizedBox(height: 16),
43+
itemCount: categories.length,
4044
),
41-
separatorBuilder: (context, index) => const SizedBox(height: 16),
42-
itemCount: categories.length,
4345
),
44-
),
45-
const SizedBox(width: 16),
46-
Expanded(
47-
flex: 2,
48-
child: _selectedCategory != null
49-
? SingleChildScrollView(
50-
child: CategoryCompactDetailView(category: _selectedCategory!),
51-
)
52-
: const _NoneCategorySelected(),
53-
),
54-
],
46+
const SizedBox(width: 16),
47+
Expanded(
48+
flex: 2,
49+
child: _selectedCategory != null
50+
? SingleChildScrollView(
51+
child: CategoryCompactDetailView(category: _selectedCategory!),
52+
)
53+
: const _NoneCategorySelected(),
54+
),
55+
],
56+
),
5557
),
5658
);
5759
}

catalyst_voices/apps/voices/lib/widgets/modals/proposals/create_new_proposal_dialog.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,13 @@ class _ContentView extends StatelessWidget {
9393
Widget build(BuildContext context) {
9494
return Padding(
9595
padding: const EdgeInsets.fromLTRB(24, 16, 24, 24),
96-
child: Column(
97-
mainAxisAlignment: MainAxisAlignment.spaceBetween,
96+
child: Stack(
9897
children: [
9998
child,
100-
CreateNewProposalActionButtons(step: step),
99+
Align(
100+
alignment: Alignment.bottomCenter,
101+
child: CreateNewProposalActionButtons(step: step),
102+
),
101103
],
102104
),
103105
);
@@ -109,7 +111,7 @@ class _CreateNewProposalDialogState extends State<CreateNewProposalDialog>
109111
@override
110112
Widget build(BuildContext context) {
111113
return VoicesDetailsDialog(
112-
constraints: const BoxConstraints(maxHeight: 800, maxWidth: 1200),
114+
constraints: const BoxConstraints.tightFor(height: 800, width: 1200),
113115
header: VoicesAlignTitleHeader(
114116
title: _getTitle(),
115117
padding: const EdgeInsets.all(24),

0 commit comments

Comments
 (0)