pixel_ui 0.5.1
pixel_ui: ^0.5.1 copied to clipboard
Pixel-art design system for Flutter — retro / 8-bit primitives, tile grids, interactive buttons, and a bundled pixel font for game UI.
Changelog #
0.5.1 — 2026-04-27 #
Docs #
- Refined positioning copy on
pubspec.yamldescription and README intro to surfaceretro,8-bit,RPG,tile grids, andgame UIkeywords for pub.dev search discoverability (#42). - New "Why pixel_ui?" section in README distinguishing the primitives-first model from full-themed widget sets (NES/XP/Steam-style).
PixelGrid<T>now listed in the Features summary.
0.5.0 — 2026-04-24 #
Added #
PixelGrid<T>— tile-based layout widget for minimaps, inventories, tile maps, and similar 2D compositions (#36). Backed byPixelShapePainter. Supports:.fromList(data: List<List<T?>>)for static grids;.builder(rows, cols, tileAt)for procedural/large maps.- Tap callback (
onTileTap), keyboard focus with arrow-key navigation, Enter/Space activation (onTileActivate), andisTileEnabledskip-search. Draggable<T>+DragTarget<T>drag-and-drop viadragDataFor+onTileAccept((from, to, data)).- Empty slots via
nulldata + optionalemptyStylefallback.
0.4.1 — 2026-04-24 #
Added #
PixelShapePainter.canvasSizeFor(...)static helper — computes theCustomPaint.sizeneeded to fit the shape plus its drop shadow at a given scale. Closes #35 for direct-use callers that previously had to reverse-engineerPixelBoxinternals to size the canvas correctly.
Docs #
- Class-level dartdoc on
PixelShapePainternow documents canvas sizing (including the shadow-aware formula) and links to the new helper. - README
## Usagegains a "Direct CustomPaint integration" subsection with a full minimap/tile-grid-style example (#38). - README
## Installversion pin bumped^0.2.0→^0.4.0to match the current minor line (recurring drift; see #19).
0.4.0 — 2026-04-24 #
Fixed #
- Texture cells no longer overflow the shape's bounding rect when
PixelTexture.sizeexceeds the remaining logical space. Trailing cells are now clipped to fit. Previously a tile withlogicalWidth: 5, logicalHeight: 5+texture.size: 10would bleed 50% into adjacent widgets (#34).
Changed #
- Debug asserts on public painter/style/texture constructors. Previously-silent misuse now fails loudly in debug builds (no effect in release). Closes #33 and #37.
PixelShapePainter:logicalWidth > 0,logicalHeight > 0on construction;corners.topInsetRows + corners.bottomInsetRows <= logicalHeighton firstpaint(). Prevents the silent corner-stair overlap that caused top/bottom loops to double-paint shared rows with mismatched insets (#33).PixelShapeStyle:borderWidth >= 0.PixelTexture:size >= 1,0 <= density <= 1.
- Callers hitting the new corner invariant should raise
logicalHeightso the top+bottom stair fits — e.g.PixelCorners.md(3+3=6 rows) requireslogicalHeight >= 6.
0.3.0 — 2026-04-24 #
Added #
-
PixelTheme/PixelBoxTheme/PixelButtonTheme—ThemeExtension-based pixel defaults. Wire once withpixelUiTheme(...)onMaterialApp.themeand any descendantPixelBox/PixelButtoninherits its style (#8). -
pixelUiTheme({base, pixelTheme, boxTheme, buttonTheme})factory returns aThemeDatawith pixel extensions registered; explicitboxTheme/buttonThemeoverride slots onpixelTheme. Preserves unrelated extensions onbase. -
context.pixelTheme<T>()shorthand forTheme.of(context).extension<T>(). -
PixelShapePainterBuildertypedef +PixelBox.painteroptional prop +PixelBoxTheme.painterslot now active: inject a customCustomPainterwithout forkingPixelBox(#9). Precedence:painterprop > theme.painter > defaultPixelShapePainter. -
PixelButton.disabledStyleoptional parameter — explicitPixelShapeStyleshown whenonPressedisnull. Unspecified keeps the existing behavior (normalStylerendered at 50% opacity). -
PixelShadowStyle { solid, stipple }enum +PixelShadow.stylefield (default.solid, backward compatible).stipplerenders the drop shadow as a 1-pixel checker pattern — retro "dithered" aesthetic alongside the existing solid look (#11). Tuner gains astyledropdown and emitsstyle: PixelShadowStyle.stippleonly when non-default. -
PixelBox.label+PixelBox.labelLeftInset— overlay a widget on the top border with a painter-level carve-out ([ TITLE ]━━━━━).PixelBoxCutoutvalue object +PixelShapePainter.labelCutoutlet the painter skip the underlying border/fill cells. Builder signature ofPixelShapePainterBuildergains an optional namedlabelCutoutparam; existing custom painters that don't declare it need to be updated (#10). Tuner adds a label editor with live text input.
Changed #
PixelBox.styleandPixelButton.normalStyleare now optional. When omitted they resolve from the ancestor theme; asserts if neither is available. Existing call sites that pass these props explicitly are unaffected.
0.2.1 — 2026-04-23 #
Added #
- Bundled
MulmaruMonofont family (SIL OFL 1.1) for code, terminal-style UI, and fixed-width layouts. PixelText.mulmaruMono(...)factory andPixelText.mulmaruMonoFontFamilyconstant. Signature identical toPixelText.mulmaru(...).
Notes #
- Font source: mushsooni/mulmaru v1.0 release. SHA256
34a1641eb4e94449b26192321e8e0c2bd4f07ef3674fac8abed33d8953a7f70d.
0.2.0 — 2026-04-23 #
Added #
- Official platform support: Web, macOS, Linux, Windows (in addition to existing iOS, Android).
.github/workflows/build.ymlCI workflow that builds the example app on 6 OS/target combinations.- README "Platforms" section documenting verification level for each platform.
Changed #
- example app showcase is now constrained to 480px max width on wide viewports (desktop, web), keeping the mobile-style layout centered. Mobile rendering is unaffected.
0.1.2 — 2026-04-22 #
Added #
- README hero image and gallery section embedding the 5 pub.dev screenshots.
0.1.1 — 2026-04-22 #
Added #
- pub.dev screenshots (5) generated via golden tests from
test/screenshots/scenes/. tool/update_screenshots.shregenerates goldens and syncs them todoc/screenshots/.
0.1.0 — 2026-04-22 #
Initial public release.
Features #
PixelCorners: asymmetric per-corner stair pattern with.sharp/.xs/.sm/.md/.lg/.xlstatic presets.PixelShadow: pixel drop shadow with.sm/.md/.lgfactory constructors (offsets 1/2/4).PixelTexture: deterministic LCG noise overlay.PixelShapeStyle: composable shape style with sentinel-basedcopyWith(nullclears, omit preserves).PixelShapePainter: low-levelCustomPainterfor pixel rendering.PixelBox: container widget with automatic size resolution by logical ratio.PixelButton: interactive pixel button with normal/pressed styles, press-down animation, andSemanticsintegration.PixelText: static namespace exposingmulmaruFontFamily/mulmaruPackageconstants and amulmaru()TextStyle factory.- Bundled Mulmaru Proportional pixel font (SIL OFL 1.1).
Bundled font integrity #
assets/fonts/Mulmaru.ttfSHA-256:02545e10374c0797be32df8670e18663c6ab73eea6966bb98f4ffd0283138810- Size: 1,606,948 bytes
- Source: https://github.com/mushsooni/mulmaru