content: import 'package:flutter/material.dart';
  import 'package:get/get.dart';
  import 'package:iconsax/iconsax.dart';
  import 'package:t_store/common/widgets/appbar/appbar.dart';
  import 'package:t_store/common/widgets/images/t_circular_image.dart';
  import 'package:t_store/common/widgets/loaders/shimmer.dart';
  import 'package:t_store/common/widgets/texts/section_heading.dart';
  import 'package:t_store/features/personalization/controllers/user_controller.dart';
  import 'package:t_store/features/personalization/screens/profile/Widgets/change_name.dart';
  import 'package:t_store/features/personalization/screens/profile/Widgets/profile_menu.dart';
  import 'package:t_store/utils/constraints/image_strings.dart';
  import 'package:t_store/utils/constraints/sizes.dart';
  
  class ProfileScreen extends StatelessWidget {
    const ProfileScreen({Key? key}) : super(key: key);
  
    @override
    Widget build(BuildContext context) {
      final controller = UserController.instance;
      return Scaffold(
        appBar: const TAppBar(
          showBackArrow: true,
          title: Text('Profile'),
        ),
  
        ///--body
        body: SingleChildScrollView(
          child: Padding(
            padding: const EdgeInsets.all(TSizes.defaultSpace),
            child: Column(
              children: [
                ///profile picture
                SizedBox(
                  width: double.infinity,
                  child: Column(
                    children: [
                      Obx(() {
                        final networkImage = controller.user.value.profilePicture;
                        final image =
                            networkImage.isNotEmpty ? networkImage : TImages.user;
                        return controller.imageUploading.value
                            ? const TShimmerEffect(
                                width: 80, height: 80, radius: 80)
                            : TCircularImage(
                                image: image,
                                width: 80,
                                height: 80,
                                isNetworkImage: networkImage.isNotEmpty);
                      }),
                      TextButton(
                          onPressed: () => controller.uploadUserProfilePicture(),
                          child: const Text('Change profile picture'))
                    ],
                  ),
                ),
  
                ///details
                const SizedBox(height: TSizes.spaceBtwItems / 2),
                const Divider(),
                const SizedBox(height: TSizes.spaceBtwItems),
  
                ///heading profile info
                const TSectionHeading(
                    title: 'Profile Information', showActionButton: false),
                const SizedBox(height: TSizes.spaceBtwItems),
  
                TProfileMenu(
                    title: 'Name',
                    value: controller.user.value.fullName,
                    onPressed: () => Get.to(() => const ChangeName())),
                TProfileMenu(
                    title: 'UserName',
                    value: controller.user.value.username,
                    onPressed: () {}),
  
                const SizedBox(height: TSizes.spaceBtwItems),
                const Divider(),
                const SizedBox(height: TSizes.spaceBtwItems),
  
                ///Heading personal info
                const TSectionHeading(
                    title: 'Personal Information', showActionButton: false),
                const SizedBox(height: TSizes.spaceBtwItems),
  
                TProfileMenu(
                    title: 'User ID',
                    value: controller.user.value.id,
                    icon: Iconsax.copy,
                    onPressed: () {}),
                TProfileMenu(
                    title: 'E-mail',
                    value: controller.user.value.email,
                    onPressed: () {}),
                TProfileMenu(
                    title: 'Phone Number',
                    value: controller.user.value.phoneNumber,
                    onPressed: () {}),
                TProfileMenu(title: 'Gender', value: 'Male', onPressed: () {}),
                TProfileMenu(
                    title: 'Date of Birth',
                    value: '25 Mar, 2002',
                    onPressed: () {}),
  
                const Divider(),
                const SizedBox(height: TSizes.spaceBtwItems),
  
                Center(
                  child: TextButton(
                    onPressed: () => controller.deleteAccountWarningPopup(),
                    child: const Text('Close Account',
                        style: TextStyle(color: Colors.red)),
                  ),
                )
              ],
            ),
          ),
        ),
      );
    }
  }
  