iconify_sdk_core 0.2.0 copy "iconify_sdk_core: ^0.2.0" to clipboard
iconify_sdk_core: ^0.2.0 copied to clipboard

Pure Dart engine for Iconify icons. Provides models, providers, cache, alias resolution, and JSON parsing. No Flutter dependency required.

iconify_sdk_core #

The high-performance, pure-Dart engine behind the Iconify SDK for Flutter.

Pub Version License: MIT

Overview #

iconify_sdk_core provides the foundational logic for parsing, caching, and resolving icons from the Iconify ecosystem. It is built with zero dependencies on Flutter, making it suitable for CLI tools, server-side Dart, or shared logic in monorepos.

Key Features #

  • Blazing Fast: Benchmarked to parse 100,000 icon names in under 15ms.
  • Alias Resolution: Fully supports Iconify's alias system with circular dependency protection.
  • LRU Caching: Memory-efficient icon caching out of the box.
  • Provider Pattern: Modular architecture for loading icons from Memory, File System, or Remote sources.
  • Type-Safe Models: Robust models for Icon Data, Collection Metadata, and License information.

Getting Started #

import 'package:iconify_sdk_core/iconify_sdk_core.dart';

void main() async {
  // 1. Parse a canonical icon name
  final name = IconifyName.parse('mdi:home');

  // 2. Setup a provider (e.g., Memory)
  final provider = MemoryIconifyProvider();
  provider.putIcon(name, const IconifyIconData(body: '<path d="..." />'));

  // 3. Retrieve icon data
  final icon = await provider.getIcon(name);
  
  if (icon != null) {
    print('SVG Body: ${icon.body}');
    print('SVG String: ${icon.toSvgString(color: 'red', size: 32)}');
  }
}

Architecture #

This package is designed around the IconifyProvider interface. You can compose multiple providers using CompositeIconifyProvider to create complex loading strategies (e.g., Memory -> Local Disk -> Remote).

License #

This project is licensed under the MIT License. See the LICENSE file for details.

0
likes
160
points
0
downloads

Documentation

API reference

Publisher

verified publisheraditi.cc

Weekly Downloads

Pure Dart engine for Iconify icons. Provides models, providers, cache, alias resolution, and JSON parsing. No Flutter dependency required.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

http, meta

More

Packages that depend on iconify_sdk_core