Implementation
String getProfileSetupUiTemplate(
{required String className,
required String isLoading,
bool addApiCalling = false}) {
return '''
CustomBody(
isLoading: $isLoading,
backgroundColor: const Color(0xFF121212), // Dark background
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 24.sp),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 20.sp),
// Top Bar
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
TextWidget(
text: "Sign a Selfie",
textSize: 24.sp,
fontWeight: FontWeight.bold,
color: const Color(0xFFFFD54F), // Gold/Yellow
),
GestureDetector(
onTap: () {},
child: Container(
padding: EdgeInsets.symmetric(horizontal: 20.sp, vertical: 8.sp),
decoration: BoxDecoration(
color: const Color(0xFFFFD54F),
borderRadius: BorderRadius.circular(20.sp),
),
child: TextWidget(
text: "Skip",
textSize: 14.sp,
fontWeight: FontWeight.w600,
color: Colors.black,
),
),
),
],
),
SizedBox(height: 30.sp),
TextWidget(
text: "Profile Setup",
textSize: 28.sp,
fontWeight: FontWeight.bold,
color: Colors.white,
),
SizedBox(height: 8.sp),
TextWidget(
text: "Enter below details to continue",
textSize: 14.sp,
color: Colors.white70,
),
SizedBox(height: 40.sp),
// Profile Photo Upload
Center(
child: Column(
children: [
Stack(
children: [
Container(
width: 120.sp,
height: 120.sp,
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(color: const Color(0xFFFFD54F), width: 2),
color: Colors.white10,
),
child: Icon(
Icons.person,
size: 60.sp,
color: Colors.white30,
),
),
Positioned(
bottom: 0,
right: 0,
child: Container(
padding: EdgeInsets.all(8.sp),
decoration: const BoxDecoration(
shape: BoxShape.circle,
color: Color(0xFFFFD54F),
),
child: Icon(
Icons.edit,
size: 20.sp,
color: Colors.black,
),
),
),
],
),
SizedBox(height: 12.sp),
TextWidget(
text: "Upload Profile Photo",
textSize: 12.sp,
color: Colors.white54,
),
],
),
),
SizedBox(height: 40.sp),
// Form Fields
TextWidget(
text: "Full Name",
textSize: 14.sp,
fontWeight: FontWeight.w500,
color: Colors.white70,
),
SizedBox(height: 8.sp),
CommonTextFormField(
hintText: "Full Name",
prefixWidget: Icon(Icons.person_outline, color: const Color(0xFFFFD54F), size: 22.sp),
),
SizedBox(height: 24.sp),
TextWidget(
text: "Email",
textSize: 14.sp,
fontWeight: FontWeight.w500,
color: Colors.white70,
),
SizedBox(height: 8.sp),
CommonTextFormField(
hintText: "rebecca.smith@gmail.com",
prefixWidget: Icon(Icons.mail_outline, color: const Color(0xFFFFD54F), size: 22.sp),
),
SizedBox(height: 24.sp),
TextWidget(
text: "Gender",
textSize: 14.sp,
fontWeight: FontWeight.w500,
color: Colors.white70,
),
SizedBox(height: 12.sp),
const GenderSelector(),
SizedBox(height: 24.sp),
TextWidget(
text: "Country",
textSize: 14.sp,
fontWeight: FontWeight.w500,
color: Colors.white70,
),
SizedBox(height: 8.sp),
CustomDropdown<String>(
hint: "Select",
items: const ["USA", "India", "UK", "Canada"],
onChanged: (val) {},
itemBuilder: (context, item) => Padding(
padding: EdgeInsets.all(12.sp),
child: TextWidget(text: item, textSize: 14.sp, color: Colors.black),
),
),
SizedBox(height: 40.sp),
// Submit Button
GestureDetector(
onTap: () {
${addApiCalling ? "context.read<${className}Bloc>().add(${className}Submit());" : ""}
},
child: Container(
width: double.infinity,
height: 55.sp,
decoration: BoxDecoration(
color: const Color(0xFFFFD54F),
borderRadius: BorderRadius.circular(15.sp),
),
child: Center(
child: TextWidget(
text: "Submit",
textSize: 18.sp,
fontWeight: FontWeight.bold,
color: Colors.black,
),
),
),
),
SizedBox(height: 30.sp),
],
),
),
),
)''';
}