Skip to content

Commit

Permalink
fix: Allow toggling of sections from anywhere in the row
Browse files Browse the repository at this point in the history
Previously, only clicking the actual title text of the row would toggle the section
  • Loading branch information
ashuntu committed Oct 4, 2024
1 parent a7bd8af commit ab20227
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/game_center/lib/steam/steam_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ class SteamPage extends ConsumerWidget {
children: [
Text(
l10n.steamGlobalConfigTitle,
style: Theme.of(context).textTheme.headlineSmall,
style: Theme.of(context).textTheme.titleLarge,
),
const SizedBox(height: kPagePadding),
_SteamGlobalConfigText(),
const SizedBox(height: kPagePadding),
Text(
l10n.steamUserConfigTitle,
style: Theme.of(context).textTheme.headlineSmall,
style: Theme.of(context).textTheme.titleLarge,
),
const SizedBox(height: kPagePadding),
_SteamUserConfigs(),
Expand Down
20 changes: 14 additions & 6 deletions packages/game_center/lib/widgets/expandable_page_section.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,20 @@ class ExpandablePageSection extends StatelessWidget {
expandButtonPosition: YaruExpandableButtonPosition.start,
isExpanded: expanded,
gapHeight: 24,
header: Text(
title,
style: Theme.of(context)
.textTheme
.titleMedium
?.copyWith(fontWeight: FontWeight.w500),
// Text is surrounded with a Flex to allow toggling anywhere in the row
header: Flex(
direction: Axis.horizontal,
children: [
Expanded(
child: Text(
title,
style: Theme.of(context)
.textTheme
.titleMedium
?.copyWith(fontWeight: FontWeight.bold),
),
),
],
),
child: SizedBox(
child: Column(
Expand Down

0 comments on commit ab20227

Please sign in to comment.