Fix bug subject email deleted when compose email
This commit is contained in:
@@ -11,44 +11,40 @@ class TextFieldBuilder {
|
|||||||
int? _maxLines = 1;
|
int? _maxLines = 1;
|
||||||
TextEditingController? _textController;
|
TextEditingController? _textController;
|
||||||
|
|
||||||
TextFieldBuilder key(Key key) {
|
void key(Key key) {
|
||||||
_key = key;
|
_key = key;
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TextFieldBuilder onChange(ValueChanged<String> onChange) {
|
void onChange(ValueChanged<String> onChange) {
|
||||||
_onTextChange = onChange;
|
_onTextChange = onChange;
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TextFieldBuilder textStyle(TextStyle style) {
|
void textStyle(TextStyle style) {
|
||||||
_textStyle = style;
|
_textStyle = style;
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TextFieldBuilder textInputAction(TextInputAction inputAction) {
|
void textInputAction(TextInputAction inputAction) {
|
||||||
_textInputAction = inputAction;
|
_textInputAction = inputAction;
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TextFieldBuilder textDecoration(InputDecoration inputDecoration) {
|
void textDecoration(InputDecoration inputDecoration) {
|
||||||
_inputDecoration = inputDecoration;
|
_inputDecoration = inputDecoration;
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TextFieldBuilder obscureText(bool obscureText) {
|
void obscureText(bool obscureText) {
|
||||||
_obscureText = obscureText;
|
_obscureText = obscureText;
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TextFieldBuilder setText(String value) {
|
void setText(String value) {
|
||||||
_textController = TextEditingController.fromValue(TextEditingValue(text: value));
|
_textController = TextEditingController.fromValue(TextEditingValue(text: value));
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TextFieldBuilder maxLines(int? value) {
|
void addController(TextEditingController textEditingController) {
|
||||||
|
_textController = textEditingController;
|
||||||
|
}
|
||||||
|
|
||||||
|
void maxLines(int? value) {
|
||||||
_maxLines = value;
|
_maxLines = value;
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField build() {
|
TextField build() {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'package:core/core.dart';
|
import 'package:core/core.dart';
|
||||||
import 'package:core/presentation/utils/app_toast.dart';
|
import 'package:core/presentation/utils/app_toast.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:html_editor_enhanced/html_editor.dart';
|
import 'package:html_editor_enhanced/html_editor.dart';
|
||||||
import 'package:tmail_ui_user/features/composer/data/datasource/autocomplete_datasource.dart';
|
import 'package:tmail_ui_user/features/composer/data/datasource/autocomplete_datasource.dart';
|
||||||
@@ -45,12 +46,15 @@ class ComposerBindings extends Bindings {
|
|||||||
Get.lazyPut(() => SearchEmailAddressInteractor(Get.find<AutoCompleteRepository>()));
|
Get.lazyPut(() => SearchEmailAddressInteractor(Get.find<AutoCompleteRepository>()));
|
||||||
Get.lazyPut(() => Uuid());
|
Get.lazyPut(() => Uuid());
|
||||||
Get.lazyPut(() => HtmlEditorController());
|
Get.lazyPut(() => HtmlEditorController());
|
||||||
|
Get.lazyPut(() => TextEditingController());
|
||||||
Get.lazyPut(() => ComposerController(
|
Get.lazyPut(() => ComposerController(
|
||||||
Get.find<SendEmailInteractor>(),
|
Get.find<SendEmailInteractor>(),
|
||||||
Get.find<SaveEmailAddressesInteractor>(),
|
Get.find<SaveEmailAddressesInteractor>(),
|
||||||
Get.find<SearchEmailAddressInteractor>(),
|
Get.find<SearchEmailAddressInteractor>(),
|
||||||
Get.find<AppToast>(),
|
Get.find<AppToast>(),
|
||||||
Get.find<Uuid>(),
|
Get.find<Uuid>(),
|
||||||
Get.find<HtmlEditorController>()));
|
Get.find<HtmlEditorController>(),
|
||||||
|
Get.find<TextEditingController>(),
|
||||||
|
Get.find<HtmlMessagePurifier>()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -42,7 +42,9 @@ class ComposerController extends BaseController {
|
|||||||
final SearchEmailAddressInteractor _searchEmailAddressInteractor;
|
final SearchEmailAddressInteractor _searchEmailAddressInteractor;
|
||||||
final AppToast _appToast;
|
final AppToast _appToast;
|
||||||
final Uuid _uuid;
|
final Uuid _uuid;
|
||||||
final HtmlEditorController htmlEditorController;
|
final HtmlEditorController composerEditorController;
|
||||||
|
final TextEditingController subjectEmailInputController;
|
||||||
|
final HtmlMessagePurifier _htmlMessagePurifier;
|
||||||
|
|
||||||
List<EmailAddress> listToEmailAddress = [];
|
List<EmailAddress> listToEmailAddress = [];
|
||||||
List<EmailAddress> listCcEmailAddress = [];
|
List<EmailAddress> listCcEmailAddress = [];
|
||||||
@@ -57,7 +59,9 @@ class ComposerController extends BaseController {
|
|||||||
this._searchEmailAddressInteractor,
|
this._searchEmailAddressInteractor,
|
||||||
this._appToast,
|
this._appToast,
|
||||||
this._uuid,
|
this._uuid,
|
||||||
this.htmlEditorController,
|
this.composerEditorController,
|
||||||
|
this.subjectEmailInputController,
|
||||||
|
this._htmlMessagePurifier,
|
||||||
);
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -92,19 +96,28 @@ class ComposerController extends BaseController {
|
|||||||
if (arguments is ComposerArguments) {
|
if (arguments is ComposerArguments) {
|
||||||
composerArguments.value = arguments;
|
composerArguments.value = arguments;
|
||||||
_initToEmailAddress();
|
_initToEmailAddress();
|
||||||
|
_initSubjectEmail();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EmailActionType getEmailActionType() => composerArguments.value != null
|
void _initSubjectEmail() {
|
||||||
? composerArguments.value!.emailActionType
|
if (composerArguments.value != null
|
||||||
: EmailActionType.compose;
|
&& composerArguments.value?.presentationEmail != null
|
||||||
|
&& Get.context != null) {
|
||||||
String getEmailSubject(BuildContext context) {
|
final subject = '${composerArguments.value!.emailActionType.prefixSubjectComposer(Get.context!)} '
|
||||||
if (composerArguments.value != null && composerArguments.value?.presentationEmail != null) {
|
'${composerArguments.value!.presentationEmail?.subject}';
|
||||||
final subject = composerArguments.value!.presentationEmail?.subject;
|
setSubjectEmail(subject);
|
||||||
return '${composerArguments.value!.emailActionType.prefixSubjectComposer(context)} $subject';
|
subjectEmailInputController.text = subject;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void initContentEmail() {
|
||||||
|
if (composerArguments.value != null
|
||||||
|
&& composerArguments.value!.emailActionType != EmailActionType.compose
|
||||||
|
&& Get.context != null) {
|
||||||
|
final contentEmailQuoted = _getBodyEmailQuotedAsHtml(Get.context!, _htmlMessagePurifier);
|
||||||
|
composerEditorController.setText(contentEmailQuoted);
|
||||||
}
|
}
|
||||||
return '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Tuple2<String, String>? getHeaderEmailQuoted(String locale) {
|
Tuple2<String, String>? getHeaderEmailQuoted(String locale) {
|
||||||
@@ -176,14 +189,10 @@ class ComposerController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String getBodyEmailQuotedAsHtml(BuildContext context, HtmlMessagePurifier htmlMessagePurifier) {
|
String _getBodyEmailQuotedAsHtml(BuildContext context, HtmlMessagePurifier htmlMessagePurifier) {
|
||||||
final headerEmailQuoted = getHeaderEmailQuoted(Localizations.localeOf(context).toLanguageTag());
|
final headerEmailQuoted = getHeaderEmailQuoted(Localizations.localeOf(context).toLanguageTag());
|
||||||
final contentEmail = getContentEmailQuoted();
|
final contentEmail = getContentEmailQuoted();
|
||||||
|
|
||||||
final placeHolderBodyEmailEditor = AppLocalizations.of(context).hint_content_email_composer
|
|
||||||
.addBlockTag('p', attribute: 'style=\"font-size:14px;color:#182952;\"')
|
|
||||||
.addNewLineTag();
|
|
||||||
|
|
||||||
final headerEmailQuotedAsHtml = headerEmailQuoted != null
|
final headerEmailQuotedAsHtml = headerEmailQuoted != null
|
||||||
? AppLocalizations.of(context).header_email_quoted(headerEmailQuoted.value1, headerEmailQuoted.value2)
|
? AppLocalizations.of(context).header_email_quoted(headerEmailQuoted.value1, headerEmailQuoted.value2)
|
||||||
.addBlockTag('p', attribute: 'style=\"font-size:14px;font-style:italic;color:#182952;\"')
|
.addBlockTag('p', attribute: 'style=\"font-size:14px;font-style:italic;color:#182952;\"')
|
||||||
@@ -207,7 +216,7 @@ class ComposerController extends BaseController {
|
|||||||
.addNewLineTag(count: 2);
|
.addNewLineTag(count: 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
final emailQuotedHtml = '$placeHolderBodyEmailEditor$headerEmailQuotedAsHtml$trustAsHtml'
|
final emailQuotedHtml = '$headerEmailQuotedAsHtml$trustAsHtml'
|
||||||
.addBlockTag('div', attribute: 'style=\"padding-right:16px;padding-left:16px;background-color:#FBFBFF;width:100%\"');
|
.addBlockTag('div', attribute: 'style=\"padding-right:16px;padding-left:16px;background-color:#FBFBFF;width:100%\"');
|
||||||
|
|
||||||
return emailQuotedHtml;
|
return emailQuotedHtml;
|
||||||
@@ -222,7 +231,7 @@ class ComposerController extends BaseController {
|
|||||||
final generatePartId = PartId(_uuid.v1());
|
final generatePartId = PartId(_uuid.v1());
|
||||||
final generateBlobId = Id(_uuid.v1());
|
final generateBlobId = Id(_uuid.v1());
|
||||||
|
|
||||||
final emailBodyText = await htmlEditorController.getText();
|
final emailBodyText = await composerEditorController.getText();
|
||||||
|
|
||||||
return Email(
|
return Email(
|
||||||
generateEmailId,
|
generateEmailId,
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import 'package:flutter/cupertino.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:html_editor_enhanced/html_editor.dart';
|
import 'package:html_editor_enhanced/html_editor.dart';
|
||||||
import 'package:model/email/email_action_type.dart';
|
|
||||||
import 'package:tmail_ui_user/features/composer/presentation/composer_controller.dart';
|
import 'package:tmail_ui_user/features/composer/presentation/composer_controller.dart';
|
||||||
import 'package:tmail_ui_user/features/composer/presentation/widgets/email_address_composer_widget_builder.dart';
|
import 'package:tmail_ui_user/features/composer/presentation/widgets/email_address_composer_widget_builder.dart';
|
||||||
import 'package:tmail_ui_user/features/composer/presentation/widgets/top_bar_composer_widget_builder.dart';
|
import 'package:tmail_ui_user/features/composer/presentation/widgets/top_bar_composer_widget_builder.dart';
|
||||||
@@ -13,35 +12,36 @@ class ComposerView extends GetWidget<ComposerController> {
|
|||||||
|
|
||||||
final responsiveUtils = Get.find<ResponsiveUtils>();
|
final responsiveUtils = Get.find<ResponsiveUtils>();
|
||||||
final imagePaths = Get.find<ImagePaths>();
|
final imagePaths = Get.find<ImagePaths>();
|
||||||
final htmlMessagePurifier = Get.find<HtmlMessagePurifier>();
|
|
||||||
final keyboardUtils = Get.find<KeyboardUtils>();
|
final keyboardUtils = Get.find<KeyboardUtils>();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return GestureDetector(
|
||||||
resizeToAvoidBottomInset: false,
|
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
|
||||||
backgroundColor: AppColor.primaryLightColor,
|
child: Scaffold(
|
||||||
body: SafeArea(
|
resizeToAvoidBottomInset: false,
|
||||||
right: false,
|
backgroundColor: AppColor.primaryLightColor,
|
||||||
left: false,
|
body: SafeArea(
|
||||||
child: Container(
|
right: false,
|
||||||
margin: EdgeInsets.zero,
|
left: false,
|
||||||
alignment: Alignment.topCenter,
|
child: Container(
|
||||||
child: Column(
|
margin: EdgeInsets.zero,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
alignment: Alignment.topCenter,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
_buildTopBar(context),
|
mainAxisSize: MainAxisSize.max,
|
||||||
Expanded(
|
children: [
|
||||||
child: Container(
|
_buildTopBar(context),
|
||||||
|
Expanded(child: Container(
|
||||||
color: AppColor.bgComposer,
|
color: AppColor.bgComposer,
|
||||||
margin: EdgeInsets.zero,
|
margin: EdgeInsets.zero,
|
||||||
alignment: Alignment.topCenter,
|
alignment: Alignment.topCenter,
|
||||||
child: _buildEmailBody(context)))
|
child: _buildBodyComposer(context)))
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ class ComposerView extends GetWidget<ComposerController> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildEmailHeaderField(BuildContext context) {
|
Widget _buildEmailHeader(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.zero,
|
margin: EdgeInsets.zero,
|
||||||
padding: EdgeInsets.only(top: 20),
|
padding: EdgeInsets.only(top: 20),
|
||||||
@@ -67,12 +67,7 @@ class ComposerView extends GetWidget<ComposerController> {
|
|||||||
padding: EdgeInsets.symmetric(horizontal: 24),
|
padding: EdgeInsets.symmetric(horizontal: 24),
|
||||||
child: _buildEmailAddress(context)),
|
child: _buildEmailAddress(context)),
|
||||||
_buildSubjectEmail(context),
|
_buildSubjectEmail(context),
|
||||||
Container(
|
Divider(color: AppColor.dividerColor, height: 1)
|
||||||
margin: EdgeInsets.zero,
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
height: 1,
|
|
||||||
color: AppColor.dividerColor,
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -97,55 +92,55 @@ class ComposerView extends GetWidget<ComposerController> {
|
|||||||
Widget _buildSubjectEmail(BuildContext context) {
|
Widget _buildSubjectEmail(BuildContext context) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsets.only(left: 24, right: 24, bottom: 10, top: 8),
|
padding: EdgeInsets.only(left: 24, right: 24, bottom: 10, top: 8),
|
||||||
child: Obx(() => TextFieldBuilder()
|
child: (TextFieldBuilder()
|
||||||
.key(Key('subject_email_input'))
|
..key(Key('subject_email_input'))
|
||||||
.textInputAction(TextInputAction.newline)
|
..textInputAction(TextInputAction.newline)
|
||||||
.maxLines(null)
|
..maxLines(null)
|
||||||
.onChange((value) => controller.setSubjectEmail(value))
|
..onChange((value) => controller.setSubjectEmail(value))
|
||||||
.textStyle(TextStyle(color: AppColor.nameUserColor, fontSize: 14, fontWeight: FontWeight.w500))
|
..textStyle(TextStyle(color: AppColor.nameUserColor, fontSize: 14, fontWeight: FontWeight.w500))
|
||||||
.textDecoration(InputDecoration(
|
..textDecoration(InputDecoration(
|
||||||
hintText: AppLocalizations.of(context).subject_email,
|
hintText: AppLocalizations.of(context).subject_email,
|
||||||
hintStyle: TextStyle(color: AppColor.baseTextColor, fontSize: 14, fontWeight: FontWeight.w500),
|
hintStyle: TextStyle(color: AppColor.baseTextColor, fontSize: 14, fontWeight: FontWeight.w500),
|
||||||
contentPadding: EdgeInsets.zero,
|
contentPadding: EdgeInsets.zero,
|
||||||
filled: true,
|
filled: true,
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
fillColor: AppColor.bgComposer))
|
fillColor: AppColor.bgComposer))
|
||||||
.setText(controller.getEmailSubject(context))
|
..addController(controller.subjectEmailInputController))
|
||||||
.build()),
|
.build()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildEmailBody(BuildContext context) {
|
Widget _buildBodyComposer(BuildContext context) {
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
physics: ClampingScrollPhysics(),
|
physics: ClampingScrollPhysics(),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
_buildEmailHeaderField(context),
|
_buildEmailHeader(context),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(bottom: 30, top: 16, left: 16, right: 16),
|
padding: EdgeInsets.only(bottom: 30, top: 16, left: 16, right: 16),
|
||||||
child: _buildEmailBodyEditorQuoted(context),
|
child: _buildComposerEditer(context),
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildEmailBodyEditorQuoted(BuildContext context) {
|
Widget _buildComposerEditer(BuildContext context) {
|
||||||
return Obx(() => HtmlEditor(
|
return HtmlEditor(
|
||||||
key: Key('email_body_editor_quoted'),
|
key: Key('email_body_editor_quoted'),
|
||||||
controller: controller.htmlEditorController,
|
controller: controller.composerEditorController,
|
||||||
htmlEditorOptions: HtmlEditorOptions(
|
htmlEditorOptions: HtmlEditorOptions(
|
||||||
hint: AppLocalizations.of(context).hint_content_email_composer,
|
hint: AppLocalizations.of(context).hint_content_email_composer,
|
||||||
initialText: controller.getEmailActionType() != EmailActionType.compose
|
|
||||||
? controller.getBodyEmailQuotedAsHtml(context, htmlMessagePurifier)
|
|
||||||
: null,
|
|
||||||
shouldEnsureVisible: true),
|
shouldEnsureVisible: true),
|
||||||
otherOptions: OtherOptions(decoration: BoxDecoration()),
|
otherOptions: OtherOptions(decoration: BoxDecoration()),
|
||||||
callbacks: Callbacks(
|
callbacks: Callbacks(
|
||||||
onFocus: () {
|
onFocus: () {
|
||||||
FocusScope.of(context).unfocus();
|
FocusManager.instance.primaryFocus?.unfocus();
|
||||||
|
},
|
||||||
|
onInit: () {
|
||||||
|
controller.initContentEmail();
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
));
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -66,9 +66,9 @@ class EmailController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void onClose() {
|
||||||
super.dispose();
|
|
||||||
mailboxDashBoardController.selectedEmail.close();
|
mailboxDashBoardController.selectedEmail.close();
|
||||||
|
super.onClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
void _getEmailContentAction(AccountId accountId, EmailId emailId) async {
|
void _getEmailContentAction(AccountId accountId, EmailId emailId) async {
|
||||||
|
|||||||
@@ -91,14 +91,14 @@ class LoginView extends GetWidget<LoginController> {
|
|||||||
padding: EdgeInsets.only(bottom: 16),
|
padding: EdgeInsets.only(bottom: 16),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: responsiveUtils.getWidthLoginTextField(context),
|
width: responsiveUtils.getWidthLoginTextField(context),
|
||||||
child: TextFieldBuilder()
|
child: (TextFieldBuilder()
|
||||||
.key(Key('login_url_input'))
|
..key(Key('login_url_input'))
|
||||||
.onChange((value) => loginController.setUrlText(value))
|
..onChange((value) => loginController.setUrlText(value))
|
||||||
.textInputAction(TextInputAction.next)
|
..textInputAction(TextInputAction.next)
|
||||||
.textDecoration(LoginInputDecorationBuilder()
|
..textDecoration(LoginInputDecorationBuilder()
|
||||||
.setLabelText(AppLocalizations.of(context).prefix_https)
|
.setLabelText(AppLocalizations.of(context).prefix_https)
|
||||||
.setPrefixText(AppLocalizations.of(context).prefix_https)
|
.setPrefixText(AppLocalizations.of(context).prefix_https)
|
||||||
.build())
|
.build()))
|
||||||
.build()));
|
.build()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,14 +107,14 @@ class LoginView extends GetWidget<LoginController> {
|
|||||||
padding: EdgeInsets.only(bottom: 16),
|
padding: EdgeInsets.only(bottom: 16),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: responsiveUtils.getWidthLoginTextField(context),
|
width: responsiveUtils.getWidthLoginTextField(context),
|
||||||
child: TextFieldBuilder()
|
child: (TextFieldBuilder()
|
||||||
.key(Key('login_username_input'))
|
..key(Key('login_username_input'))
|
||||||
.onChange((value) => loginController.setUserNameText(value))
|
..onChange((value) => loginController.setUserNameText(value))
|
||||||
.textInputAction(TextInputAction.next)
|
..textInputAction(TextInputAction.next)
|
||||||
.textDecoration(LoginInputDecorationBuilder()
|
..textDecoration(LoginInputDecorationBuilder()
|
||||||
.setLabelText(AppLocalizations.of(context).username)
|
.setLabelText(AppLocalizations.of(context).username)
|
||||||
.setHintText(AppLocalizations.of(context).username)
|
.setHintText(AppLocalizations.of(context).username)
|
||||||
.build())
|
.build()))
|
||||||
.build()));
|
.build()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,15 +123,15 @@ class LoginView extends GetWidget<LoginController> {
|
|||||||
padding: EdgeInsets.only(bottom: 40),
|
padding: EdgeInsets.only(bottom: 40),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: responsiveUtils.getWidthLoginTextField(context),
|
width: responsiveUtils.getWidthLoginTextField(context),
|
||||||
child: TextFieldBuilder()
|
child: (TextFieldBuilder()
|
||||||
.key(Key('login_password_input'))
|
..key(Key('login_password_input'))
|
||||||
.obscureText(true)
|
..obscureText(true)
|
||||||
.onChange((value) => loginController.setPasswordText(value))
|
..onChange((value) => loginController.setPasswordText(value))
|
||||||
.textInputAction(TextInputAction.done)
|
..textInputAction(TextInputAction.done)
|
||||||
.textDecoration(LoginInputDecorationBuilder()
|
..textDecoration(LoginInputDecorationBuilder()
|
||||||
.setLabelText(AppLocalizations.of(context).password)
|
.setLabelText(AppLocalizations.of(context).password)
|
||||||
.setHintText(AppLocalizations.of(context).password)
|
.setHintText(AppLocalizations.of(context).password)
|
||||||
.build())
|
.build()))
|
||||||
.build()));
|
.build()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,9 +57,9 @@ class MailboxController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void onClose() {
|
||||||
super.dispose();
|
|
||||||
mailboxDashBoardController.accountId.close();
|
mailboxDashBoardController.accountId.close();
|
||||||
|
super.onClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
void refreshGetAllMailboxAction() {
|
void refreshGetAllMailboxAction() {
|
||||||
|
|||||||
@@ -80,10 +80,10 @@ class ThreadController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void onClose() {
|
||||||
mailboxDashBoardController.selectedMailbox.close();
|
mailboxDashBoardController.selectedMailbox.close();
|
||||||
listEmailController.dispose();
|
listEmailController.dispose();
|
||||||
super.dispose();
|
super.onClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
Reference in New Issue
Block a user