dynamic_fa_icons 1.2.1+4 dynamic_fa_icons: ^1.2.1+4 copied to clipboard
Original package to insert FontAwesome icons dynamically in a Flutter app when the icons are not known at compile time.
Dynamic FontAwesome icons in Flutter #
Original package to insert FontAwesome icons dynamically in a Flutter app when the icons are not known at compile time.
The version of icons is: 6.4.0
Usage #
- Add
dynamic_fa_icons
andfont_awesome_flutter
topubspec.yaml
- All icons names must be in the same format you can find
on fontawesome.com (e.g.
pizza-slice
)
Example #
import 'package:dynamic_fa_icons/dynamic_fa_icons.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
class MyWidget extends StatelessWidget {
Widget build(BuildContext context) {
return IconButton(
// Use the FaIcon Widget + DynamicFaIcons class for the IconData
icon: FaIcon(DynamicFaIcons.getIconFromName("pizza-slice")),
onPressed: () {
print("Pressed");
}
);
}
}