TF-2857 Change logo & text in application

This commit is contained in:
dab246
2024-06-06 00:04:25 +07:00
committed by Dat H. Pham
parent d2a48cd6ab
commit 2228d1a5d8
11 changed files with 132 additions and 85 deletions
@@ -195,6 +195,7 @@ class ImagePaths {
String get icEventUpdated => _getImagePath('ic_event_updated.svg');
String get icEventCanceled => _getImagePath('ic_event_canceled.svg');
String get icFormatQuote => _getImagePath('ic_format_quote.svg');
String get icLogoWithText => _getImagePath('ic_logo_with_text.svg');
String get icTMailLogo => _getImagePath('ic_tmail_logo.svg');
String get icLoginGraphic => _getImagePath('ic_login_graphic.svg');
String get icCancel => _getImagePath('ic_cancel.svg');
@@ -39,6 +39,7 @@ class TMailButtonWidget extends StatelessWidget {
final int? maxLines;
final MainAxisSize mainAxisSize;
final bool isLoading;
final Color? hoverColor;
const TMailButtonWidget({
super.key,
@@ -72,6 +73,7 @@ class TMailButtonWidget extends StatelessWidget {
this.maxLines,
this.mainAxisSize = MainAxisSize.max,
this.isLoading = false,
this.hoverColor,
});
factory TMailButtonWidget.fromIcon({
@@ -96,6 +98,7 @@ class TMailButtonWidget extends StatelessWidget {
Color? trailingIconColor,
List<BoxShadow>? boxShadow,
EdgeInsetsGeometry? margin,
Color? hoverColor,
}) {
return TMailButtonWidget(
key: key,
@@ -120,6 +123,7 @@ class TMailButtonWidget extends StatelessWidget {
trailingIconColor: trailingIconColor,
boxShadow: boxShadow,
margin: margin,
hoverColor: hoverColor,
);
}
@@ -144,6 +148,7 @@ class TMailButtonWidget extends StatelessWidget {
bool flexibleText = false,
BoxBorder? border,
int? maxLines,
Color? hoverColor,
}) {
return TMailButtonWidget(
key: key,
@@ -166,6 +171,7 @@ class TMailButtonWidget extends StatelessWidget {
flexibleText: flexibleText,
border: border,
maxLines: maxLines,
hoverColor: hoverColor,
);
}
@@ -353,6 +359,7 @@ class TMailButtonWidget extends StatelessWidget {
margin: margin,
boxShadow: boxShadow,
border: border,
hoverColor: hoverColor,
child: childWidget,
);
}
@@ -21,6 +21,7 @@ class TMailContainerWidget extends StatelessWidget {
final EdgeInsetsGeometry? margin;
final List<BoxShadow>? boxShadow;
final BoxBorder? border;
final Color? hoverColor;
const TMailContainerWidget({
super.key,
@@ -39,27 +40,31 @@ class TMailContainerWidget extends StatelessWidget {
this.boxShadow,
this.margin,
this.border,
this.hoverColor,
});
@override
Widget build(BuildContext context) {
final materialChild = Material(
color: Colors.transparent,
type: MaterialType.transparency,
child: InkWell(
onTap: onTapActionCallback,
onTapDown: (detail) {
if (onTapActionAtPositionCallback != null) {
final screenSize = MediaQuery.of(context).size;
final offset = detail.globalPosition;
final position = RelativeRect.fromLTRB(
offset.dx,
offset.dy,
screenSize.width - offset.dx,
screenSize.height - offset.dy,
);
onTapActionAtPositionCallback!.call(position);
}
},
onTapDown: onTapActionAtPositionCallback != null
? (detail) {
if (onTapActionAtPositionCallback != null) {
final screenSize = MediaQuery.of(context).size;
final offset = detail.globalPosition;
final position = RelativeRect.fromLTRB(
offset.dx,
offset.dy,
screenSize.width - offset.dx,
screenSize.height - offset.dy,
);
onTapActionAtPositionCallback!.call(position);
}
}
: null,
hoverColor: hoverColor,
onLongPress: onLongPressActionCallback,
borderRadius: BorderRadius.all(Radius.circular(borderRadius)),
child: tooltipMessage != null