TF-3704 Fix height composer button
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -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
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user