This commit is contained in:
Sai Naw Wun
2020-10-07 02:33:06 +06:30
parent 01a2798a74
commit 65dda16fe6
475 changed files with 1543 additions and 90780 deletions

View File

@@ -0,0 +1,61 @@
import 'package:fcs/localization/app_translations.dart';
import 'package:fcs/pages/main/model/language_model.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:fcs/helpers/theme.dart';
class LocalText extends Text {
final BuildContext context;
LocalText(this.context, String translationKey,
{Color color,
double fontSize,
FontWeight fontWeight,
List<String> translationVariables,
String text,
bool underline = false})
: super(
text ??
AppTranslations.of(context).text(translationKey,
translationVariables: translationVariables),
style: Provider.of<LanguageModel>(context, listen: false).isEng
? newLabelStyle(
color: color,
fontSize: fontSize,
fontWeight: fontWeight,
underline: underline)
: newLabelStyleMM(
color: color,
fontSize: fontSize,
fontWeight: fontWeight,
underline: underline));
}
class LocalLargeTitle extends Text {
final BuildContext context;
LocalLargeTitle(
this.context,
String translationKey, {
Color color,
List<String> translationVariables,
}) : super(
AppTranslations.of(context).text(translationKey,
translationVariables: translationVariables),
style: Provider.of<LanguageModel>(context).isEng
? TextStyle(color: color)
: TextStyle(color: color, fontFamily: "Myanmar3"));
}
class TextLocalStyle extends Text {
final BuildContext context;
TextLocalStyle(this.context, String text,
{Color color, double fontSize, FontWeight fontWeight})
: super(text,
style: Provider.of<LanguageModel>(context).isEng
? TextStyle(
color: color, fontSize: fontSize, fontWeight: fontWeight)
: TextStyle(
color: color,
fontFamily: "Myanmar3",
fontSize: fontSize,
fontWeight: fontWeight));
}