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> {
|
class _CustomerInfoScreenState extends State<CustomerInfoScreen> {
|
||||||
late final User user = widget.user;
|
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
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
@@ -83,10 +92,10 @@ class _CustomerInfoScreenState extends State<CustomerInfoScreen> {
|
|||||||
label: AppLocalizations.of(context).branchAddress,
|
label: AppLocalizations.of(context).branchAddress,
|
||||||
value: user.address ?? 'N/A',
|
value: user.address ?? 'N/A',
|
||||||
), // Replace with Aadhar if available
|
), // Replace with Aadhar if available
|
||||||
InfoField(
|
InfoField(
|
||||||
label: AppLocalizations.of(context).primaryId,
|
label: AppLocalizations.of(context).primaryId,
|
||||||
value: user.primaryId ?? 'N/A',
|
value: _maskPrimaryId(user.primaryId),
|
||||||
), // Replace with PAN if available
|
), // 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) {
|
Widget _buildContactItem(String role, String email, String phone) {
|
||||||
return Column(
|
return Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@@ -65,18 +75,30 @@ class _EnquiryScreen extends State<EnquiryScreen> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
// … existing Mail us / Call us / Write to us …
|
const SizedBox(height: 20),
|
||||||
const SizedBox(height: 20),
|
GestureDetector(
|
||||||
Text(
|
onTap: () => _launchUrl("https://kccb.in/complaint-form"),
|
||||||
AppLocalizations.of(context).writeToUs,
|
child: Row(
|
||||||
),
|
mainAxisSize: MainAxisSize.min,
|
||||||
const SizedBox(height: 4),
|
children: [
|
||||||
Text(
|
Text("Complaint Form",
|
||||||
"complaint@kccb.in",
|
style: TextStyle(
|
||||||
style: TextStyle(color: Theme.of(context).colorScheme.primary),
|
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(
|
Text(
|
||||||
AppLocalizations.of(context).keyContacts,
|
AppLocalizations.of(context).keyContacts,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|||||||
Reference in New Issue
Block a user