tabler_icons_pro 0.1.1 copy "tabler_icons_pro: ^0.1.1" to clipboard
tabler_icons_pro: ^0.1.1 copied to clipboard

Strongly-typed Tabler icons for Flutter with configurable stroke width.

tabler_icons_pro #

Strongly-typed Tabler icons for Flutter, with configurable stroke width — an API that feels like Flutter's Icon/Icons.

TablerIcon(TablerIcons.home, size: 24, strokeWidth: 1.5)

TablerIcon(
  TablerIcons.user,
  size: 20,
  strokeWidth: 2,
  color: Colors.blue,
)

The icon itself is plain data:

const icon = TablerIcons.home;
icon.name;               // 'home'
icon.assetPath;          // 'tabler:home'  (logical id)
icon.defaultStrokeWidth; // 2.0
icon.svg(1.5);           // resolved SVG string

Why #

Flutter's font-based Icons can't vary stroke width. Tabler outline icons are SVGs with a stroke-width attribute, so the weight can match any design system. This package keeps that flexibility behind a familiar, strongly-typed API.

How it works #

  • Each icon is a const TablerIconData holding an SVG template with a stroke-width="<STROKE_WIDTH>" placeholder.
  • TablerIcon substitutes the resolved stroke width and renders via flutter_svg's SvgPicture.string, coloring with a ColorFilter.
  • Icons are separate const symbols, so unused icons are tree-shaken out of your app binary. (No giant asset bundle, no runtime map.)

Resolution order #

Each of size, color, strokeWidth resolves:

explicit argumentTablerIconTheme → Material IconTheme → default.

Set app-wide defaults once:

TablerIconTheme(
  data: const TablerIconThemeData(strokeWidth: 1.5),
  child: MaterialApp(...),
)

Install #

flutter pub add tabler_icons_pro

Or add it to pubspec.yaml:

dependencies:
  tabler_icons_pro: ^0.1.0
Local development / contributors
dependencies:
  tabler_icons_pro:
    path: ../tabler_icons_pro        # local checkout
    # git:
    #   url: https://github.com/tegarnugroho/tabler_icons_pro.git

Regenerating icons (maintainers) #

Icons are generated from the tabler_icons_next dev-dependency (not shipped at runtime):

dart pub get
dart run tool/generate_icons.dart

Bump tabler_icons_next in pubspec.yaml to update the icon set. The default stroke width is set in tool/generate_icons.dart (_defaultStrokeWidth).

License #

Code: MIT. Icons: Tabler Icons, MIT © Paweł Kuna.

1
likes
150
points
19
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Strongly-typed Tabler icons for Flutter with configurable stroke width.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, flutter_svg

More

Packages that depend on tabler_icons_pro