add getIcon method

master
黎明 6 years ago
parent eca4a24f39
commit e0216a47ce

@ -1,12 +1,12 @@
import 'flutter_icon_data.dart'; import 'flutter_icon_data.dart';
import 'package:flutter/material.dart';
class AntDesign { class AntDesign {
static const IconData stepForward = const FlutterIconData.antDesign(58880); static getIcon(iconName){
static const IconData stepBackward = const FlutterIconData.antDesign(58881); return FlutterIconData.antDesign(_antDesign[iconName]);
}
} }
final Map<String,int> ant_design ={ final Map<String,int> _antDesign ={
"stepforward": 58880, "stepforward": 58880,
"stepbackward": 58881, "stepbackward": 58881,
"forward": 58882, "forward": 58882,

@ -1,12 +1,9 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'flutter_icon_data.dart'; import 'flutter_icon_data.dart';
class Ionicons { class Ionicons {
static const IconData ios_Add = const FlutterIconData.ionicons(61698); static getIcon(String iconName){
static const IconData ios_add_circle = const FlutterIconData.ionicons(61697); return FlutterIconData.ionicons(_ionicons[iconName]);
static const IconData ios_add_circle_outline = const FlutterIconData.ionicons(61696); }
static const IconData ios_airplane = const FlutterIconData.ionicons(61751);
static const IconData ios_alarm = const FlutterIconData.ionicons(62408);
static const IconData ios_search = const FlutterIconData.ionicons(62629);
} }
final Map<String, int> _ionicons = const { final Map<String, int> _ionicons = const {

Loading…
Cancel
Save