File movement and adding assertions

master
lmy 5 years ago
parent 7e51359d15
commit 7b0c3c9e40

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

@ -1,17 +1,20 @@
import 'flutter_icon_data.dart'; import 'flutter_icon_data.dart';
class AntDesign { class AntDesign {
static getIconData(iconName){ static getIconData(iconName) {
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the AntDesign",
);
return FlutterIconData.antDesign(_antDesign[iconName]); return FlutterIconData.antDesign(_antDesign[iconName]);
} }
static hasIconData(iconName)=>_antDesign.containsKey(iconName); static hasIconData(iconName) => _antDesign.containsKey(iconName);
static const glyphMaps = _antDesign; static const glyphMaps = _antDesign;
} }
const Map<String, int> _antDesign = {
const Map<String,int> _antDesign ={
"stepforward": 58880, "stepforward": 58880,
"stepbackward": 58881, "stepbackward": 58881,
"forward": 58882, "forward": 58882,
@ -310,4 +313,4 @@ const Map<String,int> _antDesign ={
"yuque": 59148, "yuque": 59148,
"slack": 59141, "slack": 59141,
"slack-square": 59142 "slack-square": 59142
}; };

@ -1,16 +1,20 @@
import 'flutter_icon_data.dart'; import 'flutter_icon_data.dart';
class Entypo { class Entypo {
static getIconData(String iconName){ static getIconData(String iconName) {
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the Entypo",
);
return FlutterIconData.entypo(_entypo[iconName]); return FlutterIconData.entypo(_entypo[iconName]);
} }
static hasIconData(iconName)=>_entypo.containsKey(iconName); static hasIconData(iconName) => _entypo.containsKey(iconName);
static const glyphMaps = _entypo; static const glyphMaps = _entypo;
} }
const Map<String,int> _entypo ={ const Map<String, int> _entypo = {
"500px": 61696, "500px": 61696,
"500px-with-circle": 61697, "500px-with-circle": 61697,
"add-to-list": 61698, "add-to-list": 61698,
@ -422,4 +426,4 @@ const Map<String,int> _entypo ={
"youko-with-circle": 62104, "youko-with-circle": 62104,
"youtube": 62105, "youtube": 62105,
"youtube-with-circle": 62106 "youtube-with-circle": 62106
}; };

@ -1,14 +1,19 @@
import 'flutter_icon_data.dart'; import 'flutter_icon_data.dart';
class EvilIcons { class EvilIcons {
static getIconData(String iconName){ static getIconData(String iconName) {
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the EvilIcons",
);
return FlutterIconData.evilIcons(_evilIcons[iconName]); return FlutterIconData.evilIcons(_evilIcons[iconName]);
} }
static hasIconData(iconName)=>_evilIcons.containsKey(iconName); static hasIconData(iconName) => _evilIcons.containsKey(iconName);
static const glyphMaps = _evilIcons; static const glyphMaps = _evilIcons;
} }
const Map<String, int> _evilIcons = { const Map<String, int> _evilIcons = {
"archive": 61696, "archive": 61696,
"arrow-down": 61697, "arrow-down": 61697,
@ -80,4 +85,4 @@ const Map<String, int> _evilIcons = {
"undo": 61763, "undo": 61763,
"unlock": 61764, "unlock": 61764,
"user": 61765 "user": 61765
}; };

@ -1,15 +1,20 @@
import 'flutter_icon_data.dart'; import 'flutter_icon_data.dart';
class Feather { class Feather {
static getIconData(String iconName){ static getIconData(String iconName) {
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the Feather",
);
return FlutterIconData.feather(_feather[iconName]); return FlutterIconData.feather(_feather[iconName]);
} }
static hasIconData(iconName)=>_feather.containsKey(iconName); static hasIconData(iconName) => _feather.containsKey(iconName);
static const glyphMaps = _feather; static const glyphMaps = _feather;
} }
const Map<String,int> _feather ={
const Map<String, int> _feather = {
"activity": 59648, "activity": 59648,
"airplay": 59649, "airplay": 59649,
"alert-circle": 59650, "alert-circle": 59650,
@ -276,4 +281,4 @@ const Map<String,int> _feather ={
"zap-off": 59911, "zap-off": 59911,
"zoom-in": 59912, "zoom-in": 59912,
"zoom-out": 59913 "zoom-out": 59913
}; };

@ -1,15 +1,20 @@
import 'flutter_icon_data.dart'; import 'flutter_icon_data.dart';
class FontAwesome { class FontAwesome {
static getIconData(iconName){ static getIconData(iconName) {
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the FontAwesome",
);
return FlutterIconData.fontAwesome(_fontAwesome[iconName]); return FlutterIconData.fontAwesome(_fontAwesome[iconName]);
} }
static hasIconData(iconName)=>_fontAwesome.containsKey(iconName); static hasIconData(iconName) => _fontAwesome.containsKey(iconName);
static const glyphMaps = _fontAwesome; static const glyphMaps = _fontAwesome;
} }
const Map<String ,int> _fontAwesome = {
const Map<String, int> _fontAwesome = {
"glass": 61440, "glass": 61440,
"music": 61441, "music": 61441,
"search": 61442, "search": 61442,
@ -796,4 +801,4 @@ const Map<String ,int> _fontAwesome = {
"superpowers": 62173, "superpowers": 62173,
"wpexplorer": 62174, "wpexplorer": 62174,
"meetup": 62176 "meetup": 62176
}; };

@ -1,7 +1,11 @@
import 'flutter_icon_data.dart'; import 'flutter_icon_data.dart';
class FontAwesome5 { 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], return FlutterIconData.fontAwesome5(_fontAwesome5[iconName],
weight: weight); weight: weight);
} }

