Skip to main content

29. [flutter] SVG를 IconData로


icondata from svg


SVG를 IconData로 만들어야 하는 경우가 있다.

이곳에 들어간다.

alt text

  1. 여기에 svg 떨구기

alt text

  1. 선택해서 원하는 이름으로 download
    - family: OS
fonts:
- asset: assets/icons/OS.ttf
  1. 해당 폴더에 OS.ttf 떨구고 pubspec.yaml 파일에 정의

  2. 아무 경로에 dart 파일도 떨구기

icon: zeroData.nodeOSType == "Linux"
? OS.icons8_flat_linux
// if 리눅스
: zeroData.nodeOSType == "Windows"
// if 윈도우
? OS.windows_logo___2012
: Icons.computer,
  1. 사용하기

끝..