Skip to content

pantoken / packages/core/src / flutterIconManifest

Mahi: flutterIconManifest()

flutterIconManifest(names, assetDir?): string

Beta

Hangaia he manifest Flutter/Dart o ngā ara rawa tohu (mō flutter_svg). Tārahia ki ngā SVG mata kua kapea ki raro i assetDir.

Ngā Tawhā

names

readonly string[]

Ngā ingoa tohu.

assetDir?

string = "assets/pantoken/icons"

Te kōpaki rawa kei kapea ai ngā SVG (taunoa assets/pantoken/icons).

Whakahokia

string

Te puna Dart e tautuhi ana i tētahi kāwai PanTokensIcons o ngā tūtohi ara rawa.

Ngā tauira

Kōpaki rawa taunoa

ts
import { flutterIconManifest } from "@pantoken/core";

flutterIconManifest(["arrow-left", "check-mark"]);
// → class PanTokensIcons {
//     static const String arrowLeft = 'assets/pantoken/icons/arrow-left.svg';
//     static const String checkMark = 'assets/pantoken/icons/check-mark.svg';
//   }

Kōpaki rawa ritenga

ts
import { flutterIconManifest } from "@pantoken/core";

flutterIconManifest(["arrow-left"], "lib/icons");
// → static const String arrowLeft = 'lib/icons/arrow-left.svg';