swm_icons 0.2.1 copy "swm_icons: ^0.2.1" to clipboard
swm_icons: ^0.2.1 copied to clipboard

The SWM Icon pack for Flutter. Provides 200+ additional icons to use in your apps.

example/lib/main.dart

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

void main() {
  runApp(const MyApp());
}

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final List<SWMIcons> _icons = SWMIcons.values;
  final ScrollController _gridController = ScrollController();

  @override
  void dispose() {
    super.dispose();
    _gridController.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        backgroundColor: Colors.white,
        appBar: AppBar(
          title: const Text('SWM Icons example app'),
          centerTitle: true,
        ),
        body: GridView.builder(
          controller: _gridController,
          itemCount: _icons.length,
          gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
            crossAxisCount: 5,
            crossAxisSpacing: 6,
            mainAxisSpacing: 6,
          ),
          itemBuilder: (_, i) {
            return SWMIcon(_icons[i], style: SWMIconStyles.broken);
          },
        ),
      ),
    );
  }
}
2
likes
160
pub points
54%
popularity

Publisher

verified publishershasmatic.site

The SWM Icon pack for Flutter. Provides 200+ additional icons to use in your apps.

Repository (GitHub)
View/report issues

Topics

#assets #icons #swm #swm-icons

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on swm_icons