SheenShareCard class

Music shared in a chat: the cover with a play button, what it is ("Song ยท 3:12", "Playlist ยท 24 songs"), the title, the artist, the sender's note and up to two actions.

compact lays it out as a row (albums and artists, which open a page when tapped).

SheenShareCard(
  kind: 'Song ยท 3:12',
  title: 'Habibi',
  subtitle: 'Sabi',
  artwork: NetworkImage(thumb),
  note: 'this one ๐Ÿ”ฅ',
  onPlay: () => player.play(song),
  actions: [SheenShareAction(label: 'Like', onTap: like), SheenShareAction(label: 'Play next', onTap: next)],
)
Inheritance

Constructors

SheenShareCard({Key? key, required String kind, required String title, String? subtitle, ImageProvider<Object>? artwork, String? note, VoidCallback? onPlay, VoidCallback? onTap, List<SheenShareAction> actions = const [], bool compact = false, bool round = false, String placeholderIcon = SheenIcons.music, bool current = false, bool playing = false, bool loading = false})
A card for title.
const

Properties

actions โ†’ List<SheenShareAction>
Buttons under it.
final
artwork โ†’ ImageProvider<Object>?
The cover.
final
compact โ†’ bool
A row instead of a card.
final
current โ†’ bool
Whether the card's song is the one in the player: its title takes the accent and small bars show by the kind.
final
hashCode โ†’ int
The hash code for this object.
no setterinherited
key โ†’ Key?
Controls how one widget replaces another widget in the tree.
finalinherited
kind โ†’ String
What is shared, small and in capitals.
final
loading โ†’ bool
With current: the song is still loading, and a spinner fills the play button.
final
note โ†’ String?
The sender's words.
final
onPlay โ†’ VoidCallback?
Plays it (a button on the cover).
final
onTap โ†’ VoidCallback?
Opens it (the whole card).
final
placeholderIcon โ†’ String
The glyph when there is no cover.
final
playing โ†’ bool
Whether the player plays (with current: the bars move and the button shows pause; onPlay then pauses).
final
round โ†’ bool
A round cover (an artist).
final
runtimeType โ†’ Type
A representation of the runtime type of the object.
no setterinherited
subtitle โ†’ String?
The artist or owner.
final
title โ†’ String
Its title.
final

Methods

build(BuildContext context) โ†’ Widget
Describes the part of the user interface represented by this widget.
override
createElement() โ†’ StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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, int wrapWidth = 65}) โ†’ 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