responsive_svg_icons 0.0.1 copy "responsive_svg_icons: ^0.0.1" to clipboard
responsive_svg_icons: ^0.0.1 copied to clipboard

A wrapping of responsive icons (.svg files), to be used with flutter_svg_icons package.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_svg_icons/flutter_svg_icons.dart';
import 'package:responsive_svg_icons/responsive_svg_icons.dart';

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

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Resoponsive Svg Icons',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Resoponsive Svg Icons'),
    );
  }
}

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

  final String title;

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

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            SvgIcon(
              size: 30,
              icon: ResponsiveSvgIcons.battery,
            ),
            SvgIcon(
              size: 100,
              icon: ResponsiveSvgIcons.battery,
            ),
            SvgIcon(
              size: 200,
              icon: ResponsiveSvgIcons.battery,
            ),
            // IconTheme(
            //     data: const IconThemeData(size: 250),
            //     child: SvgIcon(icon: ResponsiveSvgIcons.cart)),
          ],
        ),
      ),
    );
  }
}
1
likes
130
pub points
0%
popularity

Publisher

verified publisherquds.cc

A wrapping of responsive icons (.svg files), to be used with flutter_svg_icons package.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, flutter_svg_icons

More

Packages that depend on responsive_svg_icons