Font Awesome Icons

 import "package:flutter/material.dart";

import "package:font_awesome_flutter/font_awesome_flutter.dart";

void main() {
runApp(const MyApp());
}

class MyApp extends StatelessWidget {
const MyApp({super.key});

@override
Widget build(BuildContext context) {
return MaterialApp(
title: "Hello world",
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.purple,
),
home: const FlutterApp(),
);
}
}

class FlutterApp extends StatefulWidget {
const FlutterApp({super.key});

@override
State<FlutterApp> createState() {
return FlutterState();
}
}

class FlutterState extends State<FlutterApp> {
@override
Widget build(BuildContext context) {
return Scaffold(
endDrawer: const Drawer(),
drawer: const Drawer(
/*child: ListView(
padding: EdgeInsets.zero,
children: [
UserAccountsDrawerHeader(
accountName: const Text("Steve jobs"),
accountEmail: const Text("stevejobs@example.com"),
margin: EdgeInsets.zero,
currentAccountPicture: InkWell(onTap: (){ Navigator.pop(context);} ,
child: const Icon(Icons.account_circle, color: Colors.white, size: 85,)),
),
const Divider(thickness: 5, color: Colors.black),
],
),*/
),
appBar: AppBar(
title: const Text(
"Flutter Font_awesome_icons",
style: TextStyle(fontWeight: FontWeight.bold),
),
centerTitle: true,
backgroundColor: Colors.grey,
),
body: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: const [
Icon(
Icons.play_circle_outline,
size: 100,
color: Colors.brown,
),
SizedBox(
width: 20,
),
FaIcon(
FontAwesomeIcons.amazon,
size: 100,
color: Colors.orange,
),
/*"FaIcon" provides additional icons as per the requirements where "FontAwesomeIcons" Library is used*/
SizedBox(
width: 20,
),
FaIcon(
FontAwesomeIcons.googlePay,
size: 100,
color: Colors.blue,
),
],
),
),
);
}
}

Comments

Popular posts from this blog

Second GET API Calling with Bloc simple Example in Flutter

Stack Container Scrollable Card widget UI with Custom Widget

Pagination with Bloc Pattern in Flutter