TF-934 Implement open email in new tab

This commit is contained in:
dab246
2022-11-14 16:30:25 +07:00
committed by Dat H. Pham
parent 83f8049c48
commit 4f981878c3
13 changed files with 432 additions and 251 deletions
@@ -4,27 +4,39 @@ import 'package:flutter_svg/flutter_svg.dart';
mixin PopupMenuWidgetMixin {
Widget popupItem(String iconAction, String nameAction, {
Widget popupItem(
String iconAction,
String nameAction, {
Color? colorIcon,
double? iconSize,
TextStyle? styleName,
Function? onCallbackAction
EdgeInsets? padding,
Function()? onCallbackAction
}) {
return InkWell(
onTap: () => onCallbackAction?.call(),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 16),
child: SizedBox(
child: Row(children: [
SvgPicture.asset(iconAction, width: 20, height: 20, fit: BoxFit.fill, color: colorIcon),
const SizedBox(width: 12),
Expanded(child: Text(nameAction,
style: styleName ?? const TextStyle(
fontSize: 17,
fontWeight: FontWeight.normal,
color: Colors.black))),
])
),
)
onTap: onCallbackAction,
child: Padding(
padding: padding ?? const EdgeInsets.symmetric(horizontal: 20, vertical: 16),
child: SizedBox(
child: Row(children: [
SvgPicture.asset(
iconAction,
width: iconSize ?? 20,
height: iconSize ?? 20,
fit: BoxFit.fill,
color: colorIcon
),
const SizedBox(width: 12),
Expanded(child: Text(
nameAction,
style: styleName ?? const TextStyle(
fontSize: 17,
fontWeight: FontWeight.normal,
color: Colors.black)
)),
])
),
)
);
}
}