DownloadMediaBuilder class
Usage: Getting File from cache if not cached yet, it will be downloaded.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- DownloadMediaBuilder
Constructors
- DownloadMediaBuilder({Key? key, required String url, void onInitialize(DownloadMediaBuilderController controller)?, Widget onSuccess(DownloadMediaSnapshot snapshot)?, Widget onLoading(DownloadMediaSnapshot snapshot)?, Widget onError(DownloadMediaSnapshot snapshot)?, Widget onCancel(DownloadMediaSnapshot snapshot)?, Widget onEncrypting(DownloadMediaSnapshot snapshot)?, Widget onDecrypting(DownloadMediaSnapshot snapshot)?, String? encryptionPassword, bool autoDownload = true, Widget onInitial(DownloadMediaSnapshot snapshot)?})
-
const
Properties
- autoDownload → bool
-
If enabled download will start if widget has bounded to UI Tree
Otherwise you should call method getFile from DownloadMediaBuilderController instance came from onInitialize callback
final
- encryptionPassword → String?
-
Encryption password is optional if not set
the default password you have set using setEncryptionPassword method will be
By assigning this variable you can encrypt files with different passwords.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onCancel → (Widget Function(DownloadMediaSnapshot snapshot)?)
-
Render widget when download status is cancel.
final
- onDecrypting → (Widget Function(DownloadMediaSnapshot snapshot)?)
-
Render widget when download status is decrypting.
final
- onEncrypting → (Widget Function(DownloadMediaSnapshot snapshot)?)
-
Render widget when download status is encrypting.
final
- onError → (Widget Function(DownloadMediaSnapshot snapshot)?)
-
Render widget when download status is error.
final
- onInitial → (Widget Function(DownloadMediaSnapshot snapshot)?)
-
Render widget when download status is initial.
final
- onInitialize → (void Function(DownloadMediaBuilderController controller)?)
-
Provides you a controller to make it easy for controlling DownloadMediaBuilder
final
- onLoading → (Widget Function(DownloadMediaSnapshot snapshot)?)
-
Render widget when download status is loading.
final
- onSuccess → (Widget Function(DownloadMediaSnapshot snapshot)?)
-
Render widget when download status is success.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- url → String
-
URL of any type of media (Audio, Video, Image, etc...)
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< DownloadMediaBuilder> -
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