Masking of Primary ID and Compliant Form Link created
This commit is contained in:
@@ -13,6 +13,15 @@ class CustomerInfoScreen extends StatefulWidget {
|
||||
|
||||
class _CustomerInfoScreenState extends State<CustomerInfoScreen> {
|
||||
late final User user = widget.user;
|
||||
|
||||
String _maskPrimaryId(String? primaryId) {
|
||||
if (primaryId == null || primaryId.length <= 4) {
|
||||
return primaryId ?? 'N/A';
|
||||
}
|
||||
final lastFour = primaryId.substring(primaryId.length - 4);
|
||||
return '*' * (primaryId.length - 4) + lastFour;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
@@ -83,10 +92,10 @@ class _CustomerInfoScreenState extends State<CustomerInfoScreen> {
|
||||
label: AppLocalizations.of(context).branchAddress,
|
||||
value: user.address ?? 'N/A',
|
||||
), // Replace with Aadhar if available
|
||||
InfoField(
|
||||
label: AppLocalizations.of(context).primaryId,
|
||||
value: user.primaryId ?? 'N/A',
|
||||
), // Replace with PAN if available
|
||||
InfoField(
|
||||
label: AppLocalizations.of(context).primaryId,
|
||||
value: _maskPrimaryId(user.primaryId),
|
||||
), // Replace with PAN if available
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -30,6 +30,16 @@ class _EnquiryScreen extends State<EnquiryScreen> {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _launchUrl(String url) async {
|
||||
final Uri uri = Uri.parse(url);
|
||||
if (await canLaunchUrl(uri)) {
|
||||
await launchUrl(uri);
|
||||
} else {
|
||||
// Consider adding a 'urlLaunchError' key to your AppLocalizations
|
||||
debugPrint('Could not launch $url');
|
||||
}
|
||||
}
|
||||
|
||||
Widget _buildContactItem(String role, String email, String phone) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -65,18 +75,30 @@ class _EnquiryScreen extends State<EnquiryScreen> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// … existing Mail us / Call us / Write to us …
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
AppLocalizations.of(context).writeToUs,
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
"complaint@kccb.in",
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.primary),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
GestureDetector(
|
||||
onTap: () => _launchUrl("https://kccb.in/complaint-form"),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text("Complaint Form",
|
||||
style: TextStyle(
|
||||
fontSize: 17,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
decorationColor: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Icon(
|
||||
Icons.open_in_new,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
size: 16.0,
|
||||
),
|
||||
]
|
||||
)
|
||||
),
|
||||
|
||||
const SizedBox(height: 20),
|
||||
const SizedBox(height: 40),
|
||||
Text(
|
||||
AppLocalizations.of(context).keyContacts,
|
||||
style: TextStyle(
|
||||
|
||||
Reference in New Issue
Block a user