diff --git a/using_custom_fonts/data_repo/fonts/Pacifico-Regular.ttf b/using_custom_fonts/data_repo/fonts/Pacifico-Regular.ttf new file mode 100755 index 0000000..ccbe0f3 Binary files /dev/null and b/using_custom_fonts/data_repo/fonts/Pacifico-Regular.ttf differ diff --git a/using_custom_fonts/lib/main.dart b/using_custom_fonts/lib/main.dart index e6fe7ec..c61d01f 100644 --- a/using_custom_fonts/lib/main.dart +++ b/using_custom_fonts/lib/main.dart @@ -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)), ), ), ))); -} \ No newline at end of file +} diff --git a/using_custom_fonts/pubspec.yaml b/using_custom_fonts/pubspec.yaml index 87aae43..805be8f 100644 --- a/using_custom_fonts/pubspec.yaml +++ b/using_custom_fonts/pubspec.yaml @@ -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 \ No newline at end of file