feat: redirect agents to profile on login, update UI layouts, and add analytics dependencies.

This commit is contained in:
pradeepkumar
2026-05-06 13:19:31 +05:30
parent c6b96e19dc
commit 8845e77274
10 changed files with 293 additions and 175 deletions

View File

@@ -21,18 +21,18 @@ class _OnboardingScreenState extends State<OnboardingScreen> {
iconAsset: 'assets/images/onboarding_1_icon.svg',
iconWidth: 110,
iconHeight: 100,
title: 'Connect with Top\nProfessionals',
title: 'Connect with Top Professionals',
subtitle:
'Professionals can list properties and find qualified\nbuyers faster than ever.',
'Professionals can list properties and find qualified buyers faster than ever.',
),
_OnboardingData(
bgAsset: 'assets/images/onboarding_2_bg.svg',
iconAsset: 'assets/images/onboarding_2_icon.svg',
iconWidth: 83,
iconHeight: 75,
title: 'Real help. Real professionals.\nInstantly.',
title: 'Real help. Real professionals. Instantly.',
subtitle:
'Chat with professionals and get answers about\nproperties instantly.',
'Chat with professionals and get answers about properties instantly.',
),
];
@@ -208,150 +208,151 @@ class _OnboardingPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
children: [
// Illustration section - takes upper portion
Expanded(
flex: 5,
child: Padding(
padding: const EdgeInsets.only(left: 0, top: 8),
child: Align(
alignment: Alignment.centerLeft,
child: SizedBox(
width: MediaQuery.of(context).size.width - 24,
child: Stack(
alignment: Alignment.center,
children: [
// Background oval/pill shape with orange gradient
SvgPicture.asset(
// Scale the illustration to ~38% of screen height so it shrinks on small
// devices, leaving room for the title + subtitle without overflow.
final screenHeight = MediaQuery.of(context).size.height;
final illustrationHeight = (screenHeight * 0.38).clamp(220.0, 346.0);
return SingleChildScrollView(
physics: const ClampingScrollPhysics(),
child: Column(
children: [
// Illustration section
Padding(
padding: const EdgeInsets.only(top: 8),
child: SizedBox(
width: MediaQuery.of(context).size.width - 24,
height: illustrationHeight,
child: Stack(
alignment: Alignment.center,
children: [
// Background oval/pill shape with orange gradient
Positioned.fill(
child: SvgPicture.asset(
data.bgAsset,
width: 382,
height: 346,
fit: BoxFit.contain,
),
// Blurred decoration - bottom right
Positioned(
right: 20,
bottom: 20,
child: Container(
width: 160,
height: 160,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: AppColors.accentOrange.withValues(alpha: 0.2),
boxShadow: [
BoxShadow(
color: AppColors.accentOrange
.withValues(alpha: 0.15),
blurRadius: 40,
spreadRadius: 0,
),
],
),
),
// Blurred decoration - bottom right
Positioned(
right: 20,
bottom: 20,
child: Container(
width: 120,
height: 120,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: AppColors.accentOrange.withValues(alpha: 0.2),
boxShadow: [
BoxShadow(
color: AppColors.accentOrange
.withValues(alpha: 0.15),
blurRadius: 40,
spreadRadius: 0,
),
],
),
),
// Blurred decoration - top left
Positioned(
left: 0,
top: 0,
child: Container(
width: 160,
height: 160,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: AppColors.accentOrange.withValues(alpha: 0.1),
boxShadow: [
BoxShadow(
color: AppColors.accentOrange
.withValues(alpha: 0.08),
blurRadius: 40,
spreadRadius: 0,
),
],
),
),
// Blurred decoration - top left
Positioned(
left: 0,
top: 0,
child: Container(
width: 120,
height: 120,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: AppColors.accentOrange.withValues(alpha: 0.1),
boxShadow: [
BoxShadow(
color: AppColors.accentOrange
.withValues(alpha: 0.08),
blurRadius: 40,
spreadRadius: 0,
),
],
),
),
// Main icon + small icons
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset(
data.iconAsset,
width: data.iconWidth,
height: data.iconHeight,
),
const SizedBox(height: 16),
// Small property icons row
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset(
'assets/images/onboarding_small_icon_1.svg',
width: 27,
height: 27,
),
const SizedBox(width: 8),
SvgPicture.asset(
'assets/images/onboarding_small_icon_2.svg',
width: 31.5,
height: 31.5,
),
const SizedBox(width: 8),
SvgPicture.asset(
'assets/images/onboarding_small_icon_3.svg',
width: 24,
height: 27,
),
],
),
],
),
],
),
),
// Main icon + small icons
Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset(
data.iconAsset,
width: data.iconWidth,
height: data.iconHeight,
),
const SizedBox(height: 12),
// Small property icons row
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset(
'assets/images/onboarding_small_icon_1.svg',
width: 27,
height: 27,
),
const SizedBox(width: 8),
SvgPicture.asset(
'assets/images/onboarding_small_icon_2.svg',
width: 31.5,
height: 31.5,
),
const SizedBox(width: 8),
SvgPicture.asset(
'assets/images/onboarding_small_icon_3.svg',
width: 24,
height: 27,
),
],
),
],
),
],
),
),
),
),
// Text content section
Expanded(
flex: 3,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 24),
// Text content section
Padding(
padding: const EdgeInsets.fromLTRB(24, 16, 24, 16),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const SizedBox(height: 8),
// Title
Text(
data.title,
textAlign: TextAlign.center,
style: const TextStyle(
fontFamily: 'Fractul',
fontSize: 32,
fontSize: 26,
fontWeight: FontWeight.w700,
color: Color(0xFF0F172A),
height: 1.25,
letterSpacing: -0.8,
),
),
const SizedBox(height: 16),
const SizedBox(height: 12),
// Subtitle
Text(
data.subtitle,
textAlign: TextAlign.center,
style: const TextStyle(
fontFamily: 'SourceSerif4',
fontSize: 16,
fontSize: 15,
fontWeight: FontWeight.w400,
color: Color(0xFF475569),
height: 1.625,
height: 1.5,
),
),
],
),
),
),
],
],
),
);
}
}