Skip to content

Commit 0340194

Browse files
authored
refactor(voices): replace Row with SelectionArea in category and discovery pages for better interaction handling (#2149)
1 parent 1e4f48a commit 0340194

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

catalyst_voices/apps/voices/lib/pages/category/category_page.dart

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,22 @@ class _Body extends StatelessWidget {
3737
Widget build(BuildContext context) {
3838
return Skeletonizer(
3939
enabled: isLoading,
40-
child: Row(
41-
mainAxisSize: MainAxisSize.min,
42-
crossAxisAlignment: CrossAxisAlignment.start,
43-
children: [
44-
Expanded(
45-
child: CategoryDetailView(
40+
child: SelectionArea(
41+
child: Row(
42+
mainAxisSize: MainAxisSize.min,
43+
crossAxisAlignment: CrossAxisAlignment.start,
44+
children: [
45+
Expanded(
46+
child: CategoryDetailView(
47+
category: category,
48+
),
49+
),
50+
const SizedBox(width: 48),
51+
_CardInformation(
4652
category: category,
4753
),
48-
),
49-
const SizedBox(width: 48),
50-
_CardInformation(
51-
category: category,
52-
),
53-
],
54+
],
55+
),
5456
),
5557
);
5658
}

catalyst_voices/apps/voices/lib/pages/discovery/discovery_page.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ class _Body extends StatelessWidget {
4444
class _DiscoveryPageState extends State<DiscoveryPage> {
4545
@override
4646
Widget build(BuildContext context) {
47-
return const CustomScrollView(
48-
slivers: [
49-
_Body(),
50-
],
47+
return const SelectionArea(
48+
child: CustomScrollView(
49+
slivers: [
50+
_Body(),
51+
],
52+
),
5153
);
5254
}
5355

0 commit comments

Comments
 (0)