valueGetter method

num valueGetter({
  1. num mobileAndPortrait = 0,
  2. num mobileAndLandscape = 0,
  3. num tabletAndPortrait = 0,
  4. num tabletAndLandscape = 0,
})

Implementation

num valueGetter({
  num mobileAndPortrait = 0,
  num mobileAndLandscape = 0,
  num tabletAndPortrait = 0,
  num tabletAndLandscape = 0,
}) {
  if (isMobileAndPortrait) {
    return mobileAndPortrait;
  }
  if (isMobileAndLandscape) {
    return mobileAndLandscape;
  }
  if (isTabletAndPortrait) {
    return tabletAndPortrait;
  }
  if (isTabletAndLandscape) {
    return tabletAndLandscape;
  }

  return 0;
}