Skip to content
pubscout

hexagon

0.2.0, released 4 years ago by orlik.dev

A Flutter widget that draws hexagon shapes and supports flat or pointy orientations.

WASM-ready
$ flutter pub add hexagon
Source repository

What it does

Provides a HexagonWidget for single hexagons and two grid widgets (HexagonOffsetGrid and HexagonGrid) that arrange tiles in hexagonal layouts. It supports custom colors, padding, elevation, and child widgets.

AI-written summary of version 0.2.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need a hexagonal tile or grid in a UI
  • You want to display data in a hexagonal grid without custom drawing code
  • You need simple flat or pointy hexagon shapes for buttons or cards

Skip it when

  • You require advanced performance tuning for very large grids
  • You need a fully custom hexagon path with animations beyond elevation

Strengths

  • Easy to use declarative API
  • Supports both flat and pointy hexagons
  • Built-in offset and cube/axial grid layouts
  • Null‑safe and actively maintained

Weaknesses

  • Limited to static hexagon shapes, no animation support
  • Grid performance not benchmarked for very large numbers
  • No theming or style system beyond basic color

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

Add dependency in pubspec and import 'package:hexagon/hexagon.dart';

import 'package:hexagon/hexagon.dart';

HexagonWidget.flat(
  width: 100,
  color: Colors.blue,
  child: Text('Flat Hexagon'),
);

Alternatives

Packages that do the same job and could replace hexagon.