TF-1427 Focus button overlay on email view
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:pointer_interceptor/pointer_interceptor.dart';
|
||||
|
||||
class PopupItemWidget extends StatelessWidget {
|
||||
|
||||
@@ -27,31 +28,33 @@ class PopupItemWidget extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
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
|
||||
)
|
||||
)),
|
||||
])
|
||||
),
|
||||
)
|
||||
return PointerInterceptor(
|
||||
child: InkWell(
|
||||
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
|
||||
)
|
||||
)),
|
||||
])
|
||||
),
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
+24
-21
@@ -4,6 +4,7 @@ import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:model/mailbox/presentation_mailbox.dart';
|
||||
import 'package:pointer_interceptor/pointer_interceptor.dart';
|
||||
|
||||
class MailboxBottomSheetActionTileBuilder extends CupertinoActionSheetActionBuilder<PresentationMailbox> {
|
||||
|
||||
@@ -32,27 +33,29 @@ class MailboxBottomSheetActionTileBuilder extends CupertinoActionSheetActionBuil
|
||||
|
||||
@override
|
||||
Widget build() {
|
||||
return AbsorbPointer(
|
||||
absorbing: absorbing,
|
||||
child: Opacity(
|
||||
opacity: opacity ? 0.3 : 1.0,
|
||||
child: Container(
|
||||
color: bgColor ?? Colors.white,
|
||||
child: MouseRegion(
|
||||
cursor: BuildUtils.isWeb ? MaterialStateMouseCursor.clickable : MouseCursor.defer,
|
||||
child: CupertinoActionSheetAction(
|
||||
key: key,
|
||||
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
Padding(
|
||||
padding: iconLeftPadding ?? const EdgeInsets.only(left: 12, right: 16),
|
||||
child: actionIcon),
|
||||
Expanded(child: Text(actionName, textAlign: TextAlign.left, style: actionTextStyle())),
|
||||
]),
|
||||
onPressed: () {
|
||||
if (onCupertinoActionSheetActionClick != null) {
|
||||
onCupertinoActionSheetActionClick!(presentationMailbox);
|
||||
}
|
||||
},
|
||||
return PointerInterceptor(
|
||||
child: AbsorbPointer(
|
||||
absorbing: absorbing,
|
||||
child: Opacity(
|
||||
opacity: opacity ? 0.3 : 1.0,
|
||||
child: Container(
|
||||
color: bgColor ?? Colors.white,
|
||||
child: MouseRegion(
|
||||
cursor: BuildUtils.isWeb ? MaterialStateMouseCursor.clickable : MouseCursor.defer,
|
||||
child: CupertinoActionSheetAction(
|
||||
key: key,
|
||||
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
Padding(
|
||||
padding: iconLeftPadding ?? const EdgeInsets.only(left: 12, right: 16),
|
||||
child: actionIcon),
|
||||
Expanded(child: Text(actionName, textAlign: TextAlign.left, style: actionTextStyle())),
|
||||
]),
|
||||
onPressed: () {
|
||||
if (onCupertinoActionSheetActionClick != null) {
|
||||
onCupertinoActionSheetActionClick!(presentationMailbox);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user