themesGenerator top-level property
Implementation
final themesGenerator = FigGenerator(
script: ["fig", "theme", "--list"],
postProcess: (String output, [List<String>? tokens]) {
final builtinThemes = [
FigSuggestion(
name: "system",
icon: "💻",
priority: 51,
),
FigSuggestion(
name: "light",
icon: "fig://template?color=ffffff&badge=☀️",
priority: 51,
),
FigSuggestion(
name: "dark",
icon: "fig://template?color=000000&badge=🌙",
priority: 51,
),
];
return output
.split("\n")
.map((theme) => FigSuggestion(
name: theme.replaceAll(".json", ""),
icon: "🎨",
))
.toList() +
builtinThemes;
},
);