google fonts flutter
//Add this command you will get latest version of this depedency
$ flutter pub add google_fonts
//import this library
import 'package:google_fonts/google_fonts.dart';
google fonts flutter
//Add this command you will get latest version of this depedency
$ flutter pub add google_fonts
//import this library
import 'package:google_fonts/google_fonts.dart';
google fonts for flutte
//installation of google fonts in flutter (pubspec.yaml)
//please ignore the text after two slashes!
dependencies:
google_fonts: ^1.1.1 //(current one is this)
$ flutter pub get // => (this means click on the pub get option[kinda apply]).
google fonts flutter
dependencies:
google_fonts: ^2.1.0
how to set font family in flutter
MaterialApp(
title: 'Custom Fonts',
// Set Raleway as the default app font.
theme: ThemeData(fontFamily: 'Raleway'),
home: MyHomePage(),
);
flutter add custom fonts
flutter:
fonts:
- family: Proxima
fonts:
- asset: lib/fonts/ProximaNova-Regular.otf
In case you are using an emulator, go to the terminal and type "flutter clean" then "flutter pub get" to update the font used.
flutter googlefonts.
Text(
'This is Google Fonts',
style: GoogleFonts.lato(
textStyle: Theme.of(context).textTheme.display1,
fontSize: 48,
fontWeight: FontWeight.w700,
fontStyle: FontStyle.italic,
),
),
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us