Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

chore: remove unused getters for TextStyles

Richard Shiuecf42d8cd4315
diff --git a/frontend/app_flowy/packages/flowy_infra/lib/text_style.dart b/frontend/app_flowy/packages/flowy_infra/lib/text_style.dart
index 9f477dcb0a..76f3a480d6 100644
--- a/frontend/app_flowy/packages/flowy_infra/lib/text_style.dart
+++ b/frontend/app_flowy/packages/flowy_infra/lib/text_style.dart
@@ -1,78 +1,7 @@
import 'package:flowy_infra/size.dart';
import 'package:flutter/material.dart';
-// preserved until deprecation
-class Fonts {
- static String general = "Poppins";
-
- static String monospace = "SF Mono";
-
- static String emoji = "Noto Color Emoji";
-}
-
class TextStyles {
- // preserved until deprecation
- static TextStyle general({
- double? fontSize,
- FontWeight fontWeight = FontWeight.w500,
- Color? color,
- }) =>
- TextStyle(
- fontFamily: Fonts.general,
- fontSize: fontSize ?? FontSizes.s12,
- color: color,
- fontWeight: fontWeight,
- fontFamilyFallback: [Fonts.emoji],
- letterSpacing: (fontSize ?? FontSizes.s12) * 0.005,
- );
-
- static TextStyle monospace({
- String? fontFamily,
- double? fontSize,
- FontWeight fontWeight = FontWeight.w400,
- }) =>
- TextStyle(
- fontFamily: fontFamily ?? Fonts.monospace,
- fontSize: fontSize ?? FontSizes.s12,
- fontWeight: fontWeight,
- fontFamilyFallback: [Fonts.emoji],
- );
-
- static TextStyle get title => general(
- fontSize: FontSizes.s18,
- fontWeight: FontWeight.w600,
- );
-
- static TextStyle get subheading => general(
- fontSize: FontSizes.s16,
- fontWeight: FontWeight.w600,
- );
-
- static TextStyle get subtitle => general(
- fontSize: FontSizes.s16,
- fontWeight: FontWeight.w600,
- );
-
- static TextStyle get body1 => general(
- fontSize: FontSizes.s12,
- fontWeight: FontWeight.w500,
- );
-
- static TextStyle get body2 => general(
- fontSize: FontSizes.s12,
- fontWeight: FontWeight.w400,
- );
-
- static TextStyle get callout => general(
- fontSize: FontSizes.s11,
- fontWeight: FontWeight.w600,
- );
-
- static TextStyle get caption => general(
- fontSize: FontSizes.s11,
- fontWeight: FontWeight.w400,
- );
-
final String font;
final Color color;