icons

package
v1.18.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2026 License: BSD-3-Clause Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package icons implements the `glutter-gen icons` subcommand, which generates the Material icon constants and, with -cupertino, the CupertinoIcons.

Flutter: no counterpart.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(icons []Icon) ([]byte, error)

Generate writes the Go source of the icons.

Flutter: no counterpart.

func GenerateCupertino

func GenerateCupertino(icons []Icon) ([]byte, error)

GenerateCupertino writes the Go source of CupertinoIcons: a read-only value whose methods are the icons, each an IconData of the CupertinoIcons font, which an Icon loads the first time it builds one (widgets.IconFont).

Flutter: cupertino/icons.dart CupertinoIcons

func Run

func Run(args []string) error

Run executes `glutter-gen icons [-cupertino] [-reference dir] [-out file]` with the arguments that follow the subcommand name. It reads the Material icon constants of icons.dart in the Flutter checkout of the reference directory and writes material/icons_gen.go, which holds the read-only Icons value; with -cupertino it reads the constants of cupertino/icons.dart and writes cupertino/icons_gen.go, which holds the read-only CupertinoIcons value.

Flutter: material/icons.dart Icons and cupertino/icons.dart CupertinoIcons

Types

type Icon

type Icon struct {
	// DartName is the snake case name of the constant in Dart.
	DartName string
	// GoName is the name of the field of Go's Icons.
	GoName string
	// CodePoint is the code point of the glyph.
	CodePoint int
	// MatchTextDirection is whether the icon mirrors in right to left text.
	MatchTextDirection bool
}

Icon is one icon read from icons.dart.

Flutter: no counterpart.

func Parse

func Parse(src string) ([]Icon, error)

Parse reads the icon constants of the text of icons.dart.

Flutter: no counterpart.

func ParseCupertino

func ParseCupertino(src string) ([]Icon, error)

ParseCupertino reads the icon constants of the text of cupertino/icons.dart: the legacy names and the names of the SF Symbols, which are all in the class CupertinoIcons.

Flutter: cupertino/icons.dart CupertinoIcons

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL