content: import 'package:flutter/material.dart';
  import 'package:get/get.dart';
  import 'package:iconsax/iconsax.dart';
  import 'package:t_store/utils/constraints/colors.dart';
  import 'package:t_store/utils/constraints/sizes.dart';
  import 'package:t_store/utils/device/device_utility.dart';
  import 'package:t_store/utils/helpers/helper_functions.dart';
  
  class TAppBar extends StatelessWidget implements PreferredSizeWidget {
    const TAppBar(
        {super.key,
        this.title,
        this.showBackArrow = false,
        this.leadingIcon,
          this.actions,
        this.leadingOnPressed});
  
    final Widget? title;
    final bool showBackArrow;
    final IconData? leadingIcon;
    final List<Widget>? actions;
    final VoidCallback? leadingOnPressed;
  
    @override
    Widget build(BuildContext context) {
      final dark = THelperFunctions.isDarkMode(context);
      return Padding(
        padding: const EdgeInsets.symmetric(horizontal: TSizes.md),
        child: AppBar(
          automaticallyImplyLeading: false,
          leading: showBackArrow
              ? IconButton(
                  onPressed: () => Get.back(),
                  color: dark ? TColors.white : TColors.dark,
                  icon: const Icon(Iconsax.arrow_left))
              : leadingIcon != null
                  ? IconButton(
                      onPressed: leadingOnPressed, icon: Icon(leadingIcon))
                  : null,
          title: title,
          actions: actions,
        ),
      );
    }
  
    @override
    // TODO: implement preferredSize
    Size get preferredSize => Size.fromHeight(TDeviceUtils.getAppBarHeight());
  }
  