Skip to main content
1

📐 Screen Dimensions

screenSize
double
The total size of the screen. Equivalent to MediaQuery.sizeOf(context).
final width = context.screenSize;
screenWidth
double
The width of the screen in logical pixels.
final width = context.screenWidth;
screenHeight
double
The height of the screen in logical pixels.
// Dynamically size a container to half the screen height
Container(height: context.screenHeight * 0.5);
2

🧭 Orientation

orientation
Orientation
Current device orientation (portrait or landscape)
Orientation currentOrientation = context.orientation;
isLandscape
bool
Returns true if the device is in landscape mode.
bool wideMode = context.isLandscape;
isPortrait
bool
Returns true if the device is in portrait mode.
bool tallMode = context.isPortrait;
3

🎨 Theme & System

isDarkMode
bool
Returns true if the system theme is dark.
 final color = context.isDarkMode ? Colors.white : Colors.black;
brightness
Brightness
The current platform brightness (light or dark).
 Brightness current = context.brightness;
safePadding
EdgeInsets
Safe area padding (e.g., for notches or Dynamic Island).
Padding(padding: context.safePadding, child: ...);
isKeyboardVisible
bool
Returns true if the software keyboard is currently visible (bottom view insets > 0).
if (context.isKeyboardVisible) FocusScope.of(context).unfocus();