How to change the default font family in Flutter
تبليغسؤال
يرجى شرح بإيجاز لمإذا تشعر أنك ينبغي الإبلاغ عن هذا السؤال.
How can I change every text of my app to use a specific font?
فقدت كلمة المرور الخاصة بك؟ الرجاء إدخال عنوان البريد الإلكتروني الخاص بك. ستتلقى رابطا وستنشئ كلمة مرور جديدة عبر البريد الإلكتروني.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.Morbi adipiscing gravdio, sit amet suscipit risus ultrices eu.Fusce viverra neque at purus laoreet consequa.Vivamus vulputate posuere nisl quis consequat.
إجابة ( 1 )
يرجى شرح بإيجاز لمإذا تشعر أنك ينبغي الإبلاغ عن هذه الإجابة.
Use Google fonts then use the official google_fonts package from the material team.
add to pubspec.yaml
dependencies
google_fonts:
Override the default font like this
MaterialApp(
theme: ThemeData(
textTheme: GoogleFonts.latoTextTheme(
Theme.of(context).textTheme,
),
),
);