Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masamichiueta/a2906d96e568031d8b455575e324b1dc to your computer and use it in GitHub Desktop.
Save masamichiueta/a2906d96e568031d8b455575e324b1dc to your computer and use it in GitHub Desktop.
fix Flutter Japanese font problem in iOS12
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