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

@@ -467,47 +467,54 @@ class _ProfileSettingsTabState extends ConsumerState<ProfileSettingsTab> {
}
return AlertDialog(
scrollable: true,
title: const Text('Change Email Address'),
content: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
const Text(
'A verification link will be sent to your new email. Your email changes only after you click the link.',
style: TextStyle(fontSize: 13),
content: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
const Text(
'A verification link will be sent to your new email. Your email changes only after you click the link.',
style: TextStyle(fontSize: 13),
),
const SizedBox(height: 16),
TextField(
controller: newEmailCtl,
keyboardType: TextInputType.emailAddress,
autocorrect: false,
enableSuggestions: false,
textCapitalization: TextCapitalization.none,
autofillHints: const [AutofillHints.email],
decoration: const InputDecoration(
labelText: 'New Email',
hintText: 'new@example.com',
),
const SizedBox(height: 16),
TextField(
controller: newEmailCtl,
keyboardType: TextInputType.emailAddress,
autocorrect: false,
textCapitalization: TextCapitalization.none,
decoration: const InputDecoration(
labelText: 'New Email',
hintText: 'new@example.com',
),
),
const SizedBox(height: 12),
TextField(
controller: passwordCtl,
obscureText: true,
autocorrect: false,
enableSuggestions: false,
// Empty autofillHints prevents iOS from showing the
// "Strong Password" suggestion bar, which was adding
// extra bottom inset and shifting the dialog upward.
autofillHints: const <String>[],
decoration: const InputDecoration(
labelText: 'Current Password',
),
),
if (localError != null) ...[
const SizedBox(height: 12),
TextField(
controller: passwordCtl,
obscureText: true,
decoration: const InputDecoration(
labelText: 'Current Password',
Text(
localError!,
style: const TextStyle(
color: Colors.red,
fontSize: 12,
),
),
if (localError != null) ...[
const SizedBox(height: 12),
Text(
localError!,
style: const TextStyle(
color: Colors.red,
fontSize: 12,
),
),
],
],
),
],
),
actions: [
TextButton(