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/material.dart';
|
||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
import 'package:pointer_interceptor/pointer_interceptor.dart';
|
||||||
|
|
||||||
class PopupItemWidget extends StatelessWidget {
|
class PopupItemWidget extends StatelessWidget {
|
||||||
|
|
||||||
@@ -27,31 +28,33 @@ class PopupItemWidget extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return InkWell(
|
return PointerInterceptor(
|
||||||
onTap: onCallbackAction,
|
child: InkWell(
|
||||||
child: Padding(
|
onTap: onCallbackAction,
|
||||||
padding: padding ?? const EdgeInsets.symmetric(horizontal: 20, vertical: 16),
|
child: Padding(
|
||||||
child: SizedBox(
|
padding: padding ?? const EdgeInsets.symmetric(horizontal: 20, vertical: 16),
|
||||||
child: Row(children: [
|
child: SizedBox(
|
||||||
SvgPicture.asset(
|
child: Row(children: [
|
||||||
_iconAction,
|
SvgPicture.asset(
|
||||||
width: iconSize ?? 20,
|
_iconAction,
|
||||||
height: iconSize ?? 20,
|
width: iconSize ?? 20,
|
||||||
fit: BoxFit.fill,
|
height: iconSize ?? 20,
|
||||||
color: colorIcon
|
fit: BoxFit.fill,
|
||||||
),
|
color: colorIcon
|
||||||
const SizedBox(width: 12),
|
),
|
||||||
Expanded(child: Text(
|
const SizedBox(width: 12),
|
||||||
_nameAction,
|
Expanded(child: Text(
|
||||||
style: styleName ?? const TextStyle(
|
_nameAction,
|
||||||
fontSize: 17,
|
style: styleName ?? const TextStyle(
|
||||||
fontWeight: FontWeight.normal,
|
fontSize: 17,
|
||||||
color: Colors.black
|
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/material.dart';
|
||||||
import 'package:flutter_svg/svg.dart';
|
import 'package:flutter_svg/svg.dart';
|
||||||
import 'package:model/mailbox/presentation_mailbox.dart';
|
import 'package:model/mailbox/presentation_mailbox.dart';
|
||||||
|
import 'package:pointer_interceptor/pointer_interceptor.dart';
|
||||||
|
|
||||||
class MailboxBottomSheetActionTileBuilder extends CupertinoActionSheetActionBuilder<PresentationMailbox> {
|
class MailboxBottomSheetActionTileBuilder extends CupertinoActionSheetActionBuilder<PresentationMailbox> {
|
||||||
|
|
||||||
@@ -32,27 +33,29 @@ class MailboxBottomSheetActionTileBuilder extends CupertinoActionSheetActionBuil
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build() {
|
Widget build() {
|
||||||
return AbsorbPointer(
|
return PointerInterceptor(
|
||||||
absorbing: absorbing,
|
child: AbsorbPointer(
|
||||||
child: Opacity(
|
absorbing: absorbing,
|
||||||
opacity: opacity ? 0.3 : 1.0,
|
child: Opacity(
|
||||||
child: Container(
|
opacity: opacity ? 0.3 : 1.0,
|
||||||
color: bgColor ?? Colors.white,
|
child: Container(
|
||||||
child: MouseRegion(
|
color: bgColor ?? Colors.white,
|
||||||
cursor: BuildUtils.isWeb ? MaterialStateMouseCursor.clickable : MouseCursor.defer,
|
child: MouseRegion(
|
||||||
child: CupertinoActionSheetAction(
|
cursor: BuildUtils.isWeb ? MaterialStateMouseCursor.clickable : MouseCursor.defer,
|
||||||
key: key,
|
child: CupertinoActionSheetAction(
|
||||||
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
|
key: key,
|
||||||
Padding(
|
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||||
padding: iconLeftPadding ?? const EdgeInsets.only(left: 12, right: 16),
|
Padding(
|
||||||
child: actionIcon),
|
padding: iconLeftPadding ?? const EdgeInsets.only(left: 12, right: 16),
|
||||||
Expanded(child: Text(actionName, textAlign: TextAlign.left, style: actionTextStyle())),
|
child: actionIcon),
|
||||||
]),
|
Expanded(child: Text(actionName, textAlign: TextAlign.left, style: actionTextStyle())),
|
||||||
onPressed: () {
|
]),
|
||||||
if (onCupertinoActionSheetActionClick != null) {
|
onPressed: () {
|
||||||
onCupertinoActionSheetActionClick!(presentationMailbox);
|
if (onCupertinoActionSheetActionClick != null) {
|
||||||
}
|
onCupertinoActionSheetActionClick!(presentationMailbox);
|
||||||
},
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user