Skip to content

Commit

Permalink
Add translations for NavigationRow
Browse files Browse the repository at this point in the history
  • Loading branch information
ashuntu committed Dec 5, 2024
1 parent 4d40517 commit 0145af2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gui/packages/ubuntupro/lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
}
},

"buttonNext": "Continue",
"buttonNext": "Next",
"buttonSkip": "Skip",
"buttonBack": "Back",

Expand Down
13 changes: 11 additions & 2 deletions gui/packages/ubuntupro/lib/pages/widgets/navigation_row.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';

class NavigationRow extends StatelessWidget {
const NavigationRow({
Expand All @@ -16,11 +17,19 @@ class NavigationRow extends StatelessWidget {

@override
Widget build(BuildContext context) {
final lang = AppLocalizations.of(context);

return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
OutlinedButton(onPressed: onBack, child: Text(backText ?? 'Back')),
FilledButton(onPressed: onNext, child: Text(nextText ?? 'Next')),
OutlinedButton(
onPressed: onBack,
child: Text(backText ?? lang.buttonBack),
),
FilledButton(
onPressed: onNext,
child: Text(nextText ?? lang.buttonNext),
),
],
);
}
Expand Down

0 comments on commit 0145af2

Please sign in to comment.