0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

FlutterアプリへGoogleフォントを追加する方法

Posted at

1,やり方

1-1,
pubspec.yamlにgoogle_fonts: ^1.1.1
を追加

dependencies:
  flutter:
    sdk: flutter
 ### 省略 ###
  google_fonts: ^1.1.1

1-2,
flutter pub getします。

2,使い方

hoge.dart
import 'package:google_fonts/google_fonts.dart';

// styleとして適用します。 antonというスタイルの例
  appBar: AppBar(
     title: Text('MyAppName',style: GoogleFonts.anton(fontSize: 22)),
  ),

フォントの一覧

フォントの一覧は下記サイトにて確認できます。
気に入ったアイコンを使ってアプリを良い感じにしましょう!
https://fonts.google.com/

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?