outline_material_icons 0.1.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • new75

outline_material_icons

This package provides the 'outline' theme of icons on the Material Design website, which is not available in Flutter or as a .ttf font file.

Example

These icons were downloaded in September 2018, they may be updated in the future.

Usage

Add the package to pubspec.yaml and use the OMIcons class.

  Widget build(BuildContext context) => Icon(OMIcons.sentimentSatisfied);

Browse available icons using the example app or the Material Design icons website above.

There is a Map<String, int> of snake_case icon names to codepoints if you want to list all the icons. See the example app code for how. Using the OMIcons class directly is preferable in most cases.

Changes and omissions

All 'partly filled' icons are removed due to single colour restriction for .ttf fonts. This includes partly-filled battery icons and not-full-strength wifi/reception icons.

Icons with an underline have had the line made solid: border_color, format_color_fill and format_color_text.

These icons were renamed to avoid Dart errors/clashes: 360 -> icon360, class -> classIcon, sync -> syncIcon

Getting Started

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

[0.1.0] - 13/09/2018

  • Fixed docs, added screenshot

[0.0.1] - 13/09/2018

  • Initial release.

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'outline_material_icons example',
      home: MyHomePage(title: 'outline_material_icons example'),
    );
  }
}

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

  final String title;

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

class _MyHomePageState extends State<MyHomePage> {
  String selectedName;
  IconData selectedIcon;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Column(
        children: <Widget>[
          Padding(
            padding: const EdgeInsets.all(16.0),
            child: Row(
              children: <Widget>[
                selectedIcon != null ? Icon(selectedIcon, size: 48.0) : Container(),
                Flexible(child: Text(
                  selectedName ?? "Select an icon",
                  style: Theme.of(context).textTheme.subhead,
                  overflow: TextOverflow.ellipsis,
                )),
              ],
            ),
          ),
          Flexible(
            child: GridView.builder(
              gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
                crossAxisCount: 6,
              ),
              itemCount: OMIcons.codePoints.length,
              itemBuilder: (context, index) => InkWell(
                onTap: () {
                  selectedName = OMIcons.codePoints.keys.toList()[index];
                  selectedIcon = IconData(OMIcons.codePoints[selectedName], fontFamily: 'outline_material_icons', fontPackage: 'outline_material_icons');
                  setState(() {});
                },
                child: Icon(IconData(OMIcons.codePoints.values.toList()[index], fontFamily: 'outline_material_icons', fontPackage: 'outline_material_icons')),
              ),
            ),
          ),
        ],
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  outline_material_icons: ^0.1.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:outline_material_icons/outline_material_icons.dart';
  
Version Uploaded Documentation Archive
0.1.0 Sep 13, 2018 Go to the documentation of outline_material_icons 0.1.0 Download outline_material_icons 0.1.0 archive
0.0.1 Sep 13, 2018 Go to the documentation of outline_material_icons 0.0.1 Download outline_material_icons 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
50
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
75
Learn more about scoring.

We analyzed this package on Sep 18, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.12.3
  • Flutter: 0.8.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Suggestions

Format lib/outline_material_icons.dart.

Run flutter format to format lib/outline_material_icons.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test