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 GenerateCupertino ¶
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 ¶
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 ParseCupertino ¶
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