SuraResponsive class

Constructors

SuraResponsive()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

context BuildContext?
getter/setter pair
isDesktop bool
no setter
isMobile bool
no setter
isMobileSmall bool
no setter
isTablet bool
no setter
screenWidth double
no setter

Static Methods

auto(double mobile, [SuraResponsiveRule rule = SuraResponsiveRule.add, BuildContext? context]) double
Define a responsive value base on defined rule Best use case for spacing and container React immediately to MediaQuery change if context is provided
builder({required Widget mobile(), required Widget tablet(), Widget desktop()?, Widget mobileSmall()?, BuildContext? context}) Widget
Build a widget base on device screen size desktop builder is nullable and will use tablet's value if null mobileSmall builder is nullable and will use mobile's value if null React immediately to MediaQuery change if context is provided
changeBreakpoint(SuraResponsiveBreakpoint breakPoint) → void
value(double mobile, [double? tablet, double? desktop, double? mobileSmall, BuildContext? context]) double
Define a value depend on Screen width Will use mobile value if other value is null Auto calculate for desktop if tablet isn't null React immediately to MediaQuery change if context is provided