material_design_icons_flutter 3.4.4595

  • Readme
  • Changelog
  • Example
  • Installing
  • 96

material_design_icons_flutter #

The Material Design Icons Icon pack available as set of Flutter Icons.

Based on Material Design Icons 4.5.95

Installation #

In the dependencies: section of your pubspec.yaml, add the following line:

  material_design_icons_flutter: 3.4.4595

Usage #

import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';

class MyWidget extends StatelessWidget {
  Widget build(BuildContext context) {
    return new IconButton(
      // Use the MdiIcons class for the IconData
      icon: new Icon(MdiIcons.sword),
      onPressed: () { print('Using the sword'); }
     );
  }
}

Or, if you want to access the icon by a string name, you can use fromString method to create one.

This is not recomended because to make fromString work we need a map for all icon names. Using this method will not get the benifits of tree-shaking.

import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';

class MyWidget extends StatelessWidget {
  Widget build(BuildContext context) {
    return new IconButton(
      // Use the string name to access icons.
      icon: new Icon(MdiIcons.fromString('sword')),
      onPressed: () { print('Using the sword'); }
     );
  }
}

Name Conversion #

Some icons' name is reversed keyword in Dart (and most other languages), so the names have been changed.

  • null -> nullIcon
  • switch -> switchIcon
  • sync -> syncIcon
  • factory -> factoryIcon

3.4.4595 #

Added a getIconsName static method.

3.3.4595 #

Added ability to recognise dash style icon name.

3.2.3895 #

Added auto-update script which is wriiten in JavaScript.

3.2.3595 #

Added a fromString static method to access icon.

3.1.3493 #

Supports access icon by [] operator

3.0.3039 #

Since the Material Design Icons does not follow the semver. We decide not to respect its version.

You can find the correspounding version number as patch part.

2.3.50 #

From this version, this package will respect Material Design Icons' version since it might introduce breaking changes between minor versions.

1.0.0 #

  • First released

example/README.md

example #

A new Flutter project.

Getting Started #

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

Use this package as a library

1. Depend on it

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


dependencies:
  material_design_icons_flutter: ^3.4.4595

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:material_design_icons_flutter/material_design_icons_flutter.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
98
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
86
Overall:
Weighted score of the above. [more]
96
Learn more about scoring.

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

  • Dart: 2.6.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.6

Health suggestions

Format lib/material_design_icons_flutter.dart.

Run flutter format to format lib/material_design_icons_flutter.dart.

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Running dartdoc failed with the following output: FileSystemException: writeFrom failed, path = '/tmp/pub-dartlang-dartdocLITHRB/output/material_design_icons_flutter/3.4.4595/status.json' (OS Error: No space left on device, errno = 28)

#0      _RandomAccessFile.writeFrom.<anonymous closure> (dart:io/file_impl.dart:856:9)
#1      StackZoneSpecification._registerUnaryCallback.<anonymous closure>.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:129:26)
#2      StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
#3      StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:129:14)
#4      _rootRunUnary (dart:async/zone.dart:1132:38)
#5      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#6      _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#7      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#8      Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#9      Future._completeWithValue (dart:async/future_impl.dart:522:5)
#10     Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:552:7)
#11     StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
#12     StackZoneSpecification._registerCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:119:48)
#13     _rootRun (dart:async/zone.dart:1124:13)
#14     _CustomZone.run (dart:async/zone.dart:1021:19)
#15     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#16     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#17     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#18     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#19     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
#20     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)

The package description is too short. (-4 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

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