import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:onufitness/constants/color_constant.dart'; import 'package:onufitness/utils/helper_function.dart'; class CustomAuthAppbar extends StatelessWidget { final VoidCallback? onBackPressed; final String? image; final String largeText; final String smallText; const CustomAuthAppbar({ super.key, this.onBackPressed, this.image, required this.largeText, required this.smallText, }); @override Widget build(BuildContext context) { return Padding( padding: EdgeInsets.only( left: isTablet ? 20.w : 20.w, right: isTablet ? 20.w : 10.w, top: isTablet ? 70.h : 70.h, bottom: isTablet ? 50.h : 50.h, ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ if (image != null) Container( width: isTablet ? 100.w : 70.w, height: isTablet ? 100.h : 70.w, decoration: BoxDecoration( shape: BoxShape.circle, border: Border.all(color: deeperShadeOfprimaryColor), ), alignment: Alignment.center, child: Image.asset( image!, width: isTablet ? 50.w : 30.w, height: isTablet ? 50.h : 30.w, ), ), if (onBackPressed != null) Padding( padding: EdgeInsets.only(right: 5.w), child: ElevatedButton( style: ElevatedButton.styleFrom( backgroundColor: Colors.black, ), onPressed: onBackPressed, child: Row( children: [ Icon(Icons.arrow_back_ios, color: Colors.white), Text("Back", style: TextStyle(color: Colors.white)), ], ), ), ), ], ), SizedBox(height: 10.h), Text( largeText, style: TextStyle( fontSize: isTablet ? 50.sp : 40.sp, fontWeight: FontWeight.w600, color: Colors.black, height: 1.0, ), ), SizedBox(height: isTablet ? 30.h : 10.h), Text( smallText, textAlign: TextAlign.start, style: TextStyle( fontSize: isTablet ? 20.sp : 16.sp, color: Colors.black, fontWeight: FontWeight.w600, ), ), ], ), ); } }