update pages for carton

This commit is contained in:
tzw
2025-03-07 17:41:09 +06:30
parent e75eacd1f9
commit ee4e670c59
13 changed files with 616 additions and 618 deletions

View File

@@ -13,27 +13,46 @@ class DisplayText extends StatelessWidget {
final bool? withBorder;
final Color? borderColor;
final Widget? icon;
const DisplayText({
Key? key,
this.text,
this.subText,
this.labelTextKey,
this.iconData,
this.maxLines = 1,
this.withBorder = false,
this.borderColor,
this.icon,
}) : super(key: key);
final bool showLabelLink;
final Function()? onTapLabel;
const DisplayText(
{super.key,
this.text,
this.subText,
this.labelTextKey,
this.iconData,
this.maxLines = 1,
this.withBorder = false,
this.borderColor,
this.icon,
this.showLabelLink = false,
this.onTapLabel});
@override
Widget build(BuildContext context) {
var languageModel = Provider.of<LanguageModel>(context);
var labelStyle = languageModel.isEng
? TextStyle(color: Colors.black54, fontSize: 15)
: TextStyle(
color: Colors.black54, fontFamily: "Myanmar3", fontSize: 15);
? showLabelLink
? TextStyle(
color: Colors.transparent,
fontSize: 15,
decoration: TextDecoration.underline,
decorationColor: linkColor,
shadows: [Shadow(color: linkColor, offset: Offset(0, -2))],
)
: TextStyle(color: Colors.black54, fontSize: 15)
: showLabelLink
? TextStyle(
color: Colors.transparent,
fontFamily: "Myanmar3",
fontSize: 15,
decoration: TextDecoration.underline,
decorationColor: linkColor,
shadows: [Shadow(color: linkColor, offset: Offset(0, -2))],
)
: TextStyle(
color: Colors.black54, fontFamily: "Myanmar3", fontSize: 15);
var textStyle = languageModel.isEng
? TextStyle(color: Colors.black)
: TextStyle(color: Colors.black, fontFamily: "Myanmar3");
@@ -54,16 +73,18 @@ class DisplayText extends StatelessWidget {
color: primaryColor,
),
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
labelTextKey == null
? Container()
: Text(
AppTranslations.of(context)!.text(labelTextKey!),
style: labelStyle,
: InkWell(
onTap: showLabelLink ? onTapLabel : null,
child: Text(
AppTranslations.of(context)!.text(labelTextKey!),
style: labelStyle,
),
),
text == null
? Container()
@@ -71,9 +92,7 @@ class DisplayText extends StatelessWidget {
text!,
style: textStyle,
),
subText == null
? Container()
: subText!,
subText == null ? Container() : subText!,
],
),
),