responsivePlatform<T> method

T? responsivePlatform<T>({
  1. T? ios,
  2. T? android,
  3. required T other,
})

Return widget of T base on current Platform is ios, android. All other return other if param is not null, other wise return android.

Implementation

T? responsivePlatform<T>({T? ios, T? android, required T other}) {
  if (Platform.isIOS && ios != null) {
    return ios;
  }
  if (Platform.isAndroid && android != null) {
    return android;
  }
  if (other != null) {
    return other;
  } else {
    return android;
  }
}