Strings quase feitas

This commit is contained in:
2026-03-18 16:20:18 +00:00
parent 7f80ed47f3
commit 6322e8d798
8 changed files with 324 additions and 228 deletions

View File

@@ -47,12 +47,12 @@ class _LogadoScreenState extends State<LogadoScreen> {
builder: (context) => AlertDialog(
backgroundColor: AppColors.backgroundGrey,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30)),
title: const Text("Definir Meta Diária", style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
title: Text(AppStrings.defineDailyGoal, style: const TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
content: Column(
mainAxisSize: MainAxisSize.min,
children: [
...[5, 10, 15, 20].map((km) => ListTile(
title: Text("$km KM", style: const TextStyle(color: Colors.white)),
title: Text("$km ${AppStrings.kmUnit}", style: const TextStyle(color: Colors.white)),
onTap: () {
setState(() {
_dailyGoal = km.toDouble();
@@ -63,7 +63,7 @@ class _LogadoScreenState extends State<LogadoScreen> {
const Divider(color: Colors.white10),
ListTile(
leading: const Icon(Icons.edit_note_rounded, color: AppColors.coral),
title: const Text("Personalizado", style: TextStyle(color: AppColors.coral, fontWeight: FontWeight.bold)),
title: Text(AppStrings.customGoal, style: const TextStyle(color: AppColors.coral, fontWeight: FontWeight.bold)),
onTap: () {
Navigator.pop(context);
_showCustomGoalDialog();
@@ -82,7 +82,7 @@ class _LogadoScreenState extends State<LogadoScreen> {
builder: (context) => AlertDialog(
backgroundColor: AppColors.backgroundGrey,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30)),
title: const Text("Meta Personalizada", style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
title: Text(AppStrings.customGoalTitle, style: const TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
content: TextField(
controller: controller,
keyboardType: const TextInputType.numberWithOptions(decimal: true),
@@ -91,17 +91,17 @@ class _LogadoScreenState extends State<LogadoScreen> {
decoration: InputDecoration(
hintText: "Ex: 12.5",
hintStyle: const TextStyle(color: Colors.white24),
suffixText: "KM",
suffixText: AppStrings.kmUnit,
suffixStyle: const TextStyle(color: Colors.white54),
enabledBorder: UnderlineInputBorder(borderSide: BorderSide(color: Colors.white24)),
focusedBorder: UnderlineInputBorder(borderSide: BorderSide(color: AppColors.coral)),
enabledBorder: const UnderlineInputBorder(borderSide: BorderSide(color: Colors.white24)),
focusedBorder: const UnderlineInputBorder(borderSide: BorderSide(color: AppColors.coral)),
),
autofocus: true,
),
actions: [
TextButton(
onPressed: () => Navigator.pop(context),
child: const Text("CANCELAR", style: TextStyle(color: Colors.white54)),
child: Text(AppStrings.btnCancel, style: const TextStyle(color: Colors.white54)),
),
ElevatedButton(
onPressed: () {
@@ -117,7 +117,7 @@ class _LogadoScreenState extends State<LogadoScreen> {
backgroundColor: AppColors.coral,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15)),
),
child: const Text("DEFINIR", style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
child: Text(AppStrings.btnDefine, style: const TextStyle(color: Colors.white, fontWeight: FontWeight.bold)),
),
],
),
@@ -127,7 +127,7 @@ class _LogadoScreenState extends State<LogadoScreen> {
@override
Widget build(BuildContext context) {
final user = SupabaseService.currentUser;
final userName = user?.userMetadata?['name'] ?? user?.email?.split('@')[0] ?? 'Corredor';
final userName = user?.userMetadata?['name'] ?? user?.email?.split('@')[0] ?? AppStrings.userPlaceholder;
return Scaffold(
backgroundColor: AppColors.background,
@@ -210,9 +210,9 @@ class _LogadoScreenState extends State<LogadoScreen> {
const SizedBox(height: 30),
// Personal Bests Section
const Text(
"RECORDS PESSOAIS",
style: TextStyle(
Text(
AppStrings.personalRecords,
style: const TextStyle(
color: Colors.white38,
fontSize: 11,
fontWeight: FontWeight.w900,
@@ -247,9 +247,9 @@ class _LogadoScreenState extends State<LogadoScreen> {
const SizedBox(height: 25),
// Steps Section (Atividade Geral)
const Text(
"ATIVIDADE GERAL",
style: TextStyle(
Text(
AppStrings.generalActivity,
style: const TextStyle(
color: Colors.white38,
fontSize: 11,
fontWeight: FontWeight.w900,
@@ -260,7 +260,7 @@ class _LogadoScreenState extends State<LogadoScreen> {
_buildWideRecordCard(
AppStrings.steps,
_steps.toString(),
"passos hoje",
AppStrings.stepsToday,
Icons.directions_walk_rounded,
AppColors.success,
),
@@ -347,9 +347,9 @@ class _LogadoScreenState extends State<LogadoScreen> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text(
Text(
AppStrings.dailyGoal,
style: TextStyle(color: Colors.white54, fontWeight: FontWeight.bold, letterSpacing: 1),
style: const TextStyle(color: Colors.white54, fontWeight: FontWeight.bold, letterSpacing: 1),
),
if (_dailyGoal > 0)
Text(
@@ -388,9 +388,9 @@ class _LogadoScreenState extends State<LogadoScreen> {
child: const Icon(Icons.add_task_rounded, color: AppColors.coral, size: 40),
),
const SizedBox(height: 10),
const Text(
"DEFINIR META",
style: TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w900, letterSpacing: 1),
Text(
AppStrings.setGoal,
style: const TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w900, letterSpacing: 1),
),
],
),
@@ -399,7 +399,7 @@ class _LogadoScreenState extends State<LogadoScreen> {
Column(
mainAxisSize: MainAxisSize.min,
children: [
const Text("DISTÂNCIA", style: TextStyle(color: Colors.white38, fontSize: 10, fontWeight: FontWeight.bold, letterSpacing: 2)),
Text(AppStrings.distance, style: const TextStyle(color: Colors.white38, fontSize: 10, fontWeight: FontWeight.bold, letterSpacing: 2)),
Text(
_currentDistance.toStringAsFixed(1),
style: const TextStyle(color: Colors.white, fontSize: 48, fontWeight: FontWeight.w900),
@@ -416,9 +416,9 @@ class _LogadoScreenState extends State<LogadoScreen> {
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
_buildSimpleStat("PASSOS", "${(_steps / 1000).toStringAsFixed(1)}k"),
_buildSimpleStat(AppStrings.steps, "${(_steps / 1000).toStringAsFixed(1)}k"),
const SizedBox(width: 40),
_buildSimpleStat("TEMPO", "${_totalTimeMinutes}m"),
_buildSimpleStat(AppStrings.time, "${_totalTimeMinutes}m"),
],
)
],