패키지, 저장소 및 앱 카테고리 검색

패키지 상세v2.0.0

flutter_sficon

모든 플랫폼에서 트리 샤킹 가능한 벡터 아이콘으로 SF Symbols 27 제공, 모든 두께 지원. 번들된 폰트 없이 iOS 빌드가 Apple의 폰트 검사 통과 가능.

AndroidiOSLinuxmacOSWebWindows
30일 다운로드
5.1만
좋아요
12
Pub 점수
160

패키지 설치

flutter pub add flutter_sficon

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

flutter_sficon은 SF Symbols 27 기반의 트리-셰이크 가능한 벡터 아이콘을 제공하며, 모든 플랫폼에서 완전한 웨이트 지원을 합니다. 전통적인 아이콘 폰트와 달리 폰트를 번들링하지 않고 네이티브 벡터 렌더링을 사용하여 iOS 빌드가 Apple의 폰트 검증을 통과할 수 있도록 보장합니다. 원활한 통합을 위해 설계되었으며, 최소한의 오버헤드로 선명하고 확장 가능한 아이콘을 제공하며 추가 폰트 파일이 필요 없습니다. 크기 및 성능 제약을 고려한 깔끔하고 플랫폼 내재형 아이콘 솔루션을 찾는 개발자에게 이상적입니다.

사용 사례

  • 네이티브 iOS 앱 디자인
  • 크로스 플랫폼 아이콘 일관성
  • 성능에 민감한 애플리케이션
  • Apple App Store 준수를 요구하는 앱
  • 확장 가능한 그래픽을 갖춘 미니멀한 UI

주요 기능

  • 트리 쉐이크 가능한 아이콘
  • 내장된 글꼴 파일 없음
  • 완전한 SF 심볼 27 커버리지
  • 모든 웨이트 지원
  • 네이티브 벡터 렌더링
  • 플랫폼에 관계없는 호환성

적합한 대상

  • Flutter로 iOS를 타겟으로 하는 개발자
  • 경량 아이콘 솔루션을 필요로 하는 프로젝트
  • 애플의 폰트 검사 승인을 목표로 하는 앱
  • 빌드 크기와 성능을 우선시하는 팀
  • 일관된 시스템 아이콘 스타일링을 원하는 디자이너

고려 사항

  • SF 심볼 27 기능만 지원
  • 최적의 사용을 위해서는 Flutter 3.0 이상이 필요합니다
  • 새로운 SF 심볼 릴리스를 위해 수동 업데이트가 필요할 수 있습니다
  • SF 심볼 아이콘 세트가 아닌 경우 적합하지 않습니다
  • 상위 SF 심볼의 가용성에 의존

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Flutter SFIcon

Render SF Symbols on every platform, similar to the regular Icon widget. Supports all nine weights and SF Symbols 27. Icons are tree shakable: an app only ships the symbols it uses.

Symbols are drawn as vector paths, so no font is bundled with the app. Apps that bundle an Apple font get the ITMS-91182 "Disallowed font" warning from App Store Connect (see Apple's TN3214), and from October 1, 2027 such builds are rejected. Versions 1.x bundled one; 2.0 doesn't.

Install

flutter pub add flutter_sficon

How to use

All icons are static constants of the SFIcons class, so unused ones are tree-shaken away. Naming convention for retrieving SF symbol is as follows:

  1. SF Symbol name is prefixed with 'sf_'.
  2. Dots are replaced with underscores.

Examples:

  • SF Symbol 0.circle is named as sf_0_circle
  • SF Symbol heart.fill is named as sf_heart_fill
import 'package:flutter_sficon/flutter_sficon.dart';

// use SFIcon instead of regular Icon widget
const SFIcon(
    SFIcons.sf_heart_fill, // 'heart.fill'
    fontSize: 40, // fontSize instead of size
    fontWeight: FontWeight.bold, // fontWeight instead of weight
    color: Colors.red,
);

SFIcon lays out like text of the same fontSize: same width, height and baseline, so it lines up with text in a Row aligned by baseline, and it follows the platform text size.

It colours like an icon: color, then IconTheme color and opacity. ShaderMask and shadows work too. Symbols are monochrome; hierarchical, palette and multicolour rendering modes aren't supported.

Every weight from w100 to w900 is drawn from Apple's own weight masters, the same way the font interpolates them.

Migrating from 1.x

The API is the same, so most code needs no changes. Things to check:

  • Use SFIcon, not Icon. SFIcons constants carry vector data instead of a font, so Flutter's Icon widget can't draw them. Replace Icon(SFIcons.sf_x) with SFIcon(SFIcons.sf_x).
  • Renamed symbols. Names Apple renamed or removed still compile but are deprecated; the warning names the replacement when there is one.
  • Real weights. 1.x bundled only the Regular weight, so lighter weights looked Regular and heavier ones were synthetic bold. 2.0 draws Apple's real weights, so w100 to w300 look lighter than before and w600 to w900 look a bit different.
  • Newer artwork. Symbols come from SF Pro 22.0, so some look slightly different from 1.x.
  • New symbols. 172 symbols introduced in SF Symbols 27 aren't included yet, because Apple hasn't shipped their outlines in SF Pro.

Size

An app pays only for the symbols it uses: about 0.6 KB of path data per symbol on average. The package itself has no assets.

Updating the symbols

For maintainers. tool/symbols.tsv lists every name and code point. tool/update_symbols.py updates it from lists copied out of the SF Symbols app, and tool/generate.py regenerates lib/src/sf_icons.g.dart from Apple's variable SF-Pro.ttf. Both scripts describe their usage at the top.

IMPORTANT

All SF Symbols shall be considered to be system-provided images as defined in the Xcode and Apple SDKs license agreements and are subject to the terms and conditions set forth therein. You may not use SF Symbols or glyphs that are substantially or confusingly similar in your app icons, logos, or any other trademark-related use. Apple reserves the right to review and, in its sole discretion, require modification or discontinuance of use of any Symbol used in violation of the foregoing restrictions, and you agree to promptly comply with any such request.

Notes

This package is inspired by https://github.com/virskor/flutter_sfsymbols. Also thanks for the legal note used here.

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.

순위