WebResponsiveGrid class
Helper for responsive grid layouts that adapt column count to screen width.
Usage:
GridView.builder(
gridDelegate: WebResponsiveGrid.responsiveDelegate(context),
...
)
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 Methods
-
getColumnCount(
double width, {int mobileColumns = 2, int tabletColumns = 3, int desktopColumns = 4, int wideDesktopColumns = 5}) → int - Returns the appropriate column count based on available width.
-
responsiveDelegate(
BuildContext context, {int mobileColumns = 2, int tabletColumns = 3, int desktopColumns = 4, int wideDesktopColumns = 5, double mainAxisSpacing = 1, double crossAxisSpacing = 1, double childAspectRatio = 1}) → SliverGridDelegateWithFixedCrossAxisCount - Returns a responsive SliverGridDelegateWithFixedCrossAxisCount.