orientationValue<T> method
T
orientationValue<T>({
- required T portrait,
- required T landscape,
Gets a value based on the current orientation.
final columns = context.orientationValue<int>(
portrait: 2,
landscape: 4,
);
Implementation
T orientationValue<T>({required T portrait, required T landscape}) {
return isPortrait ? portrait : landscape;
}