TF-2237 Add loading circular for send button

(cherry picked from commit d9db8f467942f16b70140113e222985b61db047a)
This commit is contained in:
hieubt
2023-10-25 00:12:40 +07:00
committed by Dat H. Pham
parent d26f86c844
commit f7baf72a7c
3 changed files with 24 additions and 8 deletions
@@ -435,6 +435,7 @@ class ComposerView extends GetWidget<ComposerController> {
radius: ComposerStyle.popupMenuRadius
);
},
isSending: controller.isSendEmailLoading.value,
)),
]);
},
@@ -19,6 +19,7 @@ class BottomBarComposerWidget extends StatelessWidget {
final VoidCallback saveToDraftAction;
final VoidCallback sendMessageAction;
final OnRequestReadReceiptAction? requestReadReceiptAction;
final bool? isSending;
final _imagePaths = Get.find<ImagePaths>();
@@ -34,6 +35,7 @@ class BottomBarComposerWidget extends StatelessWidget {
required this.saveToDraftAction,
required this.sendMessageAction,
this.requestReadReceiptAction,
this.isSending,
});
@override
@@ -126,7 +128,7 @@ class BottomBarComposerWidget extends StatelessWidget {
),
const SizedBox(width: BottomBarComposerWidgetStyle.sendButtonSpace),
TMailButtonWidget(
text: AppLocalizations.of(context).send,
text: isSending! ? AppLocalizations.of(context).sending : AppLocalizations.of(context).send,
icon: _imagePaths.icSend,
iconAlignment: TextDirection.rtl,
padding: BottomBarComposerWidgetStyle.sendButtonPadding,
@@ -136,6 +138,7 @@ class BottomBarComposerWidget extends StatelessWidget {
backgroundColor: BottomBarComposerWidgetStyle.sendButtonBackgroundColor,
borderRadius: BottomBarComposerWidgetStyle.sendButtonRadius,
onTapActionCallback: sendMessageAction,
isLoading: isSending,
)
]
),