Fix double + in WhatsApp support number
Display: only prepend + if number doesn't already start with + URL: strip + and spaces so WhatsApp API receives digits only Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
ad557b8318
commit
f1dc2cb75d
@@ -267,14 +267,16 @@ class SupportView extends StatelessWidget {
|
||||
iconColor: const Color(0xFF25D366),
|
||||
label: 'WhatsApp',
|
||||
subtitle: settings.numeroSoporte.isNotEmpty
|
||||
? '+${settings.numeroSoporte}'
|
||||
? (settings.numeroSoporte.startsWith('+')
|
||||
? settings.numeroSoporte
|
||||
: '+${settings.numeroSoporte}')
|
||||
: 'No configurado',
|
||||
isDark: isDark,
|
||||
cardBg: cardBg,
|
||||
borderColor: borderColor,
|
||||
onTap: settings.numeroSoporte.isNotEmpty
|
||||
? () => _launchURL(
|
||||
'https://api.whatsapp.com/send?phone=${settings.numeroSoporte}&text=${Uri.encodeComponent('Hola, soy usuario de ProsApp')}')
|
||||
'https://api.whatsapp.com/send?phone=${settings.numeroSoporte.replaceAll('+', '').replaceAll(' ', '')}&text=${Uri.encodeComponent('Hola, soy usuario de ProsApp')}')
|
||||
: null,
|
||||
),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user