NanoScreenContext class
Contextual helper that exposes viewport dimensions, device categories, and responsive value evaluation methods bound to a BuildContext.
Constructors
- NanoScreenContext(BuildContext _context)
-
Creates a NanoScreenContext bound to the provided
_context.const
Properties
- deviceType → NanoDeviceType
-
Returns the current evaluated NanoDeviceType.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
Returns the current screen height in logical pixels.
no setter
- isDesktop → bool
-
Whether the current screen width represents a desktop layout (>= 1024dp).
no setter
- isMobile → bool
-
Whether the current screen width represents a mobile layout (< 600dp).
no setter
- isTablet → bool
-
Whether the current screen width represents a tablet layout
(>= 600dp and < 1024dp).
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → Size
-
Returns the current screen Size.
no setter
- width → double
-
Returns the current screen width in logical pixels.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
responsive<
T> ({required T mobile, required T desktop, T? tablet}) → T - Returns a value based on the current screen category.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited