GraphicsGridBlock class
A responsive project and portfolio grid layout consuming GraphicsBlock cards.
Figma Specifications (Node 795:3693 - GraphicsGridBlock):
- Variants:
device=PC(795:3694): 2-column GraphicsBlock grid with 48px gap (width: 896px).device=Mobile(795:3702): 1-column vertically stacked GraphicsBlocks with 48px gap (width: 316px).
- Properties in Figma:
hasGraphicThree,hasGraphicFour,hasGraphicFive,hasGraphichSixtoggles. In code, handled flexibly viaprojectslist oritemCount/itemBuilder.
- Layout & Sizing:
- PC: 2 columns with 48px horizontal & vertical spacing (or single full-width column when count = 1).
- Mobile: 1 column with 48px vertical spacing.
- Device Synchronization: Propagates ambient AlterDeviceScope to child GraphicsBlock cards so they inherit PC/Mobile mode from grid width.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- GraphicsGridBlock
Constructors
-
GraphicsGridBlock({Key? key, double? width, GraphicsGridBlockDevice device = GraphicsGridBlockDevice.auto, int pcColumns = 2, double crossAxisSpacing = 48.0, double mainAxisSpacing = 48.0, List<
Widget> ? projects, int? itemCount, IndexedWidgetBuilder? itemBuilder, double breakpoint = 500.0}) -
Creates a GraphicsGridBlock instance with a list of project widgets.
const
- GraphicsGridBlock.builder({Key? key, double? width, GraphicsGridBlockDevice device = GraphicsGridBlockDevice.auto, int pcColumns = 2, double crossAxisSpacing = 48.0, double mainAxisSpacing = 48.0, required int count, required IndexedWidgetBuilder builder, double breakpoint = 500.0})
-
Convenience constructor for building a grid from a count and item builder.
const
Properties
- breakpoint → double
-
Viewport width breakpoint below which mobile layout is activated (defaults to 500.0).
final
- crossAxisSpacing → double
-
Horizontal spacing gap between columns (defaults to 48px per Figma).
final
- device → GraphicsGridBlockDevice
-
Viewport mode (
autoresponsive,pc, ormobile).final - hashCode → int
-
The hash code for this object.
no setterinherited
- itemBuilder → IndexedWidgetBuilder?
-
Builder for project items at a given index.
final
- itemCount → int?
-
Number of project items when using itemBuilder.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- mainAxisSpacing → double
-
Vertical spacing gap between rows (defaults to 48px per Figma).
final
- pcColumns → int
-
Number of columns in PC mode (defaults to 2 per Figma specification).
final
-
projects
→ List<
Widget> ? -
List of project items to display.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- width → double?
-
Optional fixed width for the overall grid (defaults to fill available parent width).
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- version → const String
- Component version for reference. v1.1.1: Updated documentation to reflect Figma removal of count variants in favor of boolean toggles (handled dynamically via projects list/count). v1.1.0: Renamed from ProjectGrid to GraphicsGridBlock matching Figma node 795:3693, moved to lib/web/. v1.0.1: Added ambient AlterDeviceScope propagation so child ProjectMarkers derive device mode directly from ProjectGrid width and never collapse into mobile mode independently. v1.0.0: Initial release matching Figma Node 795:3693.