Localization Changes #6
This commit is contained in:
@@ -1,21 +1,23 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../l10n/app_localizations.dart';
|
||||
|
||||
class LogoutDialog extends StatelessWidget {
|
||||
const LogoutDialog({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: const Text("Logout"),
|
||||
content: const Text("Are you sure you want to logout?"),
|
||||
title: Text(AppLocalizations.of(context).logout),
|
||||
content: Text(AppLocalizations.of(context).logoutCheck),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context, false), // dismiss
|
||||
child: const Text("No"),
|
||||
child: Text(AppLocalizations.of(context).no),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context, true), // confirm
|
||||
child: const Text("Yes"),
|
||||
child: Text(AppLocalizations.of(context).yes),
|
||||
),
|
||||
],
|
||||
);
|
@@ -1,6 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:kmobile/data/repositories/auth_repository.dart';
|
||||
import 'package:kmobile/features/profile/preferences/logout_dialog.dart';
|
||||
import 'package:kmobile/features/profile/logout_dialog.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import '../../di/injection.dart';
|
||||
import '../../l10n/app_localizations.dart';
|
||||
@@ -43,7 +43,7 @@ class ProfileScreen extends StatelessWidget {
|
||||
// You can add more profile options here later
|
||||
ListTile(
|
||||
leading: const Icon(Icons.logout),
|
||||
title: const Text("Logout"),
|
||||
title: Text(AppLocalizations.of(context).logout),
|
||||
onTap: () async {
|
||||
final shouldLogout = await showDialog<bool>(
|
||||
context: context,
|
||||
|
Reference in New Issue
Block a user