currentOrientation method

dynamic currentOrientation(
  1. dynamic n1,
  2. dynamic n2
)

Returns the current orientation based on the provided parameters.

This method takes two parameters, n1 and n2, and determines the current orientation. The exact behavior and return type are dynamic and depend on the implementation details.

  • Parameters:

    • n1: The first parameter used to determine the orientation.
    • n2: The second parameter used to determine the orientation.
  • Returns: The current orientation based on the provided parameters.

Implementation

dynamic currentOrientation(var n1, var n2) {
  Orientation orientation = MediaQuery.orientationOf(this);
  return orientation == Orientation.portrait ? n1 : n2;
}