getDevicePlatform function
Determines the device platform.
Returns the device platform as a string (iOS, Android, or Unknown).
Implementation
String getDevicePlatform() {
if (Platform.isIOS) {
return 'iOS';
} else if (Platform.isAndroid) {
return 'Android';
} else {
return 'Unknown';
}
}