custom Font

 import "package:flutter/material.dart";


void main() {
runApp(const MyApp(),);
}
class MyApp extends StatelessWidget {
const MyApp({super.key});

@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: "Custom Font in Flutter",
theme: ThemeData(
primarySwatch: Colors.purple,
),
home: const FontDemo(),
);
}
}
class FontDemo extends StatefulWidget {
const FontDemo({super.key});

@override
State<FontDemo> createState() {
return FontState();
}
}
class FontState extends State<FontDemo> {

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Custom Font"),
),
body: const Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("Hello World", style: TextStyle(fontFamily: "FontMain", fontSize: 45.0,),),
Text("Hello World", style: TextStyle(fontFamily: "FontOne", fontSize: 45.0,),),
Text("Hello World", style: TextStyle(fontFamily: "FontTwo", fontSize: 45.0,),),
Text("Hello World", style: TextStyle(fontFamily: "FontThree", fontSize: 45.0,),),
Text("Hello World", style: TextStyle(fontFamily: "FontFour", fontSize: 45.0,),),
Text("Hello World", style: TextStyle(fontFamily: "FontFive", fontSize: 45.0,),),
Text("Hello World", style: TextStyle(fontFamily: "FontSix", fontSize: 45.0,),),
Text("Hello World", style: TextStyle(fontFamily: "FontSeven", fontSize: 45.0,),),
Text("Hello World", style: TextStyle(fontFamily: "FontEight", fontSize: 45.0,),),
Text("Hello World", style: TextStyle(fontFamily: "FontNine", fontSize: 45.0,),),
],
),
),
);
}
}

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