iconify_design_flutter 1.0.3 copy "iconify_design_flutter: ^1.0.3" to clipboard
iconify_design_flutter: ^1.0.3 copied to clipboard

A Flutter package that allows you to use icons from the Iconify.design API with ease.

Iconify Design Flutter #

iconify_design_flutter lets you use icons from Iconify in Flutter. Icons are fetched once, cached in memory and on disk, then reused.


Features #

  • Fetch SVG icons from Iconify by id (prefix:name)
  • Memory + disk cache, with in-flight request dedupe
  • Updates when icon changes at runtime
  • Respects IconTheme for default color/size
  • Optional accessibility label and loading placeholder

Installation #

Add the package to your pubspec.yaml:

dependencies:
  iconify_design_flutter: ^1.0.3

Run:

flutter pub get

Usage #

import 'package:iconify_design_flutter/iconify_design_flutter.dart';

IconifyIcon(
  icon: "mdi:home",
  color: Colors.black,
  size: 32,
  semanticsLabel: 'Home',
)

Runtime icon changes work without restarting the app:

IconifyIcon(
  icon: isFavorite ? "mdi:heart" : "mdi:heart-outline",
)

Optional loading placeholder:

IconifyIcon(
  icon: "mdi:home",
  placeholder: SizedBox(
    width: 24,
    height: 24,
    child: CircularProgressIndicator(strokeWidth: 1),
  ),
)

Clear caches if needed:

IconService.clearMemoryCache();
await IconService.clearAllCaches();

How it works #

  1. Validates prefix:name
  2. Returns from memory cache when available
  3. Otherwise checks SharedPreferences
  4. Otherwise fetches from Iconify and stores in memory + disk
  5. Concurrent requests for the same icon share one network call

Dependencies #



Contribution #


License #

MIT – see LICENSE

2
likes
160
points
222
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Flutter package that allows you to use icons from the Iconify.design API with ease.

Repository (GitHub)
View/report issues

License

GPL-3.0 (license)

Dependencies

dio, flutter, flutter_svg, shared_preferences

More

Packages that depend on iconify_design_flutter