normalizePlatform static method
Canonical platform key used to match Flutter integration targets.
android* → android; ios / iphone / ipad → ios.
Implementation
static String normalizePlatform(String raw) {
final key = raw.toLowerCase().replaceAll(RegExp(r'[^a-z0-9]'), '');
if (key.startsWith('android')) return 'android';
if (key.startsWith('ios') ||
key.startsWith('iphone') ||
key.startsWith('ipad')) {
return 'ios';
}
return key;
}