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

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

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:tabler_icons_pro/tabler_icons_pro.dart';

void main() => runApp(const ExampleApp());

class ExampleApp extends StatelessWidget {
  const ExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'tabler_icons_pro',
      theme: ThemeData(useMaterial3: true),
      // App-wide defaults for every TablerIcon below.
      home: TablerIconTheme(
        data: const TablerIconThemeData(strokeWidth: 1.5),
        child: const _Demo(),
      ),
    );
  }
}

class _Demo extends StatelessWidget {
  const _Demo();

  @override
  Widget build(BuildContext context) {
    const icon = TablerIcons.home; // descriptor as data
    return Scaffold(
      appBar: AppBar(title: const Text('tabler_icons_pro')),
      body: Center(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: [
            // Flutter-like usage.
            const TablerIcon(TablerIcons.home, size: 48, strokeWidth: 1.5),
            const SizedBox(height: 16),
            const TablerIcon(
              TablerIcons.user,
              size: 32,
              strokeWidth: 2,
              color: Colors.blue,
            ),
            const SizedBox(height: 16),
            // Inherits strokeWidth: 1.5 from TablerIconTheme.
            const TablerIcon(TablerIcons.user, size: 32, color: Colors.green),
            const SizedBox(height: 24),
            // Metadata exposed by the descriptor.
            Text('name: ${icon.name}'),
            Text('isFilled: ${icon.isFilled}'),
            Text('defaultStrokeWidth: ${icon.defaultStrokeWidth}'),
          ],
        ),
      ),
    );
  }
}
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