svg_to_font 1.0.2 copy "svg_to_font: ^1.0.2" to clipboard
svg_to_font: ^1.0.2 copied to clipboard

A tool for converting svg files to a font. To facilitate developers to quickly generate icon font (.ttf) and Flutter icon class, We developed the svg_to_font library.

example/lib/main.dart

import 'package:flutter/material.dart';

import './camus_icons.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({
    required this.title,
    Key? key,
  }) : super(key: key);

  final String title;

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

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

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text(
              'You have pushed the button this many times:',
            ),
            const Icon(
              CamusIcons.test,
              size: 30,
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: const Icon(Icons.add),
      ),
    );
  }
}
5
likes
160
pub points
26%
popularity

Publisher

verified publishercamus.design

A tool for converting svg files to a font. To facilitate developers to quickly generate icon font (.ttf) and Flutter icon class, We developed the svg_to_font library.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

args, code_builder, dart_style, io, path, recase

More

Packages that depend on svg_to_font