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),
|
iconColor: const Color(0xFF25D366),
|
||||||
label: 'WhatsApp',
|
label: 'WhatsApp',
|
||||||
subtitle: settings.numeroSoporte.isNotEmpty
|
subtitle: settings.numeroSoporte.isNotEmpty
|
||||||
? '+${settings.numeroSoporte}'
|
? (settings.numeroSoporte.startsWith('+')
|
||||||
|
? settings.numeroSoporte
|
||||||
|
: '+${settings.numeroSoporte}')
|
||||||
: 'No configurado',
|
: 'No configurado',
|
||||||
isDark: isDark,
|
isDark: isDark,
|
||||||
cardBg: cardBg,
|
cardBg: cardBg,
|
||||||
borderColor: borderColor,
|
borderColor: borderColor,
|
||||||
onTap: settings.numeroSoporte.isNotEmpty
|
onTap: settings.numeroSoporte.isNotEmpty
|
||||||
? () => _launchURL(
|
? () => _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,
|
: null,
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user