TF-1118 Clear input data when back to setting menu
This commit is contained in:
+47
-37
@@ -6,6 +6,8 @@ import 'package:core/presentation/extensions/color_extension.dart';
|
|||||||
import 'package:core/presentation/resources/image_paths.dart';
|
import 'package:core/presentation/resources/image_paths.dart';
|
||||||
import 'package:core/presentation/utils/responsive_utils.dart';
|
import 'package:core/presentation/utils/responsive_utils.dart';
|
||||||
import 'package:core/presentation/views/button/button_builder.dart';
|
import 'package:core/presentation/views/button/button_builder.dart';
|
||||||
|
import 'package:core/utils/app_logger.dart';
|
||||||
|
import 'package:core/utils/build_utils.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:jmap_dart_client/jmap/mail/email/email_address.dart';
|
import 'package:jmap_dart_client/jmap/mail/email/email_address.dart';
|
||||||
@@ -14,6 +16,7 @@ import 'package:super_tag_editor/tag_editor.dart';
|
|||||||
import 'package:tmail_ui_user/features/composer/presentation/widgets/suggestion_email_address.dart';
|
import 'package:tmail_ui_user/features/composer/presentation/widgets/suggestion_email_address.dart';
|
||||||
import 'package:tmail_ui_user/features/contact/presentation/widgets/contact_input_tag_item.dart';
|
import 'package:tmail_ui_user/features/contact/presentation/widgets/contact_input_tag_item.dart';
|
||||||
import 'package:tmail_ui_user/features/contact/presentation/widgets/contact_suggestion_box_item.dart';
|
import 'package:tmail_ui_user/features/contact/presentation/widgets/contact_suggestion_box_item.dart';
|
||||||
|
import 'package:tmail_ui_user/features/manage_account/presentation/menu/settings_utils.dart';
|
||||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||||
|
|
||||||
typedef OnSuggestionContactCallbackAction = Future<List<EmailAddress>> Function(String query);
|
typedef OnSuggestionContactCallbackAction = Future<List<EmailAddress>> Function(String query);
|
||||||
@@ -48,21 +51,18 @@ class _AutocompleteContactTextFieldWithTagsState extends State<AutocompleteConta
|
|||||||
final _imagePaths = Get.find<ImagePaths>();
|
final _imagePaths = Get.find<ImagePaths>();
|
||||||
|
|
||||||
late List<EmailAddress> listEmailAddress;
|
late List<EmailAddress> listEmailAddress;
|
||||||
late Timer _gapBetweenTagChangedAndFindSuggestion;
|
|
||||||
|
Timer? _gapBetweenTagChangedAndFindSuggestion;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
listEmailAddress = widget.listEmailAddress;
|
listEmailAddress = widget.listEmailAddress;
|
||||||
_gapBetweenTagChangedAndFindSuggestion = Timer(
|
|
||||||
const Duration(microseconds: 500),
|
|
||||||
() {}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_gapBetweenTagChangedAndFindSuggestion.cancel();
|
_gapBetweenTagChangedAndFindSuggestion?.cancel();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ class _AutocompleteContactTextFieldWithTagsState extends State<AutocompleteConta
|
|||||||
keyboardType: TextInputType.emailAddress,
|
keyboardType: TextInputType.emailAddress,
|
||||||
textInputAction: TextInputAction.done,
|
textInputAction: TextInputAction.done,
|
||||||
hasAddButton: false,
|
hasAddButton: false,
|
||||||
tagSpacing: 12,
|
tagSpacing: BuildUtils.isWeb ? 12 : 8,
|
||||||
delimiters: const [' '],
|
delimiters: const [' '],
|
||||||
autofocus: false,
|
autofocus: false,
|
||||||
minTextFieldWidth: 20,
|
minTextFieldWidth: 20,
|
||||||
@@ -99,7 +99,15 @@ class _AutocompleteContactTextFieldWithTagsState extends State<AutocompleteConta
|
|||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.w500),
|
fontWeight: FontWeight.w500),
|
||||||
inputDecoration: const InputDecoration(border: InputBorder.none),
|
inputDecoration: InputDecoration(
|
||||||
|
border: InputBorder.none,
|
||||||
|
hintText: AppLocalizations.of(context).hintInputAutocompleteContact,
|
||||||
|
hintStyle: const TextStyle(
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
color: AppColor.colorSettingExplanation,
|
||||||
|
fontSize: 16
|
||||||
|
)
|
||||||
|
),
|
||||||
tagBuilder: (context, index) => ContactInputTagItem(
|
tagBuilder: (context, index) => ContactInputTagItem(
|
||||||
listEmailAddress[index],
|
listEmailAddress[index],
|
||||||
deleteContactCallbackAction: (contact) {
|
deleteContactCallbackAction: (contact) {
|
||||||
@@ -110,6 +118,10 @@ class _AutocompleteContactTextFieldWithTagsState extends State<AutocompleteConta
|
|||||||
if (!_isDuplicatedRecipient(value)) {
|
if (!_isDuplicatedRecipient(value)) {
|
||||||
setState(() => listEmailAddress.add(EmailAddress(null, value)));
|
setState(() => listEmailAddress.add(EmailAddress(null, value)));
|
||||||
}
|
}
|
||||||
|
_gapBetweenTagChangedAndFindSuggestion = Timer(
|
||||||
|
const Duration(seconds: 1),
|
||||||
|
_handleGapBetweenTagChangedAndFindSuggestion
|
||||||
|
);
|
||||||
},
|
},
|
||||||
findSuggestions: _findSuggestions,
|
findSuggestions: _findSuggestions,
|
||||||
suggestionBuilder: (context, tagEditorState, suggestionEmailAddress) {
|
suggestionBuilder: (context, tagEditorState, suggestionEmailAddress) {
|
||||||
@@ -129,34 +141,28 @@ class _AutocompleteContactTextFieldWithTagsState extends State<AutocompleteConta
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (widget.hasAddContactButton == true) {
|
if (widget.hasAddContactButton == true) {
|
||||||
if (_responsiveUtils.isScreenWithShortestSide(context)) {
|
return Container(
|
||||||
return Container(
|
color: Colors.transparent,
|
||||||
color: Colors.transparent,
|
width: double.infinity,
|
||||||
width: double.infinity,
|
padding: SettingsUtils.getPaddingInputRecipientForwarding(context, _responsiveUtils),
|
||||||
padding: const EdgeInsets.all(16),
|
child: _responsiveUtils.isScreenWithShortestSide(context)
|
||||||
child: Column(
|
? Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
itemTagEditor,
|
itemTagEditor,
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
_buildAddRecipientButton(context, maxWidth: double.infinity)
|
_buildAddRecipientButton(context, maxWidth: double.infinity)
|
||||||
],
|
],
|
||||||
),
|
)
|
||||||
);
|
: Row(
|
||||||
} else {
|
children: [
|
||||||
return Container(
|
Expanded(child: itemTagEditor),
|
||||||
color: Colors.transparent,
|
const SizedBox(width: 12),
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
|
_buildAddRecipientButton(context)
|
||||||
child: Row(
|
],
|
||||||
children: [
|
)
|
||||||
Expanded(child: itemTagEditor),
|
);
|
||||||
const SizedBox(width: 12),
|
|
||||||
_buildAddRecipientButton(context)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
return itemTagEditor;
|
return itemTagEditor;
|
||||||
}
|
}
|
||||||
@@ -173,7 +179,7 @@ class _AutocompleteContactTextFieldWithTagsState extends State<AutocompleteConta
|
|||||||
}
|
}
|
||||||
|
|
||||||
FutureOr<List<SuggestionEmailAddress>> _findSuggestions(String query) async {
|
FutureOr<List<SuggestionEmailAddress>> _findSuggestions(String query) async {
|
||||||
if (_gapBetweenTagChangedAndFindSuggestion.isActive) {
|
if (_gapBetweenTagChangedAndFindSuggestion?.isActive ?? false) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,6 +223,10 @@ class _AutocompleteContactTextFieldWithTagsState extends State<AutocompleteConta
|
|||||||
.map((emailAddress) => SuggestionEmailAddress(emailAddress, state: SuggestionEmailState.duplicated));
|
.map((emailAddress) => SuggestionEmailAddress(emailAddress, state: SuggestionEmailState.duplicated));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _handleGapBetweenTagChangedAndFindSuggestion() {
|
||||||
|
log('_AutocompleteContactTextFieldWithTagsState::_handleGapBetweenTagChangedAndFindSuggestion(): Timeout');
|
||||||
|
}
|
||||||
|
|
||||||
bool _isValidAllEmailAddress(List<EmailAddress> addedEmailAddress) {
|
bool _isValidAllEmailAddress(List<EmailAddress> addedEmailAddress) {
|
||||||
return addedEmailAddress.every((addedMail) => addedMail.emailAddress.isEmail);
|
return addedEmailAddress.every((addedMail) => addedMail.emailAddress.isEmail);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
import 'package:core/presentation/extensions/color_extension.dart';
|
import 'package:core/presentation/extensions/color_extension.dart';
|
||||||
import 'package:core/presentation/resources/image_paths.dart';
|
import 'package:core/presentation/resources/image_paths.dart';
|
||||||
import 'package:core/presentation/utils/style_utils.dart';
|
import 'package:core/presentation/utils/style_utils.dart';
|
||||||
|
import 'package:core/utils/build_utils.dart';
|
||||||
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:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@@ -29,6 +30,7 @@ class ContactInputTagItem extends StatelessWidget {
|
|||||||
final imagePaths = Get.find<ImagePaths>();
|
final imagePaths = Get.find<ImagePaths>();
|
||||||
|
|
||||||
final itemChild = Chip(
|
final itemChild = Chip(
|
||||||
|
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||||
avatar: contact.displayName.isNotEmpty
|
avatar: contact.displayName.isNotEmpty
|
||||||
? GradientColorAvatarIcon(
|
? GradientColorAvatarIcon(
|
||||||
contact.avatarColors,
|
contact.avatarColors,
|
||||||
@@ -72,10 +74,17 @@ class ContactInputTagItem extends StatelessWidget {
|
|||||||
onDeleted: () => deleteContactCallbackAction?.call(contact),
|
onDeleted: () => deleteContactCallbackAction?.call(contact),
|
||||||
);
|
);
|
||||||
|
|
||||||
return Padding(
|
if (BuildUtils.isWeb) {
|
||||||
padding: const EdgeInsets.only(top: 10),
|
return Padding(
|
||||||
child: itemChild
|
padding: const EdgeInsets.only(top: 10),
|
||||||
);
|
child: itemChild
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 8),
|
||||||
|
child: itemChild
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _isValidEmailAddress(String value) => value.isEmail;
|
bool _isValidEmailAddress(String value) => value.isEmail;
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
|
||||||
|
import 'package:tmail_ui_user/features/base/action/ui_action.dart';
|
||||||
|
|
||||||
|
class DashBoardSettingAction extends UIAction {
|
||||||
|
static final idle = DashBoardSettingAction();
|
||||||
|
|
||||||
|
DashBoardSettingAction() : super();
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object?> get props => [];
|
||||||
|
}
|
||||||
|
|
||||||
|
class ClearAllInputForwarding extends DashBoardSettingAction {
|
||||||
|
|
||||||
|
ClearAllInputForwarding();
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object?> get props => [];
|
||||||
|
}
|
||||||
@@ -22,6 +22,7 @@ import 'package:tmail_ui_user/features/manage_account/domain/usecases/add_recipi
|
|||||||
import 'package:tmail_ui_user/features/manage_account/domain/usecases/delete_recipient_in_forwarding_interactor.dart';
|
import 'package:tmail_ui_user/features/manage_account/domain/usecases/delete_recipient_in_forwarding_interactor.dart';
|
||||||
import 'package:tmail_ui_user/features/manage_account/domain/usecases/edit_local_copy_in_forwarding_interactor.dart';
|
import 'package:tmail_ui_user/features/manage_account/domain/usecases/edit_local_copy_in_forwarding_interactor.dart';
|
||||||
import 'package:tmail_ui_user/features/manage_account/domain/usecases/get_forward_interactor.dart';
|
import 'package:tmail_ui_user/features/manage_account/domain/usecases/get_forward_interactor.dart';
|
||||||
|
import 'package:tmail_ui_user/features/manage_account/presentation/action/dashboard_setting_action.dart';
|
||||||
import 'package:tmail_ui_user/features/manage_account/presentation/extensions/tmail_forward_extension.dart';
|
import 'package:tmail_ui_user/features/manage_account/presentation/extensions/tmail_forward_extension.dart';
|
||||||
import 'package:tmail_ui_user/features/manage_account/presentation/forward/controller/forward_recipient_controller.dart';
|
import 'package:tmail_ui_user/features/manage_account/presentation/forward/controller/forward_recipient_controller.dart';
|
||||||
import 'package:tmail_ui_user/features/manage_account/presentation/manage_account_dashboard_controller.dart';
|
import 'package:tmail_ui_user/features/manage_account/presentation/manage_account_dashboard_controller.dart';
|
||||||
@@ -47,6 +48,7 @@ class ForwardController extends BaseController {
|
|||||||
bool get currentForwardLocalCopyState => currentForward.value?.localCopy ?? false;
|
bool get currentForwardLocalCopyState => currentForward.value?.localCopy ?? false;
|
||||||
|
|
||||||
late ForwardRecipientController recipientController;
|
late ForwardRecipientController recipientController;
|
||||||
|
late Worker dashboardActionWorker;
|
||||||
|
|
||||||
ForwardController() {
|
ForwardController() {
|
||||||
recipientController = ForwardRecipientController(
|
recipientController = ForwardRecipientController(
|
||||||
@@ -57,6 +59,7 @@ class ForwardController extends BaseController {
|
|||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
|
registerListenerWorker();
|
||||||
try {
|
try {
|
||||||
_getForwardInteractor = Get.find<GetForwardInteractor>();
|
_getForwardInteractor = Get.find<GetForwardInteractor>();
|
||||||
_deleteRecipientInForwardingInteractor = Get.find<DeleteRecipientInForwardingInteractor>();
|
_deleteRecipientInForwardingInteractor = Get.find<DeleteRecipientInForwardingInteractor>();
|
||||||
@@ -70,6 +73,7 @@ class ForwardController extends BaseController {
|
|||||||
@override
|
@override
|
||||||
void onClose() {
|
void onClose() {
|
||||||
recipientController.onClose();
|
recipientController.onClose();
|
||||||
|
unregisterListenerWorker();
|
||||||
super.onClose();
|
super.onClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,7 +180,6 @@ class ForwardController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final matchedRecipientForward = listRecipientForward.indexOf(recipientForward);
|
final matchedRecipientForward = listRecipientForward.indexOf(recipientForward);
|
||||||
log('ForwardController::selectRecipientForward(): matchedRecipientForward: $matchedRecipientForward');
|
|
||||||
if (matchedRecipientForward >= 0) {
|
if (matchedRecipientForward >= 0) {
|
||||||
final newRecipientForward = recipientForward.toggleSelection();
|
final newRecipientForward = recipientForward.toggleSelection();
|
||||||
listRecipientForward[matchedRecipientForward] = newRecipientForward;
|
listRecipientForward[matchedRecipientForward] = newRecipientForward;
|
||||||
@@ -231,7 +234,6 @@ class ForwardController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void addRecipientAction(BuildContext context, List<EmailAddress> listRecipientsSelected) {
|
void addRecipientAction(BuildContext context, List<EmailAddress> listRecipientsSelected) {
|
||||||
log('ForwardController::addRecipientAction():listRecipientsSelected: $listRecipientsSelected');
|
|
||||||
FocusScope.of(context).unfocus();
|
FocusScope.of(context).unfocus();
|
||||||
|
|
||||||
final accountId = accountDashBoardController.accountId.value;
|
final accountId = accountDashBoardController.accountId.value;
|
||||||
@@ -293,4 +295,20 @@ class ForwardController extends BaseController {
|
|||||||
currentForward.value = success.forward;
|
currentForward.value = success.forward;
|
||||||
listRecipientForward.value = currentForward.value!.listRecipientForward;
|
listRecipientForward.value = currentForward.value!.listRecipientForward;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void registerListenerWorker() {
|
||||||
|
dashboardActionWorker = ever(
|
||||||
|
accountDashBoardController.dashboardSettingAction,
|
||||||
|
(action) {
|
||||||
|
if (action is ClearAllInputForwarding) {
|
||||||
|
cancelSelectionMode();
|
||||||
|
recipientController.clearAll();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void unregisterListenerWorker() {
|
||||||
|
dashboardActionWorker.dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -31,7 +31,7 @@ class ForwardView extends GetWidget<ForwardController> with AppLoaderMixin {
|
|||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
color: SettingsUtils.getContentBackgroundColor(context, _responsiveUtils),
|
color: SettingsUtils.getContentBackgroundColor(context, _responsiveUtils),
|
||||||
decoration: SettingsUtils.getBoxDecorationForContent(context, _responsiveUtils),
|
decoration: SettingsUtils.getBoxDecorationForContent(context, _responsiveUtils),
|
||||||
margin: SettingsUtils.getMarginViewForSettingDetails(context, _responsiveUtils),
|
margin: SettingsUtils.getMarginViewForForwardSettingDetails(context, _responsiveUtils),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
@@ -45,15 +45,12 @@ class ForwardView extends GetWidget<ForwardController> with AppLoaderMixin {
|
|||||||
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||||
if (!_responsiveUtils.isWebDesktop(context))
|
if (!_responsiveUtils.isWebDesktop(context))
|
||||||
_buildTitleHeader(context),
|
_buildTitleHeader(context),
|
||||||
|
_buildKeepLocalSwitchButton(context),
|
||||||
|
_buildAddRecipientsFormWidget(context),
|
||||||
_buildLoadingView(),
|
_buildLoadingView(),
|
||||||
Obx(() {
|
Obx(() {
|
||||||
if (controller.currentForward.value != null) {
|
if (controller.listRecipientForward.isNotEmpty) {
|
||||||
return Column(children: [
|
return ListEmailForwardsWidget();
|
||||||
_buildKeepLocalSwitchButton(context),
|
|
||||||
_buildAddRecipientsFormWidget(context),
|
|
||||||
if (controller.listRecipientForward.isNotEmpty)
|
|
||||||
ListEmailForwardsWidget()
|
|
||||||
]);
|
|
||||||
} else {
|
} else {
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
@@ -68,9 +65,8 @@ class ForwardView extends GetWidget<ForwardController> with AppLoaderMixin {
|
|||||||
|
|
||||||
Widget _buildTitleHeader(BuildContext context) {
|
Widget _buildTitleHeader(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
color: Colors.white,
|
color: Colors.transparent,
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
margin: SettingsUtils.getMarginTitleHeaderForwarding(context, _responsiveUtils),
|
|
||||||
padding: SettingsUtils.getPaddingTitleHeaderForwarding(context, _responsiveUtils),
|
padding: SettingsUtils.getPaddingTitleHeaderForwarding(context, _responsiveUtils),
|
||||||
child: Text(
|
child: Text(
|
||||||
AppLocalizations.of(context).forwardingSettingExplanation,
|
AppLocalizations.of(context).forwardingSettingExplanation,
|
||||||
@@ -86,7 +82,7 @@ class ForwardView extends GetWidget<ForwardController> with AppLoaderMixin {
|
|||||||
Widget _buildKeepLocalSwitchButton(BuildContext context) {
|
Widget _buildKeepLocalSwitchButton(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
padding: const EdgeInsets.only(left: 24, top: 24, right: 24, bottom: 11),
|
padding: SettingsUtils.getPaddingKeepLocalSwitchButtonForwarding(context, _responsiveUtils),
|
||||||
child: Row(children: [
|
child: Row(children: [
|
||||||
Obx(() {
|
Obx(() {
|
||||||
return InkWell(
|
return InkWell(
|
||||||
|
|||||||
+11
-6
@@ -4,6 +4,7 @@ import 'package:core/presentation/resources/image_paths.dart';
|
|||||||
import 'package:core/presentation/utils/style_utils.dart';
|
import 'package:core/presentation/utils/style_utils.dart';
|
||||||
import 'package:core/presentation/views/button/icon_button_web.dart';
|
import 'package:core/presentation/views/button/icon_button_web.dart';
|
||||||
import 'package:core/presentation/views/image/avatar_builder.dart';
|
import 'package:core/presentation/views/image/avatar_builder.dart';
|
||||||
|
import 'package:core/utils/build_utils.dart';
|
||||||
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:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@@ -37,17 +38,21 @@ class EmailForwardItemWidget extends StatelessWidget {
|
|||||||
child: Material(
|
child: Material(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {},
|
onLongPress: () {
|
||||||
|
if (!BuildUtils.isWeb) {
|
||||||
|
onSelectRecipientCallback?.call(recipientForward);
|
||||||
|
}
|
||||||
|
},
|
||||||
customBorder: const RoundedRectangleBorder(
|
customBorder: const RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(12))),
|
borderRadius: BorderRadius.all(Radius.circular(12))),
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.all(12),
|
padding: const EdgeInsets.only(left: 12, bottom: 12, top: 12),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: _getBackgroundColor(),
|
color: _getBackgroundColor(),
|
||||||
borderRadius: BorderRadius.all(Radius.circular(
|
borderRadius: BorderRadius.all(Radius.circular(
|
||||||
recipientForward.selectMode == SelectMode.ACTIVE ? 12 : 0))
|
recipientForward.selectMode == SelectMode.ACTIVE ? 12 : 0))
|
||||||
),
|
),
|
||||||
child: Row(crossAxisAlignment: CrossAxisAlignment.center, children: [
|
child: Row(children: [
|
||||||
_buildAvatarIcon(_imagePaths),
|
_buildAvatarIcon(_imagePaths),
|
||||||
const SizedBox(width: 12),
|
const SizedBox(width: 12),
|
||||||
Expanded(child: Column(
|
Expanded(child: Column(
|
||||||
@@ -85,11 +90,11 @@ class EmailForwardItemWidget extends StatelessWidget {
|
|||||||
const SizedBox(width: 12),
|
const SizedBox(width: 12),
|
||||||
if (selectionMode == SelectMode.INACTIVE)
|
if (selectionMode == SelectMode.INACTIVE)
|
||||||
buildIconWeb(
|
buildIconWeb(
|
||||||
iconSize: 34,
|
iconSize: 30,
|
||||||
splashRadius: 25,
|
splashRadius: 20,
|
||||||
icon: SvgPicture.asset(_imagePaths.icDeleteRecipient),
|
icon: SvgPicture.asset(_imagePaths.icDeleteRecipient),
|
||||||
onTap: () => onDeleteRecipientCallback?.call(recipientForward)
|
onTap: () => onDeleteRecipientCallback?.call(recipientForward)
|
||||||
),
|
)
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
+24
-18
@@ -23,29 +23,35 @@ class ListEmailForwardsWidget extends GetWidget<ForwardController> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
color: Colors.white,
|
color: Colors.transparent,
|
||||||
margin: SettingsUtils.getPaddingListRecipientForwarding(context, _responsiveUtils),
|
padding: SettingsUtils.getPaddingListRecipientForwarding(context, _responsiveUtils),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
_buildTitleHeader(context),
|
_buildTitleHeader(context),
|
||||||
Obx(() {
|
Obx(() {
|
||||||
return ListView.builder(
|
if (controller.listRecipientForward.isEmpty) {
|
||||||
shrinkWrap: true,
|
return const SizedBox.shrink();
|
||||||
primary: false,
|
} else {
|
||||||
itemCount: controller.listRecipientForward.length,
|
return ListView.builder(
|
||||||
itemBuilder: (context, index) {
|
shrinkWrap: true,
|
||||||
return EmailForwardItemWidget(
|
primary: false,
|
||||||
controller.listRecipientForward[index],
|
itemCount: controller.listRecipientForward.length,
|
||||||
selectionMode: controller.selectionMode.value,
|
padding: EdgeInsets.zero,
|
||||||
onSelectRecipientCallback: controller.selectRecipientForward,
|
itemExtent: 75,
|
||||||
onDeleteRecipientCallback: (recipientForward) {
|
itemBuilder: (context, index) {
|
||||||
controller.deleteRecipients(context, recipientForward.emailAddress.emailAddress);
|
return EmailForwardItemWidget(
|
||||||
},
|
controller.listRecipientForward[index],
|
||||||
);
|
selectionMode: controller.selectionMode.value,
|
||||||
}
|
onSelectRecipientCallback: controller.selectRecipientForward,
|
||||||
);
|
onDeleteRecipientCallback: (recipientForward) {
|
||||||
|
controller.deleteRecipients(context, recipientForward.emailAddress.emailAddress);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
@@ -127,7 +133,7 @@ class ListEmailForwardsWidget extends GetWidget<ForwardController> {
|
|||||||
child: InkWell(
|
child: InkWell(
|
||||||
customBorder: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(5))),
|
customBorder: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(5))),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 12),
|
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 6),
|
||||||
child: Text(
|
child: Text(
|
||||||
AppLocalizations.of(context).remove,
|
AppLocalizations.of(context).remove,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import 'package:jmap_dart_client/jmap/mail/vacation/vacation_response.dart';
|
|||||||
import 'package:model/model.dart';
|
import 'package:model/model.dart';
|
||||||
import 'package:package_info_plus/package_info_plus.dart';
|
import 'package:package_info_plus/package_info_plus.dart';
|
||||||
import 'package:rule_filter/rule_filter/capability_rule_filter.dart';
|
import 'package:rule_filter/rule_filter/capability_rule_filter.dart';
|
||||||
|
import 'package:tmail_ui_user/features/base/action/ui_action.dart';
|
||||||
import 'package:tmail_ui_user/features/base/reloadable/reloadable_controller.dart';
|
import 'package:tmail_ui_user/features/base/reloadable/reloadable_controller.dart';
|
||||||
import 'package:tmail_ui_user/features/login/domain/usecases/delete_authority_oidc_interactor.dart';
|
import 'package:tmail_ui_user/features/login/domain/usecases/delete_authority_oidc_interactor.dart';
|
||||||
import 'package:tmail_ui_user/features/login/domain/usecases/get_authenticated_account_interactor.dart';
|
import 'package:tmail_ui_user/features/login/domain/usecases/get_authenticated_account_interactor.dart';
|
||||||
@@ -20,6 +21,7 @@ import 'package:tmail_ui_user/features/manage_account/domain/state/update_vacati
|
|||||||
import 'package:tmail_ui_user/features/manage_account/domain/usecases/get_all_vacation_interactor.dart';
|
import 'package:tmail_ui_user/features/manage_account/domain/usecases/get_all_vacation_interactor.dart';
|
||||||
import 'package:tmail_ui_user/features/manage_account/domain/usecases/log_out_oidc_interactor.dart';
|
import 'package:tmail_ui_user/features/manage_account/domain/usecases/log_out_oidc_interactor.dart';
|
||||||
import 'package:tmail_ui_user/features/manage_account/domain/usecases/update_vacation_interactor.dart';
|
import 'package:tmail_ui_user/features/manage_account/domain/usecases/update_vacation_interactor.dart';
|
||||||
|
import 'package:tmail_ui_user/features/manage_account/presentation/action/dashboard_setting_action.dart';
|
||||||
import 'package:tmail_ui_user/features/manage_account/presentation/email_rules/email_rules_bindings.dart';
|
import 'package:tmail_ui_user/features/manage_account/presentation/email_rules/email_rules_bindings.dart';
|
||||||
import 'package:tmail_ui_user/features/manage_account/presentation/extensions/vacation_response_extension.dart';
|
import 'package:tmail_ui_user/features/manage_account/presentation/extensions/vacation_response_extension.dart';
|
||||||
import 'package:tmail_ui_user/features/manage_account/presentation/forward/bindings/forward_bindings.dart';
|
import 'package:tmail_ui_user/features/manage_account/presentation/forward/bindings/forward_bindings.dart';
|
||||||
@@ -50,6 +52,7 @@ class ManageAccountDashBoardController extends ReloadableController {
|
|||||||
final settingsPageLevel = SettingsPageLevel.universal.obs;
|
final settingsPageLevel = SettingsPageLevel.universal.obs;
|
||||||
final sessionCurrent = Rxn<Session>();
|
final sessionCurrent = Rxn<Session>();
|
||||||
final vacationResponse = Rxn<VacationResponse>();
|
final vacationResponse = Rxn<VacationResponse>();
|
||||||
|
final dashboardSettingAction = Rxn<UIAction>();
|
||||||
|
|
||||||
ManageAccountDashBoardController(
|
ManageAccountDashBoardController(
|
||||||
LogoutOidcInteractor logoutOidcInteractor,
|
LogoutOidcInteractor logoutOidcInteractor,
|
||||||
@@ -169,6 +172,7 @@ class ManageAccountDashBoardController extends ReloadableController {
|
|||||||
bool get isMenuDrawerOpen => menuDrawerKey.currentState?.isDrawerOpen == true;
|
bool get isMenuDrawerOpen => menuDrawerKey.currentState?.isDrawerOpen == true;
|
||||||
|
|
||||||
void selectAccountMenuItem(AccountMenuItem newAccountMenuItem) {
|
void selectAccountMenuItem(AccountMenuItem newAccountMenuItem) {
|
||||||
|
clearInputFormView();
|
||||||
if(newAccountMenuItem == AccountMenuItem.emailRules) {
|
if(newAccountMenuItem == AccountMenuItem.emailRules) {
|
||||||
EmailRulesBindings().dependencies();
|
EmailRulesBindings().dependencies();
|
||||||
}
|
}
|
||||||
@@ -181,6 +185,16 @@ class ManageAccountDashBoardController extends ReloadableController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clearInputFormView() {
|
||||||
|
switch(accountMenuItemSelected.value) {
|
||||||
|
case AccountMenuItem.forward:
|
||||||
|
dispatchAction(ClearAllInputForwarding());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void _goToSettingMenuCurrent(AccountMenuItem accountMenuItem) {
|
void _goToSettingMenuCurrent(AccountMenuItem accountMenuItem) {
|
||||||
if(accountMenuItem == AccountMenuItem.emailRules) {
|
if(accountMenuItem == AccountMenuItem.emailRules) {
|
||||||
EmailRulesBindings().dependencies();
|
EmailRulesBindings().dependencies();
|
||||||
@@ -267,4 +281,15 @@ class ManageAccountDashBoardController extends ReloadableController {
|
|||||||
bool inVacationSettings() {
|
bool inVacationSettings() {
|
||||||
return accountMenuItemSelected.value == AccountMenuItem.vacation;
|
return accountMenuItemSelected.value == AccountMenuItem.vacation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void dispatchAction(UIAction newAction) {
|
||||||
|
log('ManageAccountDashBoardController::dispatchAction(): ${newAction.runtimeType}');
|
||||||
|
final previousAction = dashboardSettingAction.value;
|
||||||
|
if (newAction == previousAction) {
|
||||||
|
dashboardSettingAction.value = newAction;
|
||||||
|
dashboardSettingAction.refresh();
|
||||||
|
} else {
|
||||||
|
dashboardSettingAction.value = newAction;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -15,6 +15,7 @@ class SettingsController extends GetxController {
|
|||||||
|
|
||||||
void backToUniversalSettings() {
|
void backToUniversalSettings() {
|
||||||
log('SettingsController::backToUniversalSettings()');
|
log('SettingsController::backToUniversalSettings()');
|
||||||
|
manageAccountDashboardController.clearInputFormView();
|
||||||
manageAccountDashboardController.selectAccountMenuItem(AccountMenuItem.none);
|
manageAccountDashboardController.selectAccountMenuItem(AccountMenuItem.none);
|
||||||
manageAccountDashboardController.settingsPageLevel.value = SettingsPageLevel.universal;
|
manageAccountDashboardController.settingsPageLevel.value = SettingsPageLevel.universal;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,18 +32,34 @@ class SettingsView extends GetWidget<SettingsController> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return SafeArea(
|
return Column(
|
||||||
child: Column(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
children: [
|
||||||
children: [
|
SafeArea(
|
||||||
SizedBox.fromSize(
|
bottom: false,
|
||||||
|
child: SizedBox.fromSize(
|
||||||
size: const Size.fromHeight(52),
|
size: const Size.fromHeight(52),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: SettingsUtils.getPaddingAppBar(context, _responsiveUtils),
|
padding: SettingsUtils.getPaddingAppBar(context, _responsiveUtils),
|
||||||
child: _buildAppbar(context))),
|
child: _buildAppbar(context))),
|
||||||
const Divider(color: AppColor.colorDividerComposer, height: 1),
|
),
|
||||||
Obx(() {
|
const Divider(color: AppColor.colorDividerComposer, height: 1),
|
||||||
|
SafeArea(
|
||||||
|
bottom: false,
|
||||||
|
top: false,
|
||||||
|
child: Obx(() {
|
||||||
if (controller.manageAccountDashboardController.vacationResponse.value?.vacationResponderIsValid == true) {
|
if (controller.manageAccountDashboardController.vacationResponse.value?.vacationResponderIsValid == true) {
|
||||||
|
return VacationNotificationMessageWidget(
|
||||||
|
margin: const EdgeInsets.only(
|
||||||
|
left: BuildUtils.isWeb ? 24 : 16,
|
||||||
|
right: BuildUtils.isWeb ? 24 : 16,
|
||||||
|
top: 16),
|
||||||
|
fromAccountDashBoard: true,
|
||||||
|
vacationResponse: controller.manageAccountDashboardController.vacationResponse.value!,
|
||||||
|
actionEndNow: () => controller.manageAccountDashboardController.disableVacationResponder());
|
||||||
|
} else if ((controller.manageAccountDashboardController.vacationResponse.value?.vacationResponderIsWaiting == true
|
||||||
|
|| controller.manageAccountDashboardController.vacationResponse.value?.vacationResponderIsStopped == true)
|
||||||
|
&& controller.manageAccountDashboardController.inVacationSettings()) {
|
||||||
return VacationNotificationMessageWidget(
|
return VacationNotificationMessageWidget(
|
||||||
margin: const EdgeInsets.only(
|
margin: const EdgeInsets.only(
|
||||||
left: BuildUtils.isWeb ? 24 : 16,
|
left: BuildUtils.isWeb ? 24 : 16,
|
||||||
@@ -51,29 +67,22 @@ class SettingsView extends GetWidget<SettingsController> {
|
|||||||
top: 16),
|
top: 16),
|
||||||
fromAccountDashBoard: true,
|
fromAccountDashBoard: true,
|
||||||
vacationResponse: controller.manageAccountDashboardController.vacationResponse.value!,
|
vacationResponse: controller.manageAccountDashboardController.vacationResponse.value!,
|
||||||
actionEndNow: () => controller.manageAccountDashboardController.disableVacationResponder());
|
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
|
||||||
} else if ((controller.manageAccountDashboardController.vacationResponse.value?.vacationResponderIsWaiting == true
|
leadingIcon: const Padding(
|
||||||
|| controller.manageAccountDashboardController.vacationResponse.value?.vacationResponderIsStopped == true)
|
padding: EdgeInsets.only(right: 16),
|
||||||
&& controller.manageAccountDashboardController.inVacationSettings()) {
|
child: Icon(Icons.timer, size: 20),
|
||||||
return VacationNotificationMessageWidget(
|
)
|
||||||
margin: const EdgeInsets.only(
|
);
|
||||||
left: BuildUtils.isWeb ? 24 : 16,
|
|
||||||
right: BuildUtils.isWeb ? 24 : 16,
|
|
||||||
top: 16),
|
|
||||||
fromAccountDashBoard: true,
|
|
||||||
vacationResponse: controller.manageAccountDashboardController.vacationResponse.value!,
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
|
|
||||||
leadingIcon: const Padding(
|
|
||||||
padding: EdgeInsets.only(right: 16),
|
|
||||||
child: Icon(Icons.timer, size: 20),
|
|
||||||
));
|
|
||||||
} else {
|
} else {
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
}),
|
})
|
||||||
Expanded(child: _bodySettingsScreen())
|
),
|
||||||
]
|
Expanded(child: SafeArea(
|
||||||
)
|
top: false,
|
||||||
|
child: _bodySettingsScreen()
|
||||||
|
))
|
||||||
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,16 +119,14 @@ class SettingsView extends GetWidget<SettingsController> {
|
|||||||
|
|
||||||
Widget _buildSettingLevel1AppBar(BuildContext context) {
|
Widget _buildSettingLevel1AppBar(BuildContext context) {
|
||||||
return Stack(children: [
|
return Stack(children: [
|
||||||
if (_responsiveUtils.isPortraitMobile(context))
|
Align(
|
||||||
_buildBackButton(context)
|
|
||||||
else
|
|
||||||
Align(
|
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Material(
|
child: Material(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: controller.backToUniversalSettings,
|
onTap: controller.backToUniversalSettings,
|
||||||
borderRadius: BorderRadius.circular(15),
|
customBorder: const RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(15))),
|
||||||
child: Tooltip(
|
child: Tooltip(
|
||||||
message: AppLocalizations.of(context).back,
|
message: AppLocalizations.of(context).back,
|
||||||
child: Container(
|
child: Container(
|
||||||
@@ -160,21 +167,6 @@ class SettingsView extends GetWidget<SettingsController> {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildBackButton(BuildContext context) {
|
|
||||||
return Align(
|
|
||||||
alignment: Alignment.centerLeft,
|
|
||||||
child: buildIconWeb(
|
|
||||||
icon: SvgPicture.asset(_imagePaths.icBack,
|
|
||||||
width: 18,
|
|
||||||
height: 18,
|
|
||||||
color: AppColor.colorTextButton,
|
|
||||||
fit: BoxFit.fill),
|
|
||||||
tooltip: AppLocalizations.of(context).back,
|
|
||||||
onTap: controller.backToUniversalSettings
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget _buildCloseSettingButton(BuildContext context) {
|
Widget _buildCloseSettingButton(BuildContext context) {
|
||||||
return buildIconWeb(
|
return buildIconWeb(
|
||||||
icon: SvgPicture.asset(_imagePaths.icClose, width: 28, height: 28, fit: BoxFit.fill),
|
icon: SvgPicture.asset(_imagePaths.icClose, width: 28, height: 28, fit: BoxFit.fill),
|
||||||
|
|||||||
@@ -21,8 +21,10 @@ class SettingsUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static EdgeInsets getPaddingAppBar(BuildContext context, ResponsiveUtils responsiveUtils) {
|
static EdgeInsets getPaddingAppBar(BuildContext context, ResponsiveUtils responsiveUtils) {
|
||||||
if (responsiveUtils.isMobile(context)) {
|
if (responsiveUtils.isPortraitMobile(context)) {
|
||||||
return const EdgeInsets.symmetric(horizontal: 16);
|
return const EdgeInsets.symmetric(horizontal: 16);
|
||||||
|
} else if (responsiveUtils.isLandscapeMobile(context)) {
|
||||||
|
return const EdgeInsets.symmetric(horizontal: 12);
|
||||||
} else {
|
} else {
|
||||||
return const EdgeInsets.symmetric(horizontal: 32);
|
return const EdgeInsets.symmetric(horizontal: 32);
|
||||||
}
|
}
|
||||||
@@ -80,9 +82,11 @@ class SettingsUtils {
|
|||||||
|
|
||||||
static EdgeInsets getPaddingListRecipientForwarding(BuildContext context, ResponsiveUtils responsiveUtils) {
|
static EdgeInsets getPaddingListRecipientForwarding(BuildContext context, ResponsiveUtils responsiveUtils) {
|
||||||
if (responsiveUtils.isPortraitMobile(context)) {
|
if (responsiveUtils.isPortraitMobile(context)) {
|
||||||
return const EdgeInsets.only(left: 12, right: 12, bottom: 12);
|
return const EdgeInsets.symmetric(horizontal: 16);
|
||||||
|
} if (responsiveUtils.isLandscapeMobile(context)) {
|
||||||
|
return const EdgeInsets.all(12);
|
||||||
} else {
|
} else {
|
||||||
return const EdgeInsets.only(left: 24, right: 24, bottom: 24);
|
return const EdgeInsets.symmetric(horizontal: 32, vertical: 12);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,19 +97,49 @@ class SettingsUtils {
|
|||||||
color: Colors.white);
|
color: Colors.white);
|
||||||
}
|
}
|
||||||
|
|
||||||
static EdgeInsets getMarginTitleHeaderForwarding(BuildContext context, ResponsiveUtils responsiveUtils) {
|
static EdgeInsets getPaddingTitleHeaderForwarding(BuildContext context, ResponsiveUtils responsiveUtils) {
|
||||||
if (responsiveUtils.isPortraitMobile(context)) {
|
if (responsiveUtils.isPortraitMobile(context)) {
|
||||||
return EdgeInsets.zero;
|
return const EdgeInsets.symmetric(horizontal: 16, vertical: 12);
|
||||||
|
} if (responsiveUtils.isLandscapeMobile(context)) {
|
||||||
|
return const EdgeInsets.all(12);
|
||||||
} else {
|
} else {
|
||||||
return const EdgeInsets.symmetric(horizontal: 20);
|
return const EdgeInsets.symmetric(horizontal: 32, vertical: 12);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static EdgeInsets getPaddingTitleHeaderForwarding(BuildContext context, ResponsiveUtils responsiveUtils) {
|
static EdgeInsets getPaddingHeaderWidgetForwarding(BuildContext context, ResponsiveUtils responsiveUtils) {
|
||||||
if (responsiveUtils.isPortraitMobile(context)) {
|
if (responsiveUtils.isPortraitMobile(context)) {
|
||||||
return const EdgeInsets.only(left: 16, right: 16);
|
return const EdgeInsets.only(left: 16, right: 16);
|
||||||
} else {
|
} else {
|
||||||
return const EdgeInsets.all(12);
|
return const EdgeInsets.all(12);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static EdgeInsets getPaddingKeepLocalSwitchButtonForwarding(BuildContext context, ResponsiveUtils responsiveUtils) {
|
||||||
|
if (responsiveUtils.isPortraitMobile(context)) {
|
||||||
|
return const EdgeInsets.symmetric(horizontal: 18, vertical: 14);
|
||||||
|
} if (responsiveUtils.isLandscapeMobile(context)) {
|
||||||
|
return const EdgeInsets.all(14);
|
||||||
|
} else {
|
||||||
|
return const EdgeInsets.symmetric(horizontal: 34, vertical: 14);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static EdgeInsets getPaddingInputRecipientForwarding(BuildContext context, ResponsiveUtils responsiveUtils) {
|
||||||
|
if (responsiveUtils.isPortraitMobile(context)) {
|
||||||
|
return const EdgeInsets.symmetric(horizontal: 16, vertical: 12);
|
||||||
|
} if (responsiveUtils.isLandscapeMobile(context)) {
|
||||||
|
return const EdgeInsets.all(12);
|
||||||
|
} else {
|
||||||
|
return const EdgeInsets.symmetric(horizontal: 32, vertical: 12);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static EdgeInsets getMarginViewForForwardSettingDetails(BuildContext context, ResponsiveUtils responsiveUtils) {
|
||||||
|
if (responsiveUtils.isWebDesktop(context)) {
|
||||||
|
return const EdgeInsets.all(16);
|
||||||
|
} else {
|
||||||
|
return EdgeInsets.zero;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"@@last_modified": "2022-11-04T00:32:44.924510",
|
"@@last_modified": "2022-11-08T16:55:51.988372",
|
||||||
"initializing_data": "Initializing data...",
|
"initializing_data": "Initializing data...",
|
||||||
"@initializing_data": {
|
"@initializing_data": {
|
||||||
"type": "text",
|
"type": "text",
|
||||||
@@ -2046,8 +2046,8 @@
|
|||||||
"placeholders_order": [],
|
"placeholders_order": [],
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
},
|
},
|
||||||
"recipientsLabel": "Enter name or email address",
|
"hintInputAutocompleteContact": "Enter name or email address",
|
||||||
"@recipientsLabel": {
|
"@hintInputAutocompleteContact": {
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders_order": [],
|
"placeholders_order": [],
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
@@ -2441,5 +2441,15 @@
|
|||||||
"type": "text",
|
"type": "text",
|
||||||
"placeholders_order": [],
|
"placeholders_order": [],
|
||||||
"placeholders": {}
|
"placeholders": {}
|
||||||
|
},
|
||||||
|
"totalEmailSelected": "Deselect all ({count})",
|
||||||
|
"@totalEmailSelected": {
|
||||||
|
"type": "text",
|
||||||
|
"placeholders_order": [
|
||||||
|
"count"
|
||||||
|
],
|
||||||
|
"placeholders": {
|
||||||
|
"count": {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2110,7 +2110,7 @@ class AppLocalizations {
|
|||||||
String get hintInputAutocompleteContact {
|
String get hintInputAutocompleteContact {
|
||||||
return Intl.message(
|
return Intl.message(
|
||||||
'Enter name or email address',
|
'Enter name or email address',
|
||||||
name: 'recipientsLabel',
|
name: 'hintInputAutocompleteContact',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user