Skip to content

feat(MessageService): Manually control when to close message and update message content #6034

@syminomega

Description

@syminomega

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

I want to update the current message witch has not been closed, and then I want to close the message through the code.

Describe the solution you'd like

var msgOption = new MessageOption(){
  Id="loadingMsg",
  Content="Downloading...",
  Color= Color.Info
// do not autoHide
}
// do not use the await to block
_ = MessageService.ShowAsync(msgOption);
// my download processing
// update message after download
msgOption.Content="loading finished!";
msgOption.Color=Color.Success;
msgOption.IsAutoHide = true;
// update the previous message, and wait until close
await MessageService.ShowAsync(msgOption);

Additional context

No response

Sub-issues

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions