getPlatform function Null safety

String? getPlatform()

Implementation

String? getPlatform() {
  if (Platform.isAndroid) {
    return _platformAndroid;
  } else if (Platform.isIOS) {
    return _platformIOS;
  }
  return null;
}