Skip to content

Commit

Permalink
chore: update resume puzzle text with l10n
Browse files Browse the repository at this point in the history
  • Loading branch information
thisissandipp committed Jul 7, 2024
1 parent 42abd90 commit 36a9786
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/l10n/arb/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@
"sudokuAppBarTitle": "New Sudoku Game",
"@sudokuAppBarTitle": {
"description": "Text shown in the AppBar of the Sudoku Page"
},
"resumeTimerButtonText": "Resume the puzzle",
"@resumeTimerButtonText": {
"description": "Text shown in the FloatingActionButton of the Sudoku Board"
}
}
5 changes: 4 additions & 1 deletion lib/sudoku/widgets/sudoku_board.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'dart:math';

import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:sudoku/l10n/l10n.dart';
import 'package:sudoku/layout/layout.dart';
import 'package:sudoku/sudoku/sudoku.dart';
import 'package:sudoku/timer/timer.dart';
Expand All @@ -21,6 +22,8 @@ class SudokuBoard extends StatelessWidget {

@override
Widget build(BuildContext context) {
final l10n = context.l10n;

final isTimerPaused = context.select(
(TimerBloc bloc) => !bloc.state.isRunning,
);
Expand Down Expand Up @@ -79,7 +82,7 @@ class SudokuBoard extends StatelessWidget {
onPressed: () => context.read<TimerBloc>().add(
const TimerResumed(),
),
label: const Text('Resume the puzzle'),
label: Text(l10n.resumeTimerButtonText),
icon: const Icon(Icons.play_arrow),
),
),
Expand Down

0 comments on commit 36a9786

Please sign in to comment.