TF-2196 Add 'From'to recipient widget
(cherry picked from commit b2e443ab6df966526bb6fd3cdc24915b3b5c48cb)
This commit is contained in:
@@ -40,6 +40,7 @@ class RecipientComposerWidget extends StatefulWidget {
|
|||||||
final PrefixEmailAddress prefix;
|
final PrefixEmailAddress prefix;
|
||||||
final List<EmailAddress> listEmailAddress;
|
final List<EmailAddress> listEmailAddress;
|
||||||
final ExpandMode expandMode;
|
final ExpandMode expandMode;
|
||||||
|
final PrefixRecipientState fromState;
|
||||||
final PrefixRecipientState ccState;
|
final PrefixRecipientState ccState;
|
||||||
final PrefixRecipientState bccState;
|
final PrefixRecipientState bccState;
|
||||||
final bool? isInitial;
|
final bool? isInitial;
|
||||||
@@ -66,6 +67,7 @@ class RecipientComposerWidget extends StatefulWidget {
|
|||||||
required this.listEmailAddress,
|
required this.listEmailAddress,
|
||||||
this.ccState = PrefixRecipientState.disabled,
|
this.ccState = PrefixRecipientState.disabled,
|
||||||
this.bccState = PrefixRecipientState.disabled,
|
this.bccState = PrefixRecipientState.disabled,
|
||||||
|
this.fromState = PrefixRecipientState.disabled,
|
||||||
this.isInitial,
|
this.isInitial,
|
||||||
this.controller,
|
this.controller,
|
||||||
this.focusNode,
|
this.focusNode,
|
||||||
@@ -301,6 +303,15 @@ class _RecipientComposerWidgetState extends State<RecipientComposerWidget> {
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
const SizedBox(width: RecipientComposerWidgetStyle.space),
|
const SizedBox(width: RecipientComposerWidgetStyle.space),
|
||||||
|
if (widget.prefix == PrefixEmailAddress.to && widget.fromState == PrefixRecipientState.disabled)
|
||||||
|
TMailButtonWidget.fromText(
|
||||||
|
text: AppLocalizations.of(context).from_email_address_prefix,
|
||||||
|
textStyle: RecipientComposerWidgetStyle.prefixButtonTextStyle,
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
padding: RecipientComposerWidgetStyle.prefixButtonPadding,
|
||||||
|
margin: RecipientComposerWidgetStyle.recipientMargin,
|
||||||
|
onTapActionCallback: () => widget.onAddEmailAddressTypeAction?.call(PrefixEmailAddress.from),
|
||||||
|
),
|
||||||
if (widget.prefix == PrefixEmailAddress.to && widget.ccState == PrefixRecipientState.disabled)
|
if (widget.prefix == PrefixEmailAddress.to && widget.ccState == PrefixRecipientState.disabled)
|
||||||
TMailButtonWidget.fromText(
|
TMailButtonWidget.fromText(
|
||||||
text: AppLocalizations.of(context).cc_email_address_prefix,
|
text: AppLocalizations.of(context).cc_email_address_prefix,
|
||||||
|
|||||||
Reference in New Issue
Block a user