mirror of
https://github.com/nisrulz/flutter-examples.git
synced 2025-05-24 08:38:33 +08:00
refactoring and added comments
This commit is contained in:
14
using_custom_fonts/lib/utils.dart
Normal file
14
using_custom_fonts/lib/utils.dart
Normal file
@ -0,0 +1,14 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
TextStyle getCustomFontTextStyle() {
|
||||
// text style which defines a custom font
|
||||
return const TextStyle(
|
||||
// set color of text
|
||||
color: Colors.blueAccent,
|
||||
// set the font family as defined in pubspec.yaml
|
||||
fontFamily: 'Pacifico',
|
||||
// set the font weight
|
||||
fontWeight: FontWeight.w400,
|
||||
// set the font size
|
||||
fontSize: 36.0);
|
||||
}
|
Reference in New Issue
Block a user