Documentation
¶
Overview ¶
Command svg shows the SVG pictures of package svg (the widgets of flutter_svg). On the left, a grid of eight icons whose currentColor comes from a DefaultSvgTheme, the same icons tinted with a ColorFilter, and one icon at three sizes; on the right, a logo with gradients and a card with SVG text and a drop-shadow filter. The pictures are SVG files in assets/, embedded in the program and loaded as assets. It uses only the public packages: material, imported as m, and svg.
Run it with: go run ./examples/svg
On the web: go run ./cmd/glutter-web serve ./examples/svg. On Android: go run ./cmd/glutter-android run ./examples/svg. On Windows: go run ./cmd/glutter-windows run ./examples/svg (under Wine on Linux, headless with -headless; GLUTTER_BACKEND is win32 there). Nothing of this example is missing on any of them: the pictures are parsed and drawn by plain Go.
Environment: GLUTTER_BACKEND=x11|wayland (Linux) or win32 (Windows), GLUTTER_SCREENSHOT=<file.png>, GLUTTER_SCREENSHOT_AFTER=<duration> (the pictures load on goroutines: a shot of the finished page asks for a short delay).