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

outdated

Typicons pack with the code to support flutter, easy use, beautifully.

example/main.dart

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Typicons',
      theme: ThemeData(
        primarySwatch: Colors.lightBlue,
      ),
      debugShowCheckedModeBanner: false,
      home: MyHomePage(title: 'Typicons'),
    );
  }
}

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

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(_) {
    return Scaffold(
      appBar: AppBar(
        title: Center(
          child: Text(
            widget.title,
            style: TextStyle(
              color: Colors.white
            ),
          ),
        ),
      ),
      body: Center(
        child: Row(
          mainAxisAlignment: MainAxisAlignment.center,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: <Widget>[
            Column(
              mainAxisAlignment: MainAxisAlignment.center,
              crossAxisAlignment: CrossAxisAlignment.start,
              children: <Widget>[
                _createIcon(Typicons.social_github, 'Github icon',),
                _createIcon(Typicons.social_instagram, 'Instagram icon'),
                _createIcon(Typicons.plus, 'Plus icon'),
                _createIcon(Typicons.stopwatch, 'Stopwatch icon'),
                _createIcon(Typicons.star, 'Star icon'),
                _createIcon(Typicons.radar_outline, 'Radar outline icon'),
              ],
            ),
            Column(
              mainAxisAlignment: MainAxisAlignment.center,
              crossAxisAlignment: CrossAxisAlignment.start,
              children: <Widget>[
                _createIcon(Typicons.social_facebook, 'Facebook icon'),
                _createIcon(Typicons.social_twitter, 'Twitter icon'),
                _createIcon(Typicons.battery_full, 'Battery full icon'),
                _createIcon(Typicons.refresh_outline, 'Refesh icon'),
                _createIcon(Typicons.social_youtube, 'Youtube icon'),
                _createIcon(Typicons.support, 'Support icon'),
              ],
            ),
          ],
        ),
      ),
    );
  }

  Widget _createIcon(IconData iconData, String name, {Color iconColor = Colors.blueAccent}) {
    return Row(
      children: <Widget>[
        IconButton(
          icon: Icon(iconData),
          iconSize: 35,
          color: iconColor,
          onPressed: () {
            print(name);
          },
        ),
        Text(name,
         style: TextStyle(
            color: iconColor,
            fontWeight: FontWeight.bold,
            fontSize: 14
          ),
        ),
      ],
    );
  }
}
15
likes
0
pub points
90%
popularity

Publisher

verified publisheruit.social

Typicons pack with the code to support flutter, easy use, beautifully.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on typicons_flutter