iconfontPub

只需一行命令,即可快速生成https://www.iconfont.cn/的Icon文件。

特点

  1. 支持多个Iconfont项目。
  2. 可自动在 pubspec.yaml 中注册字体

安装

方式1

注册

flutter pub global activate iconfont

使用

flutter pub global run iconfont

方式2

注册

pubspec.yaml 中添加

dev_dependencies:
  iconfont: #latest version

使用

flutter packages pub run iconfont

参数

-i, --in      iconfont文件所在目录
              (defaults to "assets/fonts/")
-o, --out     生成后文件存放目录
              (defaults to "lib/icons/")
-h, --help    help
-s, --skip    覆盖pubspec.yaml文件,将丢失pubspec.yaml中的注释

例子

Libraries

config
iconfont_model
wings_iconfont

Dart

dart:ui
Built-in types and core primitives for a Flutter application. [...]

Core

dart:async
Support for asynchronous programming, with classes such as Future and Stream. [...]
dart:collection
Classes and utilities that supplement the collection support in dart:core. [...]
dart:convert
Encoders and decoders for converting between different data representations, including JSON and UTF-8. [...]
dart:core
Built-in types, collections, and other core functionality for every Dart program. [...]
dart:developer
Interact with developer tools such as the debugger and inspector. [...]
dart:math
Mathematical constants and functions, plus a random number generator. [...]
dart:typed_data
Lists that efficiently handle fixed sized data (for example, unsigned 8 byte integers) and SIMD numeric types. [...]

VM

dart:ffi
Foreign Function Interface for interoperability with the C programming language. [...]
dart:io
File, socket, HTTP, and other I/O support for non-web applications. [...]
dart:isolate
Concurrent programming using isolates: independent workers that are similar to threads but don't share memory, communicating only via messages. [...]

Web

dart:html
HTML elements and other resources for web-based applications that need to interact with the browser and the DOM (Document Object Model). [...]
dart:js
Low-level support for interoperating with JavaScript. [...]
dart:js_util
Utility methods to manipulate package:js annotated JavaScript interop objects in cases where the name to call is not known at runtime. [...]