flutter_icons
customizable icons for flutter,inspired by react-native-vector-ico,ns.
usage
to use this plugin, add flutter_ic,ons
as a dependency in your pubspec.yaml file.
widget
icontoggle
prop | description |
---|---|
selectedicondata | icon is displayed when value is true |
unselectedicondata | icon is displayed when value is false |
activecolor | when value is true, the icon color is displayed |
inactivecolor | when value is false, the icon color is displayed |
value | whether this icontoggle is selected. |
onchanged | called when the value of the icontoggle should change. |
duration | the duration of the transition from selected icon to unselected icon |
reverseduration | he duration of the transition from unselected icon to selected icon |
transitionbuilder | transition animation function between the selected icon and the unselected icon |
static methods
prop | description |
---|---|
geticondata |
returns the icondata object,eg : icondata icondata = antdesign.geticondata("stepforward") |
hasicondata |
checks if the name is valid in current icon set.eg: bool isnamevalid = antdesign.hasicondata("stepforward") |
iconexplorer
try to run the example
project or download apk, there you can also search for any icon.
example
// import package
import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter/material.dart';
icon(ionic,ons.geticondata("ios-search"));
icon(antdesign.geticondata("stepforward"));
icon(fontawesome.geticondata("glass"));
icon(materialic,ons.geticondata("ac-unit"));
icon(fontawesome5.geticondata("address-book"));
icon(fontawesome5.geticondata("address-book",weight: iconweight.solid));
icon(fontawesome5.geticondata("500px", weight: iconweight.brand));
Comments are closed.