dynamic_icons 0.0.1
dynamic_icons: ^0.0.1 copied to clipboard
Insert Material Icon and FontAwesome icons dynamically in Flutter app when the icons are not known at compile time.
Insert Material Icon and FontAwesome icons dynamically in Flutter app when the icons are not known at compile time.
The version of font_awesome icons is: 6.1.0
Features #
TODO: List what your package can do. Maybe include images, gifs, or videos.
Getting started #
TODO: List prerequisites and provide or point to information on how to start using the package.
Usage #
Add dynamic_icons to pubspec.yaml All icons namse should be in the same format you can find on https://api.flutter.dev/flutter/material/Icons-class.html and fontawesome.com (e.g. add)
import 'package:dynamic_icons/dynamic_icons.dart';
class MyWidget extends StatelessWidget {
Widget build(BuildContext context) {
return IconButton(
// Use the FaIcon Widget + DynamicFaIcons class for the IconData
icon: DynamicIcons.getIconFromName("pizza-slice"),
onPressed: () {
print("Pressed");
}
);
}
}
Additional information #
References
https://pub.dev/packages/font_awesome_flutter