Skip to content

Commit 7b0c3c9

Browse files
committed
File movement and adding assertions
1 parent 7e51359 commit 7b0c3c9

17 files changed

+134
-69
lines changed

lib/flutter_icons.dart

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
library flutter_icons;
22

3-
export 'ionicons.dart';
4-
export 'ant_design.dart';
5-
export 'font_awesome.dart';
6-
export 'material_icons.dart';
7-
export 'entypo.dart';
8-
export 'evil_icons.dart';
9-
export 'feather.dart';
10-
export 'material_community_icons.dart';
11-
export 'octicons.dart';
12-
export 'simple_line_icons.dart';
13-
export 'zocial.dart';
14-
export 'foundation.dart';
15-
export 'font_awesome_5.dart';
16-
export 'flutter_icon_data.dart' show IconWeight;
17-
export 'icon_toggle.dart';
18-
export 'weather_icons.dart';
3+
export 'src/ionicons.dart';
4+
export 'src/ant_design.dart';
5+
export 'src/font_awesome.dart';
6+
export 'src/material_icons.dart';
7+
export 'src/entypo.dart';
8+
export 'src/evil_icons.dart';
9+
export 'src/feather.dart';
10+
export 'src/material_community_icons.dart';
11+
export 'src/octicons.dart';
12+
export 'src/simple_line_icons.dart';
13+
export 'src/zocial.dart';
14+
export 'src/foundation.dart';
15+
export 'src/font_awesome_5.dart';
16+
export 'src/flutter_icon_data.dart' show IconWeight;
17+
export 'src/icon_toggle.dart';
18+
export 'src/weather_icons.dart';

