MimeMessageDownloader class
Downloads the mime message contents if required before showing them within a MimeMessageViewer.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- MimeMessageDownloader
Constructors
-
MimeMessageDownloader({Key? key, required MimeMessage mimeMessage, required MailClient mailClient, Future<
MimeMessage> fetchMessageContents(MimeMessage message, {List<MediaToptype> ? includedInlineTypes, bool markAsSeen, int? maxSize, Duration? responseTimeout})?, int maxDownloadSize = 128 * 1024, int? maxImageWidth, String downloadErrorMessage = 'Unable to download message.', bool markAsSeen = false, Duration? downloadTimeout, List<MediaToptype> ? includedInlineTypes, void onDownloaded(MimeMessage message)?, bool adjustHeight = true, bool blockExternalImages = false, bool preferPlainText = false, bool enableDarkMode = false, String? emptyMessageText, Future mailtoDelegate(Uri mailto, MimeMessage mimeMessage)?, Future showMediaDelegate(InteractiveMediaWidget mediaWidget)?, Future<bool> urlLauncherDelegate(String url)?, void onWebViewCreated(InAppWebViewController controller)?, void onZoomed(InAppWebViewController controller, double zoomFactor)?, void onError(Object? exception, StackTrace? stackTrace)?, Widget? builder(BuildContext context, MimeMessage mimeMessage)?}) -
Creates a new message downloader widget
const
Properties
- adjustHeight → bool
-
Should the height of the displayed mime message be limited?
final
- blockExternalImages → bool
-
Defines if external images should be removed
final
- builder → (Widget? Function(BuildContext context, MimeMessage mimeMessage)?)
-
With a builder you can take over the rendering
for certain messages or mime types.
final
- downloadErrorMessage → String
-
The error message to be shown when message downloading failed
final
- downloadTimeout → Duration?
-
The optional timeout for the download operation
final
- emptyMessageText → String?
-
The text shown when an image has no inline content
final
- enableDarkMode → bool
-
Defines if dark mode should be enabled.
final
-
fetchMessageContents
→ (Future<
MimeMessage> Function(MimeMessage message, {List<MediaToptype> ? includedInlineTypes, bool markAsSeen, int? maxSize, Duration? responseTimeout})?) -
The optional alternative message loader,
for example to load the message from disk
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
includedInlineTypes
→ List<
MediaToptype> ? -
Optional list of media types to be shown inline
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- mailClient → MailClient
-
The high level mail client to download message contents
final
- mailtoDelegate → (Future Function(Uri mailto, MimeMessage mimeMessage)?)
-
Handler for mailto: links.
final
- markAsSeen → bool
-
Set to
true
when the message should be marked as with the downloadingfinal - maxDownloadSize → int
-
The maximum size in bytes of messages that are fully downloaded.
The defaults to
128*1024
/128kb
.final - maxImageWidth → int?
-
The maximum image width for inline images
final
- mimeMessage → MimeMessage
-
The partial MIME message
final
- onDownloaded → (void Function(MimeMessage message)?)
-
Callback to get informed when the message has been downloaded
final
- onError → (void Function(Object? exception, StackTrace? stackTrace)?)
-
Is notified about any errors that might occur
final
- onWebViewCreated → (void Function(InAppWebViewController controller)?)
-
Retrieve a reference to the InAppWebViewController.
final
- onZoomed → (void Function(InAppWebViewController controller, double zoomFactor)?)
-
This callback will be called when the webview zooms out after loading.
final
- preferPlainText → bool
-
Should the plain text be used instead of the HTML text?
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showMediaDelegate → (Future Function(InteractiveMediaWidget mediaWidget)?)
-
Handler for showing the given media widget, typically in its own screen
final
-
urlLauncherDelegate
→ (Future<
bool> Function(String url)?) -
Handler for any non-media URLs that the user taps on the website.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _MimeMessageDownloaderState -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of
DiagnosticsNode
objects describing this node's children.inherited -
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited