TF-381 Apply new UI EmailView for browser
This commit is contained in:
@@ -200,27 +200,18 @@ class DestinationPickerView extends GetWidget<DestinationPickerController> {
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
color: Colors.white),
|
||||
margin: EdgeInsets.only(left: 16, right: 16, top: _getTopPaddingListMailbox(context, actions)),
|
||||
margin: EdgeInsets.only(left: 16, right: 16, top: 10),
|
||||
child: _buildDefaultMailbox(context)),
|
||||
SizedBox(height: 20),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
color: Colors.white),
|
||||
margin: EdgeInsets.only(left: 16, right: 16, top: 4, bottom: 30),
|
||||
margin: EdgeInsets.only(left: 16, right: 16, top: 10, bottom: 20),
|
||||
child: _buildFolderMailbox(context)),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
double _getTopPaddingListMailbox(BuildContext context, MailboxActions? actions) {
|
||||
if (actions == MailboxActions.create) {
|
||||
return (_responsiveUtils.isMobile(context) || _responsiveUtils.isMobileDevice(context)) ? 20.0 : 5.0;
|
||||
} else {
|
||||
return (_responsiveUtils.isMobile(context) || _responsiveUtils.isMobileDevice(context)) ? 16.0 : 10.0;
|
||||
}
|
||||
}
|
||||
|
||||
Widget _buildDefaultMailbox(BuildContext context) {
|
||||
return Obx(() => controller.defaultMailboxTree.value.root.childrenItems?.isNotEmpty ?? false
|
||||
? Transform(
|
||||
|
||||
+21
-19
@@ -36,7 +36,6 @@ class AppBarDestinationPickerBuilder {
|
||||
child: MediaQuery(
|
||||
data: MediaQueryData(padding: EdgeInsets.zero),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
_buildBackButton(),
|
||||
@@ -48,16 +47,27 @@ class AppBarDestinationPickerBuilder {
|
||||
}
|
||||
|
||||
Widget _buildBackButton() {
|
||||
return Material(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
color: Colors.transparent,
|
||||
child: _responsiveUtils.isMobile(_context)
|
||||
? IconButton(
|
||||
color: _mailboxAction == MailboxActions.create ? AppColor.colorTextButton : AppColor.baseTextColor,
|
||||
icon: _getBackIcon(),
|
||||
onPressed: () => _onCloseActionClick?.call())
|
||||
: SizedBox(width: 40, height: 40)
|
||||
);
|
||||
if (_mailboxAction == MailboxActions.create) {
|
||||
if (_responsiveUtils.isMobile(_context)) {
|
||||
return Material(
|
||||
color: Colors.transparent,
|
||||
shape: CircleBorder(),
|
||||
child: IconButton(
|
||||
splashRadius: 20,
|
||||
icon: SvgPicture.asset(_imagePaths.icBack, color: AppColor.colorTextButton, fit: BoxFit.fill),
|
||||
onPressed: () => _onCloseActionClick?.call()));
|
||||
} else {
|
||||
return SizedBox(width: 40, height: 40);
|
||||
}
|
||||
} else {
|
||||
return Material(
|
||||
color: Colors.transparent,
|
||||
shape: CircleBorder(),
|
||||
child: IconButton(
|
||||
splashRadius: 20,
|
||||
icon: SvgPicture.asset(_imagePaths.icComposerClose, color: AppColor.baseTextColor, fit: BoxFit.fill),
|
||||
onPressed: () => _onCloseActionClick?.call()));
|
||||
}
|
||||
}
|
||||
|
||||
Widget _buildTitle() {
|
||||
@@ -80,12 +90,4 @@ class AppBarDestinationPickerBuilder {
|
||||
return _responsiveUtils.isMobile(_context) ? TextAlign.start : TextAlign.center;
|
||||
}
|
||||
}
|
||||
|
||||
Widget _getBackIcon() {
|
||||
if (_mailboxAction == MailboxActions.create) {
|
||||
return SvgPicture.asset(_imagePaths.icBack, fit: BoxFit.fill);
|
||||
} else {
|
||||
return SvgPicture.asset(_imagePaths.icComposerClose, fit: BoxFit.fill);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user