the user name of the employee is being displayed

This commit is contained in:
Daniah Ayad Al-sultani
2026-02-17 16:51:13 +03:00
parent bb6f3931ce
commit 5117fbdabe
4 changed files with 63 additions and 8 deletions

View File

@@ -17,6 +17,22 @@ class UserSettingsScreen extends StatefulWidget {
class _UserSettingsScreenState extends State<UserSettingsScreen> {
bool _notificationsOn = false;
String _userName = 'اسم الموظف';
@override
void initState() {
super.initState();
_loadUserName();
}
Future<void> _loadUserName() async {
final name = await sl<UserLocalDataSource>().getCachedFullName();
if (mounted) {
setState(() {
_userName = name ?? 'اسم الموظف';
});
}
}
@override
Widget build(BuildContext context) {
@@ -84,8 +100,8 @@ class _UserSettingsScreenState extends State<UserSettingsScreen> {
const SizedBox(height: 10),
/// -------------------- USER NAME --------------------
const Text(
"اسم الموظف",
Text(
_userName,
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.bold,