StreamAttachmentPicker class
A widget that allows to pick an attachment.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- StreamAttachmentPicker
Constructors
-
StreamAttachmentPicker({Key? key, required StreamMessageInputController messageInputController, required FilePickerCallback onFilePicked, bool isOpen = false, double pickerSize = 360.0, int attachmentLimit = 10, AttachmentLimitExceedListener? onAttachmentLimitExceeded, int maxAttachmentSize = kDefaultMaxAttachmentSize, ValueChanged<
String> ? onError, List<DefaultAttachmentTypes> allowedAttachmentTypes = const [DefaultAttachmentTypes.image, DefaultAttachmentTypes.file, DefaultAttachmentTypes.video], List<CustomAttachmentType> customAttachmentTypes = const [], ThumbnailSize attachmentThumbnailSize = const ThumbnailSize(400, 400), ThumbnailFormat attachmentThumbnailFormat = ThumbnailFormat.jpeg, int attachmentThumbnailQuality = 100, double attachmentThumbnailScale = 1}) -
Default constructor for StreamAttachmentPicker which creates the Stream
attachment picker widget.
const
Properties
-
allowedAttachmentTypes
→ List<
DefaultAttachmentTypes> -
The list of attachment types that can be picked.
final
- attachmentLimit → int
-
The limit of attachments that can be picked.
final
- attachmentThumbnailFormat → ThumbnailFormat
-
Format of the attachment thumbnails.
final
- attachmentThumbnailQuality → int
-
The quality value for the attachment thumbnails.
final
- attachmentThumbnailScale → double
-
The scale to apply on the attachmentThumbnailSize.
final
- attachmentThumbnailSize → ThumbnailSize
-
Size of the attachment thumbnails.
final
-
customAttachmentTypes
→ List<
CustomAttachmentType> -
The list of custom attachment types that can be picked.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isOpen → bool
-
True if the picker is open.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- maxAttachmentSize → int
-
Max attachment size in bytes:
final
- messageInputController → StreamMessageInputController
-
The StreamMessageInputController linked to this picker.
final
- onAttachmentLimitExceeded → AttachmentLimitExceedListener?
-
The callback for when the attachment limit is exceeded.
final
-
onError
→ ValueChanged<
String> ? -
Callback for when an error occurs in the attachment picker.
final
- onFilePicked → FilePickerCallback
-
Callback for when file is picked.
final
- pickerSize → double
-
The picker size in height.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{Key? key, StreamMessageInputController? messageInputController, FilePickerCallback? onFilePicked, bool? isOpen, double? pickerSize, int? attachmentLimit, AttachmentLimitExceedListener? onAttachmentLimitExceeded, int? maxAttachmentSize, ValueChanged< bool> ? onChangeInputState, ValueChanged<String> ? onError, List<DefaultAttachmentTypes> ? allowedAttachmentTypes, List<CustomAttachmentType> ? customAttachmentTypes, ThumbnailSize? attachmentThumbnailSize, ThumbnailFormat? attachmentThumbnailFormat, int? attachmentThumbnailQuality, double? attachmentThumbnailScale}) → StreamAttachmentPicker - Used to create a new copy of StreamAttachmentPicker with modified properties.
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< StreamAttachmentPicker> -
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