Last active
October 15, 2018 02:14
-
-
Save masamichiueta/a2906d96e568031d8b455575e324b1dc to your computer and use it in GitHub Desktop.
fix Flutter Japanese font problem in iOS12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ThemeData _buildTheme() { | |
final ThemeData base = ThemeData.light(); | |
return base.copyWith( | |
textTheme: base.textTheme.apply(fontFamily: 'Hiragino Kaku Gothic ProN'), | |
primaryTextTheme: | |
base.primaryTextTheme.apply(fontFamily: 'Hiragino Kaku Gothic ProN'), | |
accentTextTheme: | |
base.accentTextTheme.apply(fontFamily: 'Hiragino Kaku Gothic ProN')); | |
} | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { | |
return new MaterialApp( | |
title: 'Flutter Demo', | |
theme: _buildTheme(), | |
home: new MyHomePage(title: 'Flutter Demo Home Page'), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment