mirror of
https://github.com/nisrulz/flutter-examples.git
synced 2025-05-17 21:15:54 +08:00
implemented custom font in using_custom_fonts example
This commit is contained in:
BIN
using_custom_fonts/data_repo/fonts/Pacifico-Regular.ttf
Executable file
BIN
using_custom_fonts/data_repo/fonts/Pacifico-Regular.ttf
Executable file
Binary file not shown.
@ -16,7 +16,13 @@ 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)),
|
||||
),
|
||||
),
|
||||
)));
|
||||
|
@ -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
|
Reference in New Issue
Block a user