Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 36 additions & 20 deletions lib/src/view/puzzle/puzzle_tab_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -448,11 +448,20 @@ class DailyPuzzle extends ConsumerWidget {
),
],
),
Icon(Icons.today, size: 32, color: context.lichessColors.brag.withValues(alpha: 0.7)),
Text(
data.puzzle.sideToMove == Side.white
? context.l10n.whitePlays
: context.l10n.blackPlays,
Row(
children: [
Icon(
Icons.today,
size: 32,
color: context.lichessColors.brag.withValues(alpha: 0.7),
),
const SizedBox(width: 8),
Text(
data.puzzle.sideToMove == Side.white
? context.l10n.whitePlays
: context.l10n.blackPlays,
),
],
),
],
),
Expand Down Expand Up @@ -581,22 +590,29 @@ class PuzzleAnglePreview extends ConsumerWidget {
],
},
),
Icon(
switch (angle) {
PuzzleTheme(themeKey: final themeKey) => themeKey.icon,
PuzzleOpening() => PuzzleIcons.opening,
},
size: 32,
color: DefaultTextStyle.of(context).style.color?.withValues(alpha: 0.6),
Row(
children: [
Icon(
switch (angle) {
PuzzleTheme(themeKey: final themeKey) => themeKey.icon,
PuzzleOpening() => PuzzleIcons.opening,
},
size: 32,
color: DefaultTextStyle.of(context).style.color?.withValues(alpha: 0.6),
),
const SizedBox(width: 8),
if (puzzle != null)
Text(
puzzle.puzzle.sideToMove == Side.white
? context.l10n.whitePlays
: context.l10n.blackPlays,
)
else
const Flexible(
child: Text('No puzzles available, please go online to fetch them.'),
),
],
),
if (puzzle != null)
Text(
puzzle.puzzle.sideToMove == Side.white
? context.l10n.whitePlays
: context.l10n.blackPlays,
)
else
const Text('No puzzles available, please go online to fetch them.'),
],
),
onTap: puzzle != null ? onTap : null,
Expand Down