Add locale based font

This commit is contained in:
problematicconsumer
2023-07-24 18:53:02 +03:30
parent acc438c40e
commit 49948398b5
3 changed files with 13 additions and 6 deletions

View File

@@ -19,6 +19,9 @@ class AppView extends HookConsumerWidget with PresLogger {
ref.watch(commonControllersProvider);
// HACK temporary solution
final fontFamily = locale.languageCode == "fa" ? "Shabnam" : "";
return MaterialApp.router(
routerConfig: router,
locale: locale,
@@ -26,8 +29,8 @@ class AppView extends HookConsumerWidget with PresLogger {
localizationsDelegates: GlobalMaterialLocalizations.delegates,
debugShowCheckedModeBanner: false,
themeMode: theme.themeMode,
theme: theme.light,
darkTheme: theme.dark,
theme: theme.light(fontFamily: fontFamily),
darkTheme: theme.dark(fontFamily: fontFamily),
title: 'Hiddify',
).animate().fadeIn();
}