dynamic_fa_icons 1.3.0+6 dynamic_fa_icons: ^1.3.0+6 copied to clipboard
Original package to insert FontAwesome icons by name in a Flutter app, for example when the icons are not known at compile time.
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:dynamic_fa_icons/dynamic_fa_icons.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
home: MyApp(),
));
}
class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
body: IconButton(
// Use the FaIcon Widget + DynamicFaIcons class for the IconData
icon: FaIcon(DynamicFaIcons.getIconFromName('pizza-slice')),
onPressed: () {
print('Pressed');
}),
);
}
}