flutter_lucide 1.6.1 copy "flutter_lucide: ^1.6.1" to clipboard
flutter_lucide: ^1.6.1 copied to clipboard

Flutter package for Lucide Icons. Lucide is a free, open-source icon set with 1450+ icons. It's a fork of the popular Feather icon set.

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) => MaterialApp(
        title: 'Lucide Icons Example',
        theme: ThemeData(
          colorScheme: ColorScheme.fromSeed(seedColor: Colors.orange),
          useMaterial3: true,
        ),
        home: const MyHomePage(title: 'Lucide Icons Example'),
      );
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});
  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() => setState(() => _counter++);

  void _decrementCounter() => setState(() => _counter--);

  void _resetCounter() => setState(() => _counter = 0);

  @override
  Widget build(BuildContext context) => Scaffold(
        appBar: AppBar(
          backgroundColor: Theme.of(context).colorScheme.inversePrimary,
          title: Text(widget.title),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              const Text(
                'You have pushed the button this many times: ',
              ),
              if (_counter > 0) ...[
                const SizedBox(height: 16),
                IconButton.filled(
                    onPressed: _incrementCounter,
                    icon: const Icon(
                      LucideIcons.plus,
                      size: 32,
                    )),
              ] else if (_counter < 0) ...[
                const SizedBox(height: 16),
                IconButton.filled(
                  onPressed: _decrementCounter,
                  icon: const Icon(
                    LucideIcons.minus,
                    size: 32,
                  ),
                ),
              ],
              Text(
                '$_counter',
                style: Theme.of(context).textTheme.headlineLarge,
              ),
            ],
          ),
        ),
        floatingActionButton: Row(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            FloatingActionButton(
              onPressed: _incrementCounter,
              child: const Icon(LucideIcons.plus),
            ),
            const SizedBox(width: 8),
            FloatingActionButton(
              onPressed: _resetCounter,
              child: const Icon(LucideIcons.refresh_ccw),
            ),
            const SizedBox(width: 8),
            FloatingActionButton(
              onPressed: _decrementCounter,
              child: const Icon(LucideIcons.minus),
            ),
          ],
        ),
      );
}
48
likes
160
points
2.64k
downloads
screenshot

Publisher

verified publisherbetterx.io

Weekly Downloads

Flutter package for Lucide Icons. Lucide is a free, open-source icon set with 1450+ icons. It's a fork of the popular Feather icon set.

Homepage
Repository (GitHub)
View/report issues

Topics

#lucide #lucide-icons #feather #feather-icons #icons

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_lucide