lib/ant_design.dart renamed to lib/src/ant_design.dart

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
import 'flutter_icon_data.dart';
2+
23
class AntDesign {
3-
static getIconData(iconName){
4+
static getIconData(iconName) {
5+
assert(
6+
hasIconData(iconName),
7+
"The icon $iconName does not exist in the AntDesign",
8+
);
49
return FlutterIconData.antDesign(_antDesign[iconName]);
510
}
611

7-
static hasIconData(iconName)=>_antDesign.containsKey(iconName);
12+
static hasIconData(iconName) => _antDesign.containsKey(iconName);
813

914
static const glyphMaps = _antDesign;
1015
}
1116

12-
13-
14-
const Map<String,int> _antDesign ={
17+
const Map<String, int> _antDesign = {
1518
"stepforward": 58880,
1619
"stepbackward": 58881,
1720
"forward": 58882,
@@ -310,4 +313,4 @@ const Map<String,int> _antDesign ={
310313
"yuque": 59148,
311314
"slack": 59141,
312315
"slack-square": 59142
313-
};
316+
};

lib/entypo.dart renamed to lib/src/entypo.dart

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
import 'flutter_icon_data.dart';
22

33
class Entypo {
4-
static getIconData(String iconName){
4+
static getIconData(String iconName) {
5+
assert(
6+
hasIconData(iconName),
7+
"The icon $iconName does not exist in the Entypo",
8+
);
59
return FlutterIconData.entypo(_entypo[iconName]);
610
}
711

8-
static hasIconData(iconName)=>_entypo.containsKey(iconName);
12+
static hasIconData(iconName) => _entypo.containsKey(iconName);
913

1014
static const glyphMaps = _entypo;
1115
}
1216

13-
const Map<String,int> _entypo ={
17+
const Map<String, int> _entypo = {
1418
"500px": 61696,
1519
"500px-with-circle": 61697,
1620
"add-to-list": 61698,
@@ -422,4 +426,4 @@ const Map<String,int> _entypo ={
422426
"youko-with-circle": 62104,
423427
"youtube": 62105,
424428
"youtube-with-circle": 62106
425-
};
429+
};

lib/evil_icons.dart renamed to lib/src/evil_icons.dart

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
import 'flutter_icon_data.dart';
22

33
class EvilIcons {
4-
static getIconData(String iconName){
4+
static getIconData(String iconName) {
5+
assert(
6+
hasIconData(iconName),
7+
"The icon $iconName does not exist in the EvilIcons",
8+
);
59
return FlutterIconData.evilIcons(_evilIcons[iconName]);
610
}
711

8-
static hasIconData(iconName)=>_evilIcons.containsKey(iconName);
12+
static hasIconData(iconName) => _evilIcons.containsKey(iconName);
913

1014
static const glyphMaps = _evilIcons;
1115
}
16+
1217
const Map<String, int> _evilIcons = {
1318
"archive": 61696,
1419
"arrow-down": 61697,
@@ -80,4 +85,4 @@ const Map<String, int> _evilIcons = {
8085
"undo": 61763,
8186
"unlock": 61764,
8287
"user": 61765
83-
};
88+
};

lib/feather.dart renamed to lib/src/feather.dart

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
import 'flutter_icon_data.dart';
22

33
class Feather {
4-
static getIconData(String iconName){
4+
static getIconData(String iconName) {
5+
assert(
6+
hasIconData(iconName),
7+
"The icon $iconName does not exist in the Feather",
8+
);
59
return FlutterIconData.feather(_feather[iconName]);
610
}
711

8-
static hasIconData(iconName)=>_feather.containsKey(iconName);
12+
static hasIconData(iconName) => _feather.containsKey(iconName);
913

1014
static const glyphMaps = _feather;
1115
}
12-
const Map<String,int> _feather ={
16+
17+
const Map<String, int> _feather = {
1318
"activity": 59648,
1419
"airplay": 59649,
1520
"alert-circle": 59650,
@@ -276,4 +281,4 @@ const Map<String,int> _feather ={
276281
"zap-off": 59911,
277282
"zoom-in": 59912,
278283
"zoom-out": 59913
279-
};
284+
};
File renamed without changes.

lib/font_awesome.dart renamed to lib/src/font_awesome.dart

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
import 'flutter_icon_data.dart';
22

33
class FontAwesome {
4-
static getIconData(iconName){
4+
static getIconData(iconName) {
5+
assert(
6+
hasIconData(iconName),
7+
"The icon $iconName does not exist in the FontAwesome",
8+
);
59
return FlutterIconData.fontAwesome(_fontAwesome[iconName]);
610
}
711

8-
static hasIconData(iconName)=>_fontAwesome.containsKey(iconName);
12+
static hasIconData(iconName) => _fontAwesome.containsKey(iconName);
913

1014
static const glyphMaps = _fontAwesome;
1115
}
12-
const Map<String ,int> _fontAwesome = {
16+
17+
const Map<String, int> _fontAwesome = {
1318
"glass": 61440,
1419
"music": 61441,
1520
"search": 61442,
@@ -796,4 +801,4 @@ const Map<String ,int> _fontAwesome = {
796801
"superpowers": 62173,
797802
"wpexplorer": 62174,
798803
"meetup": 62176
799-
};
804+
};

lib/font_awesome_5.dart renamed to lib/src/font_awesome_5.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import 'flutter_icon_data.dart';
22

33
class FontAwesome5 {
4-
static getIconData(iconName, {IconWeight weight}) {
4+
static getIconData(iconName, {IconWeight weight = IconWeight.Regular}) {
5+
assert(
6+
hasIconData(iconName, weight: weight),
7+
"The icon $iconName does not exist in the FontAwesome5($weight)",
8+
);
59
return FlutterIconData.fontAwesome5(_fontAwesome5[iconName],
610
weight: weight);
711
}

lib/foundation.dart renamed to lib/src/foundation.dart

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
import 'flutter_icon_data.dart';
22

33
class Foundation {
4-
static getIconData(String iconName){
4+
static getIconData(String iconName) {
5+
assert(
6+
hasIconData(iconName),
7+
"The icon $iconName does not exist in the Foundation",
8+
);
59
return FlutterIconData.foundation(_foundation[iconName]);
610
}
711

8-
static hasIconData(iconName)=>_foundation.containsKey(iconName);
12+
static hasIconData(iconName) => _foundation.containsKey(iconName);
913

1014
static const glyphMaps = _foundation;
1115
}
12-
const Map<String,int> _foundation = {
16+
17+
const Map<String, int> _foundation = {
1318
"address-book": 61696,
1419
"alert": 61697,
1520
"align-center": 61698,
@@ -293,4 +298,4 @@ const Map<String,int> _foundation = {
293298
"yen": 61976,
294299
"zoom-in": 61977,
295300
"zoom-out": 61978
296-
};
301+
};
File renamed without changes.

0 commit comments

Comments
 (0)