コンテンツにスキップ

flutter アプリ全体のフォントの設定#

pubspec.yaml

dependencies:
  flutter_localizations:
    sdk: flutter         

を追加し、
import 'package:flutter_localizations/flutter_localizations.dart';

const locale = Locale("ja", "JP");
return MaterialApp(
  locale: locale,
  localizationsDelegates: const [
    GlobalMaterialLocalizations.delegate,
    GlobalWidgetsLocalizations.delegate,
    GlobalCupertinoLocalizations.delegate,
  ],
  supportedLocales: const [
    locale,
  ],
);


References#

Tags#

  • #flutter