pv_grid_edit 0.0.1 copy "pv_grid_edit: ^0.0.1" to clipboard
pv_grid_edit: ^0.0.1 copied to clipboard

building snapped grid editors with draggable and resizable shapes.

pv_grid_edit #

A Flutter package for building snapped grid editors with draggable and resizable rectangle shapes.

Example app screenshot

Features #

  • Rectangle-based grid editing with frozen, fixed-size movable, constrained, and free-flowing behaviors.
  • Collision rollback for non-overlapping shapes.
  • JSON serialization for layouts and shapes.
  • A simple dictionary helper for map-based load and save boundaries.

Getting started #

Add the package to your pubspec.yaml, then create a GridEditorBloc and pass it to GridEditor.

Usage #

final bloc = GridEditorBloc(
	initialLayout: GridLayout(
		shapes: <GridShape>[
			GridRectangleShape.constrained(
				id: 'panel',
				position: const GridPoint(column: 0, row: 0),
				size: const GridSize(columns: 3, rows: 2),
			),
		],
	),
);

For map-based integration, use GridEditorMapHelper.layoutFromDictionary(...) and GridEditorMapHelper.dictionaryFromLayout(...).

0
likes
160
points
9
downloads

Documentation

API reference

Publisher

verified publisherpathverse.ca

Weekly Downloads

building snapped grid editors with draggable and resizable shapes.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

bloc, flutter, flutter_bloc

More

Packages that depend on pv_grid_edit