@ -1,15 +1,20 @@
import 'flutter_icon_data.dart'; import 'flutter_icon_data.dart';
class Foundation { class Foundation {
static getIconData(String iconName){ static getIconData(String iconName) {
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the Foundation",
);
return FlutterIconData.foundation(_foundation[iconName]); return FlutterIconData.foundation(_foundation[iconName]);
} }
static hasIconData(iconName)=>_foundation.containsKey(iconName); static hasIconData(iconName) => _foundation.containsKey(iconName);
static const glyphMaps = _foundation; static const glyphMaps = _foundation;
} }
const Map<String,int> _foundation = {
const Map<String, int> _foundation = {
"address-book": 61696, "address-book": 61696,
"alert": 61697, "alert": 61697,
"align-center": 61698, "align-center": 61698,
@ -293,4 +298,4 @@ const Map<String,int> _foundation = {
"yen": 61976, "yen": 61976,
"zoom-in": 61977, "zoom-in": 61977,
"zoom-out": 61978 "zoom-out": 61978
}; };

@ -1,17 +1,19 @@
import 'flutter_icon_data.dart'; import 'flutter_icon_data.dart';
import 'package:flutter/material.dart';
class Ionicons{
class Ionicons {
static getIconData(String iconName) { static getIconData(String iconName) {
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the Ionicons",
);
return FlutterIconData.ionicons(_ionicons[iconName]); return FlutterIconData.ionicons(_ionicons[iconName]);
} }
static hasIconData(iconName)=>_ionicons.containsKey(iconName); static hasIconData(iconName) => _ionicons.containsKey(iconName);
static const glyphMaps = _ionicons; static const glyphMaps = _ionicons;
} }
const Map<String, int> _ionicons = const { const Map<String, int> _ionicons = const {
"ios-add": 61698, "ios-add": 61698,
"ios-add-circle": 61697, "ios-add-circle": 61697,
@ -709,4 +711,4 @@ const Map<String, int> _ionicons = const {
"md-wifi": 62376, "md-wifi": 62376,
"md-wine": 62377, "md-wine": 62377,
"md-woman": 62378 "md-woman": 62378
}; };

@ -1,15 +1,21 @@
import 'flutter_icon_data.dart'; import 'flutter_icon_data.dart';
class MaterialCommunityIcons { class MaterialCommunityIcons {
static getIconData(String iconName){ 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 hasIconData(iconName) => _materialCommunityIcons.containsKey(iconName);
static const glyphMaps = _materialCommunityIcons; static const glyphMaps = _materialCommunityIcons;
} }
const Map<String,int> _materialCommunityIcons = {
const Map<String, int> _materialCommunityIcons = {
"ab-testing": 983068, "ab-testing": 983068,
"access-point": 61442, "access-point": 61442,
"access-point-network": 61443, "access-point-network": 61443,
@ -4107,4 +4113,4 @@ const Map<String,int> _materialCommunityIcons = {
"zodiac-taurus": 64134, "zodiac-taurus": 64134,
"zodiac-virgo": 64135, "zodiac-virgo": 64135,
"blank": 63116 "blank": 63116
}; };

@ -1,14 +1,20 @@
import 'flutter_icon_data.dart'; import 'flutter_icon_data.dart';
class MaterialIcons { class MaterialIcons {
static getIconData(String iconName){ static getIconData(String iconName) {
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the MaterialIcons",
);
return FlutterIconData.materialIcons(_materialIcons[iconName]); return FlutterIconData.materialIcons(_materialIcons[iconName]);
} }
static hasIconData(iconName)=>_materialIcons.containsKey(iconName);
static const glyphMaps = _materialIcons; static hasIconData(iconName) => _materialIcons.containsKey(iconName);
static const glyphMaps = _materialIcons;
} }
const Map<String,int> _materialIcons = {
const Map<String, int> _materialIcons = {
"3d-rotation": 59469, "3d-rotation": 59469,
"ac-unit": 60219, "ac-unit": 60219,
"access-alarm": 57744, "access-alarm": 57744,
@ -941,4 +947,4 @@ const Map<String,int> _materialIcons = {
"zoom-in": 59647, "zoom-in": 59647,
"zoom-out": 59648, "zoom-out": 59648,
"zoom-out-map": 58731 "zoom-out-map": 58731
}; };

@ -1,15 +1,20 @@
import 'flutter_icon_data.dart'; import 'flutter_icon_data.dart';
class Octicons { class Octicons {
static getIconData(String iconName){ static getIconData(String iconName) {
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the Octicons",
);
return FlutterIconData.octicons(_octicons[iconName]); return FlutterIconData.octicons(_octicons[iconName]);
} }
static hasIconData(iconName)=>_octicons.containsKey(iconName); static hasIconData(iconName) => _octicons.containsKey(iconName);
static const glyphMaps = _octicons; static const glyphMaps = _octicons;
} }
const Map<String,int> _octicons ={
const Map<String, int> _octicons = {
"alert": 61696, "alert": 61696,
"archive": 61697, "archive": 61697,
"arrow-down": 61698, "arrow-down": 61698,
@ -187,4 +192,4 @@ const Map<String,int> _octicons ={
"watch": 61870, "watch": 61870,
"x": 61871, "x": 61871,
"zap": 61872 "zap": 61872
}; };

@ -1,15 +1,20 @@
import 'flutter_icon_data.dart'; import 'flutter_icon_data.dart';
class SimpleLineIcons { class SimpleLineIcons {
static getIconData(String iconName){ static getIconData(String iconName) {
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the SimpleLineIcons",
);
return FlutterIconData.simpleLineIcons(_simpleLineIcons[iconName]); return FlutterIconData.simpleLineIcons(_simpleLineIcons[iconName]);
} }
static hasIconData(iconName)=>_simpleLineIcons.containsKey(iconName); static hasIconData(iconName) => _simpleLineIcons.containsKey(iconName);
static const glyphMaps = _simpleLineIcons; static const glyphMaps = _simpleLineIcons;
} }
const Map<String,int> _simpleLineIcons = {
const Map<String, int> _simpleLineIcons = {
"user": 57349, "user": 57349,
"people": 57345, "people": 57345,
"user-female": 57344, "user-female": 57344,
@ -199,4 +204,4 @@ const Map<String,int> _simpleLineIcons = {
"social-dropbox": 57356, "social-dropbox": 57356,
"social-vkontakte": 58904, "social-vkontakte": 58904,
"social-steam": 58912 "social-steam": 58912
}; };

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

@ -1,14 +1,20 @@
import 'flutter_icon_data.dart'; import 'flutter_icon_data.dart';
class Zocial { class Zocial {
static getIconData(String iconName){ static getIconData(String iconName) {
assert(
hasIconData(iconName),
"The icon $iconName does not exist in the Zocial",
);
return FlutterIconData.zocial(_zocial[iconName]); return FlutterIconData.zocial(_zocial[iconName]);
} }
static hasIconData(iconName)=>_zocial.containsKey(iconName); static hasIconData(iconName) => _zocial.containsKey(iconName);
static const glyphMaps = _zocial; static const glyphMaps = _zocial;
} }
const Map<String,int> _zocial = {
const Map<String, int> _zocial = {
"acrobat": 61696, "acrobat": 61696,
"amazon": 61697, "amazon": 61697,
"android": 61698, "android": 61698,
@ -109,4 +115,4 @@ const Map<String,int> _zocial = {
"ycombinator": 61793, "ycombinator": 61793,
"yelp": 61794, "yelp": 61794,
"youtube": 61795 "youtube": 61795
}; };
Loading…
Cancel
Save