implemented custom font in using_custom_fonts example

This commit is contained in:
Nishant Srivastava
2017-09-29 22:38:24 -07:00
parent 3a01e2d724
commit a12bf7b729
3 changed files with 14 additions and 3 deletions

Binary file not shown.

View File

@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
void main() {
runApp(new MaterialApp(
// Title
// Title
title: "Using Custom Fonts",
// Home
home: new Scaffold(
@ -16,8 +16,14 @@ void main() {
// Center the content
child: new Center(
// Add Text
child: new Text("The quick brown fox jumps over the lazy dog"),
child: new Text("The quick brown fox jumps over the lazy dog",
textAlign: TextAlign.center,
style: const TextStyle(
color: Colors.blueAccent,
fontFamily: 'Pacifico',
fontWeight: FontWeight.w400,
fontSize: 36.0)),
),
),
)));
}
}

View File

@ -48,3 +48,8 @@ flutter:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
fonts:
- family: Pacifico
fonts:
- asset: data_repo/fonts/Pacifico-Regular.ttf
weight: 400