dotwear_icons
Pixel-art icons for Flutter, from the Dotwear design system.
import 'package:dotwear_icons/dotwear_icons.dart';
DotwearIcon(DotwearIcons.save, scale: 2, semanticLabel: 'Save')
scaleis an integer. One cell isscale × devicePixelRatiorounded down to whole device pixels, and the icon is moved onto the device pixel grid when it is painted. Edges stay crisp on fractional densities such as 1.5× or 2.625×. On those screens the icon is slightly smaller in logical pixels; on integer densities it is exactly16 × scale.- Without
semanticLabelthe icon is decorative (excluded from VoiceOver and TalkBack). With it, the icon is read as an image. #cells usecolor, thenDotwearIconTheme, then the ambientIconThemecolor. Multi-color cells use the palette (slots 2–9):
DotwearIconTheme(
palette: DotwearPalettes.retroGreen,
child: DotwearIcon(DotwearIcons.folder, scale: 2),
)
- Pick an icon at run time with
DotwearIcons.named('save')(this keeps every icon in your app). - Ask for a hand-tuned drawing with
grid: DotwearIconGrid.grid24; icons without one use their 16 grid.
Docs: https://dotwear.dev · License: MIT
Libraries
- dotwear_icons
- Dotwear のピクセルアイコン(ADR-033)。