feat: current user

This commit is contained in:
efrilm
2025-08-16 19:56:45 +07:00
parent 5387d7b7a6
commit e7525238fe
4 changed files with 139 additions and 138 deletions
@@ -1,12 +1,15 @@
import 'package:flutter/material.dart';
import 'dart:math' as math;
import '../../../../common/extension/extension.dart';
import '../../../../common/painter/wave_painter.dart';
import '../../../../common/theme/theme.dart';
import '../../../../domain/auth/auth.dart';
import '../../../components/spacer/spacer.dart';
class ProfileHeader extends StatefulWidget {
const ProfileHeader({super.key});
final User user;
const ProfileHeader({super.key, required this.user});
@override
State<ProfileHeader> createState() => _ProfileHeaderState();
@@ -347,7 +350,7 @@ class _ProfileHeaderState extends State<ProfileHeader>
child: Column(
children: [
Text(
'John Doe',
widget.user.name,
style: AppStyle.h5.copyWith(
fontWeight: FontWeight.bold,
color: AppColor.textWhite,
@@ -408,7 +411,7 @@ class _ProfileHeaderState extends State<ProfileHeader>
),
const SpaceHeight(6),
Text(
'Business Owner',
widget.user.role.toTitleCase,
style: AppStyle.md.copyWith(
color: AppColor.textWhite,
fontWeight: FontWeight.w600,