svg_packer 0.1.0-pre.1 copy "svg_packer: ^0.1.0-pre.1" to clipboard
svg_packer: ^0.1.0-pre.1 copied to clipboard

Optimized and dynamic vector graphics for Flutter.

example/lib/main.dart

import 'package:example/src/widgets/icon.g.dart';
import 'package:flutter/material.dart'
    hide Icons, Icon, IconTheme, IconThemeData;

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

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.red),
        useMaterial3: true,
      ),
      home: const Home(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Flutter SVG Packer Example'),
      ),
      body: SingleChildScrollView(
        child: Wrap(
          children: [
            for (final color in [null, Colors.blue, Colors.red])
              for (final icon in Icons.values)
                Icon(
                  icon,
                  color: color, // Simple color filter
                  height: 64,
                ),
            Icon(
              Icons.dominos,
              height: 64,
              theme: IconThemeData(
                dominos: DominosStyle(
                  fill0: Colors.yellow,
                  fill1: Colors.pink,
                  fill2: Colors.purple,
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
0
likes
160
points
26
downloads

Publisher

unverified uploader

Weekly Downloads

Optimized and dynamic vector graphics for Flutter.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

args, path, recase, vector_graphics_codec, vector_graphics_compiler

More

Packages that depend on svg_packer