typicons_flutter 0.2.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 89

typicons_flutter #

Thanks to authors of Typicons

Flutter package for Typicons

Build Status GitHub Hits-of-Code

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

Usage #

See more icon at Typicons by Stephen Hutchings (336 icons)

import 'package:typicons_flutter/typicons_flutter.dart';

class User extends StatelessWidget {

    Widget build(_) {
        return _buildIconButton();
    }

    Widget _buildIconButton() {
        return IconButton(
            icon: Icon(Typicons.user) // icon user
        );//IconButton
    }
}

Contributors #

Vi Chi Thien
Vi Chi Thien

License #

This project is licenced under the MIT

Any bundled fonts are copyright to their respective authors under CC BY-SA and SIL Open Font Licence

Version 0.2.0 (05-05-2019) #

  • Update README

Version 0.2.0 (26-04-2019) #

  • Complete demo
  • Update README

Version 0.1.0 (26-04-2019) #

  • Create package

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
          ),
        ),
      ],
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  typicons_flutter: ^0.2.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:typicons_flutter/typicons_flutter.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
78
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
89
Learn more about scoring.

We analyzed this package on Oct 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-1 points)

343 out of 343 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/typicons_flutter.dart.

Run flutter format to format lib/typicons_flutter.dart.

Format lib/typicons_flutter_data.dart.

Run flutter format to format lib/typicons_flutter_data.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test