TF-3704 Fix height composer button

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2025-05-09 10:45:29 +07:00
committed by Dat H. Pham
parent aca0538b6b
commit b7e4eb6245
3 changed files with 31 additions and 33 deletions
@@ -14,6 +14,7 @@ class TMailButtonWidget extends StatelessWidget {
final double borderRadius;
final double? width;
final double? height;
final double maxWidth;
final double maxHeight;
final double minWidth;
@@ -50,6 +51,7 @@ class TMailButtonWidget extends StatelessWidget {
this.onLongPressActionCallback,
this.borderRadius = 20,
this.width,
this.height,
this.maxWidth = double.infinity,
this.maxHeight = double.infinity,
this.minWidth = 0,
@@ -86,6 +88,7 @@ class TMailButtonWidget extends StatelessWidget {
OnLongPressActionCallback? onLongPressActionCallback,
double borderRadius = 20,
double? width,
double? height,
double maxWidth = double.infinity,
double maxHeight = double.infinity,
double minWidth = 0,
@@ -110,6 +113,7 @@ class TMailButtonWidget extends StatelessWidget {
onLongPressActionCallback: onLongPressActionCallback,
borderRadius: borderRadius,
width: width,
height: height,
maxWidth : maxWidth,
maxHeight: maxHeight,
minWidth: minWidth,
@@ -137,6 +141,7 @@ class TMailButtonWidget extends StatelessWidget {
OnLongPressActionCallback? onLongPressActionCallback,
double borderRadius = 20,
double? width,
double? height,
double maxWidth = double.infinity,
double maxHeight = double.infinity,
double minWidth = 0,
@@ -161,6 +166,7 @@ class TMailButtonWidget extends StatelessWidget {
onLongPressActionCallback: onLongPressActionCallback,
borderRadius: borderRadius,
width: width,
height: height,
maxWidth : maxWidth,
maxHeight: maxHeight,
minWidth: minWidth,
@@ -354,6 +360,7 @@ class TMailButtonWidget extends StatelessWidget {
onLongPressActionCallback: onLongPressActionCallback,
borderRadius: borderRadius,
width: width,
height: height,
maxWidth: maxWidth,
maxHeight: maxHeight,
minWidth: minWidth,
@@ -12,6 +12,7 @@ class TMailContainerWidget extends StatelessWidget {
final Widget child;
final double borderRadius;
final double? width;
final double? height;
final double maxWidth;
final double maxHeight;
final double minWidth;
@@ -31,6 +32,7 @@ class TMailContainerWidget extends StatelessWidget {
this.onLongPressActionCallback,
this.borderRadius = 20,
this.width,
this.height,
this.maxWidth = double.infinity,
this.maxHeight = double.infinity,
this.minWidth = 0,
@@ -45,6 +47,24 @@ class TMailContainerWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
final item = Container(
decoration: BoxDecoration(
color: backgroundColor ?? AppColor.colorButtonHeaderThread,
borderRadius: BorderRadius.all(Radius.circular(borderRadius)),
border: border,
boxShadow: boxShadow,
),
width: width,
height: height,
constraints: BoxConstraints(
maxWidth: maxWidth,
maxHeight: maxHeight,
minWidth: minWidth,
),
padding: padding ?? const EdgeInsetsDirectional.all(8),
child: child,
);
final materialChild = Material(
type: MaterialType.transparency,
child: InkWell(
@@ -70,39 +90,9 @@ class TMailContainerWidget extends StatelessWidget {
child: tooltipMessage != null
? Tooltip(
message: tooltipMessage,
child: Container(
decoration: BoxDecoration(
color: backgroundColor ?? AppColor.colorButtonHeaderThread,
borderRadius: BorderRadius.all(Radius.circular(borderRadius)),
border: border,
boxShadow: boxShadow
),
width: width,
constraints: BoxConstraints(
maxWidth: maxWidth,
maxHeight: maxHeight,
minWidth: minWidth
),
padding: padding ?? const EdgeInsetsDirectional.all(8),
child: child
)
)
: Container(
decoration: BoxDecoration(
color: backgroundColor ?? AppColor.colorButtonHeaderThread,
borderRadius: BorderRadius.all(Radius.circular(borderRadius)),
border: border,
boxShadow: boxShadow
),
width: width,
constraints: BoxConstraints(
maxWidth: maxWidth,
maxHeight: maxHeight,
minWidth: minWidth
),
padding: padding ?? const EdgeInsetsDirectional.all(8),
child: child
child: item,
)
: item
),
);
@@ -35,8 +35,9 @@ class ComposeButtonWidget extends StatelessWidget {
icon: imagePaths.icComposeWeb,
borderRadius: 10,
iconSize: 24,
height: 44,
iconColor: Colors.white,
padding: const EdgeInsetsDirectional.symmetric(vertical: 8),
padding: const EdgeInsetsDirectional.symmetric(horizontal: 12),
backgroundColor: AppColor.blue700,
textStyle: ThemeUtils.textStyleBodyBody2(color: Colors.white),
onTapActionCallback: onTapAction,