Added Localizations and ran small fixes

This commit is contained in:
Arseni
2025-11-25 08:20:09 +03:00
parent 72d8da1fe8
commit fcb5ab4f2c
41 changed files with 444 additions and 233 deletions

View File

@@ -2,6 +2,8 @@ import 'package:flutter/material.dart';
import 'package:pweb/widgets/sidebar/destinations.dart';
import 'package:pweb/generated/i18n/app_localizations.dart';
class UserProfileCard extends StatelessWidget {
final ThemeData theme;
@@ -21,6 +23,7 @@ class UserProfileCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
final loc = AppLocalizations.of(context)!;
bool isSelected = selected == PayoutDestination.settings;
final backgroundColor = isSelected
? theme.colorScheme.primaryContainer
@@ -52,7 +55,7 @@ class UserProfileCard extends StatelessWidget {
const SizedBox(width: 8),
Flexible(
child: Text(
userName ?? 'User Name',
userName ?? loc.userNamePlaceholder,
style: theme.textTheme.bodyLarge?.copyWith(
fontSize: 20,
fontWeight: FontWeight.w500,
@@ -67,4 +70,4 @@ class UserProfileCard extends StatelessWidget {
),
);
}
}
}