ix_fonts.dart 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter_screenutil/flutter_screenutil.dart';
  3. import '../../app/data/sp/ix_sp.dart';
  4. import '../translations/localization_service.dart';
  5. // todo configure text family and size
  6. class MyFonts {
  7. // return the right font depending on app language
  8. static TextStyle get getAppFontType =>
  9. LocalizationService.supportedLanguagesFontsFamilies[IXSP
  10. .getCurrentLocal()
  11. .languageCode]!;
  12. // headlines text font
  13. static TextStyle get displayTextStyle => getAppFontType;
  14. // body text font
  15. static TextStyle get bodyTextStyle => getAppFontType;
  16. // button text font
  17. static TextStyle get buttonTextStyle => getAppFontType;
  18. // app bar text font
  19. static TextStyle get appBarTextStyle => getAppFontType;
  20. // chips text font
  21. static TextStyle get chipTextStyle => getAppFontType;
  22. // appbar font size
  23. static double get appBarTittleSize => 18.sp;
  24. // body font size
  25. static double get bodySmallTextSize => 11.sp;
  26. static double get bodyMediumSize => 13.sp; // default font
  27. static double get bodyLargeSize => 16.sp;
  28. // display font size
  29. static double get displayLargeSize => 20.sp;
  30. static double get displayMediumSize => 17.sp;
  31. static double get displaySmallSize => 14.sp;
  32. //button font size
  33. static double get buttonTextSize => 16.sp;
  34. //chip font size
  35. static double get chipTextSize => 10.sp;
  36. // list tile fonts sizes
  37. static double get listTileTitleSize => 13.sp;
  38. static double get listTileSubtitleSize => 12.sp;
  39. // custom themes (extensions)
  40. static double get employeeListItemNameSize => 13.sp;
  41. static double get employeeListItemSubtitleSize => 13.sp;
  42. }