File movement and adding assertions

master
lmy 5 years ago
parent 7e51359d15
commit 7b0c3c9e40

@ -1,18 +1,18 @@
library flutter_icons;
export 'ionicons.dart';
export 'ant_design.dart';
export 'font_awesome.dart';
export 'material_icons.dart';
export 'entypo.dart';
export 'evil_icons.dart';
export 'feather.dart';
export 'material_community_icons.dart';
export 'octicons.dart';
export 'simple_line_icons.dart';
export 'zocial.dart';
export 'foundation.dart';
export 'font_awesome_5.dart';
export 'flutter_icon_data.dart' show IconWeight;
export 'icon_toggle.dart';
export 'weather_icons.dart';
export 'src/ionicons.dart';
export 'src/ant_design.dart';
export 'src/font_awesome.dart';
export 'src/material_icons.dart';
export 'src/entypo.dart';
export 'src/evil_icons.dart';
export 'src/feather.dart';
export 'src/material_community_icons.dart';
export 'src/octicons.dart';
export 'src/simple_line_icons.dart';
export 'src/zocial.dart';
export 'src/foundation.dart';
export 'src/font_awesome_5.dart';
export 'src/flutter_icon_data.dart' show IconWeight;
export 'src/icon_toggle.dart';
export 'src/weather_icons.dart';

@ -1,6 +1,11 @@
import 'flutter_icon_data.dart';
class AntDesign {
static getIconData(iconName) {
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the AntDesign",
);
return FlutterIconData.antDesign(_antDesign[iconName]);
}
@ -9,8 +14,6 @@ class AntDesign {
static const glyphMaps = _antDesign;
}
const Map<String, int> _antDesign = {
"stepforward": 58880,
"stepbackward": 58881,

@ -2,6 +2,10 @@ import 'flutter_icon_data.dart';
class Entypo {
static getIconData(String iconName) {
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the Entypo",
);
return FlutterIconData.entypo(_entypo[iconName]);
}

@ -2,6 +2,10 @@ import 'flutter_icon_data.dart';
class EvilIcons {
static getIconData(String iconName) {
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the EvilIcons",
);
return FlutterIconData.evilIcons(_evilIcons[iconName]);
}
@ -9,6 +13,7 @@ class EvilIcons {
static const glyphMaps = _evilIcons;
}
const Map<String, int> _evilIcons = {
"archive": 61696,
"arrow-down": 61697,

@ -2,6 +2,10 @@ import 'flutter_icon_data.dart';
class Feather {
static getIconData(String iconName) {
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the Feather",
);
return FlutterIconData.feather(_feather[iconName]);
}
@ -9,6 +13,7 @@ class Feather {
static const glyphMaps = _feather;
}
const Map<String, int> _feather = {
"activity": 59648,
"airplay": 59649,

@ -2,6 +2,10 @@ import 'flutter_icon_data.dart';
class FontAwesome {
static getIconData(iconName) {
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the FontAwesome",
);
return FlutterIconData.fontAwesome(_fontAwesome[iconName]);
}
@ -9,6 +13,7 @@ class FontAwesome {
static const glyphMaps = _fontAwesome;
}
const Map<String, int> _fontAwesome = {
"glass": 61440,
"music": 61441,

@ -1,7 +1,11 @@
import 'flutter_icon_data.dart';
class FontAwesome5 {
static getIconData(iconName, {IconWeight weight}) {
static getIconData(iconName, {IconWeight weight = IconWeight.Regular}) {
assert(
hasIconData(iconName, weight: weight),
"The icon $iconName does not exist in the FontAwesome5($weight)",
);
return FlutterIconData.fontAwesome5(_fontAwesome5[iconName],
weight: weight);
}

@ -2,6 +2,10 @@ import 'flutter_icon_data.dart';
class Foundation {
static getIconData(String iconName) {
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the Foundation",
);
return FlutterIconData.foundation(_foundation[iconName]);
}
@ -9,6 +13,7 @@ class Foundation {
static const glyphMaps = _foundation;
}
const Map<String, int> _foundation = {
"address-book": 61696,
"alert": 61697,

@ -1,8 +1,11 @@
import 'flutter_icon_data.dart';
import 'package:flutter/material.dart';
class Ionicons{
class Ionicons {
static getIconData(String iconName) {
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the Ionicons",
);
return FlutterIconData.ionicons(_ionicons[iconName]);
}
@ -11,7 +14,6 @@ class Ionicons{
static const glyphMaps = _ionicons;
}
const Map<String, int> _ionicons = const {
"ios-add": 61698,
"ios-add-circle": 61697,

@ -2,13 +2,19 @@ import 'flutter_icon_data.dart';
class MaterialCommunityIcons {
static getIconData(String iconName) {
return FlutterIconData.materialCommunityIcons(_materialCommunityIcons[iconName]);
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the MaterialCommunityIcons",
);
return FlutterIconData.materialCommunityIcons(
_materialCommunityIcons[iconName]);
}
static hasIconData(iconName) => _materialCommunityIcons.containsKey(iconName);
static const glyphMaps = _materialCommunityIcons;
}
const Map<String, int> _materialCommunityIcons = {
"ab-testing": 983068,
"access-point": 61442,

@ -1,13 +1,19 @@
import 'flutter_icon_data.dart';
class MaterialIcons {
static getIconData(String iconName) {
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the MaterialIcons",
);
return FlutterIconData.materialIcons(_materialIcons[iconName]);
}
static hasIconData(iconName) => _materialIcons.containsKey(iconName);
static const glyphMaps = _materialIcons;
}
const Map<String, int> _materialIcons = {
"3d-rotation": 59469,
"ac-unit": 60219,

@ -2,6 +2,10 @@ import 'flutter_icon_data.dart';
class Octicons {
static getIconData(String iconName) {
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the Octicons",
);
return FlutterIconData.octicons(_octicons[iconName]);
}
@ -9,6 +13,7 @@ class Octicons {
static const glyphMaps = _octicons;
}
const Map<String, int> _octicons = {
"alert": 61696,
"archive": 61697,

@ -2,6 +2,10 @@ import 'flutter_icon_data.dart';
class SimpleLineIcons {
static getIconData(String iconName) {
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the SimpleLineIcons",
);
return FlutterIconData.simpleLineIcons(_simpleLineIcons[iconName]);
}
@ -9,6 +13,7 @@ class SimpleLineIcons {
static const glyphMaps = _simpleLineIcons;
}
const Map<String, int> _simpleLineIcons = {
"user": 57349,
"people": 57345,

@ -2,6 +2,10 @@ import 'flutter_icon_data.dart';
class WeatherIcons {
static getIconData(String iconName) {
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the WeatherIcons",
);
return FlutterIconData.weatherIcons(_weatherIcons[iconName]);
}

@ -1,6 +1,11 @@
import 'flutter_icon_data.dart';
class Zocial {
static getIconData(String iconName) {
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the Zocial",
);
return FlutterIconData.zocial(_zocial[iconName]);
}
@ -8,6 +13,7 @@ class Zocial {
static const glyphMaps = _zocial;
}
const Map<String, int> _zocial = {
"acrobat": 61696,
"amazon": 61697,
Loading…
Cancel
Save