How to Apply Google Font in Flutter Project? | Pub.dev Google_Fonts Package | Hindi

  Рет қаралды 5,330

Ahirlog

Ahirlog

Күн бұрын

To apply a Google Font in a Flutter project, you can follow these steps:
Visit the Google Fonts website (fonts.google.com/) and choose a font that you want to use in your project.
Click on the "Add to Collection" button for the font that you want to use.
Click on the "Customize" tab in the top menu.
Select the styles and character sets that you want to include in your project.
Click on the "Family selected" button to generate the code that you will need to use the font in your project.
In your Flutter project, add the following dependency to your pubspec.yaml file:
dependencies:
google_fonts: ^1.1.0
In your Flutter code, import the google_fonts package and use the GoogleFonts.getFont function to get the font that you want to use. For example:
import 'package:google_fonts/google_fonts.dart';
final font = GoogleFonts.getFont('Roboto');
Use the font variable in the TextStyle of your Text widget to apply the font to your text:
Text(
'Hello, world!',
style: TextStyle(font: font),
)
This will apply the Google Font that you selected to your text in the Flutter project. You can repeat these steps to apply different fonts to different parts of your app.
I hope this helps! Let me know if you have any questions or need further assistance.
----------------------------------
SafeArea Widget in Flutter | #116
• SafeArea Widget in Flu...
How to Clone an GitHub Project to VS Code | Visual Studio Code | Hindi
• How to Clone an GitHub...
How to Clone GitHub Project in Android Studio | Import GitHub Project | Hindi
• How to Clone GitHub Pr...
Flutter Project: My QR Code App | Ahirlog
• Flutter Project: My QR...
ButtonBar Widget in Flutter | #115
• ButtonBar Widget in Fl...
Drawer Widget in Flutter | #114
• Drawer Widget in Flutt...
ClipOval Widget in Flutter | #113
• ClipOval Widget in Flu...
ClipRRect Widget in Flutter | #112
• ClipRRect Widget in Fl...
---------------------------------
My KZbin Gear:
Boya BYM1(Mic): amzn.to/3bvm69j
Redmi Note 7 Pro(Mic & Camera): amzn.to/3uRkVsb
MSI Motherboard: amzn.to/3fiQHYO
Intel i3 Processor: amzn.to/3w8TWbQ
Mouse: amzn.to/3yb8PMP
Keyboard: amzn.to/3bvmtkd
Wifi Adaptor: amzn.to/3fiQYuO
SSD: amzn.to/3w2w2Pa
Speakers: amzn.to/3w6pKhv
Instagram: / ahirlog
Facebook: / ahirlog
Twitter: / ahirlog
KZbin: / ahirlog
#ahirlog #flutter #dart
Last Summer by Ikson: / ikson​
Music promoted by Audio Library • Last Summer - Ikson (N...

Пікірлер: 3
@rabarhusen9170
@rabarhusen9170 2 жыл бұрын
pretty useful . thnx teacher
@anamulhoque3739
@anamulhoque3739 2 жыл бұрын
Nice bro
@ahirlog
@ahirlog 2 жыл бұрын
Thanks 👍
Or is Harriet Quinn good? #cosplay#joker #Harriet Quinn
00:20
佐助与鸣人
Рет қаралды 48 МЛН
王子原来是假正经#艾莎
00:39
在逃的公主
Рет қаралды 26 МЛН
МЕБЕЛЬ ВЫДАСТ СОТРУДНИКАМ ПОЛИЦИИ ТАБЕЛЬНУЮ МЕБЕЛЬ
00:20
❌Разве такое возможно? #story
01:00
Кэри Найс
Рет қаралды 7 МЛН
Flutter Tutorial - Add Custom Fonts & Google Fonts
4:50
HeyFlutter․com
Рет қаралды 43 М.
Flutter ListView Search With TextField
5:45
dbestech
Рет қаралды 71 М.
What is Flutter?
7:53
London App Brewery
Рет қаралды 814 М.
Flutter Calculator App Tutorial for Beginners
1:03:21
Shohruh AK
Рет қаралды 29 М.
Flutter Git & Github Tutorial | Setup Git & Github In Flutter Project
14:00
Or is Harriet Quinn good? #cosplay#joker #Harriet Quinn
00:20
佐助与鸣人
Рет қаралды 48 МЛН