CsCopyToClipboard class

Cloudscape's CopyToClipboard: copies a value (an ID, an ARN, a command) and confirms in a small popover.

CsCopyToClipboard(
  variant: CsCopyToClipboardVariant.inline,
  textToCopy: 'i-0abc123',
  copySuccessText: 'Instance ID copied',
  copyErrorText: 'Instance ID failed to copy',
)

The popover shows a success or error status and closes on an outside tap or Escape. Copying uses Flutter's Clipboard.

Inheritance

Constructors

CsCopyToClipboard({Key? key, required String textToCopy, required String copySuccessText, required String copyErrorText, CsCopyToClipboardVariant variant = CsCopyToClipboardVariant.button, String? copyButtonText, String? copyButtonAriaLabel, String? textToDisplay, bool wrapText = true, bool disabled = false, String? disabledReason, ValueChanged<String>? onCopySuccess, ValueChanged<String>? onCopyFailure, bool mono = false})
const

Properties

copyButtonAriaLabel → String?
Accessible name of the icon and inline variants. Defaults to "Copy to clipboard".
final
copyButtonText → String?
Text of the button variant. Defaults to "Copy".
final
copyErrorText → String
Popover text when copying failed.
final
copySuccessText → String
Popover text after a successful copy.
final
disabled → bool
final
disabledReason → String?
Why copying is unavailable, shown in a tooltip.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
mono → bool
Inline variant in monospace (IDs, ARNs).
final
onCopyFailure → ValueChanged<String>?
final
onCopySuccess → ValueChanged<String>?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
textToCopy → String
The text placed on the clipboard.
final
textToDisplay → String?
Text shown in the inline variant in place of textToCopy.
final
variant → CsCopyToClipboardVariant
final
wrapText → bool
Inline variant: wrap long text (true) or keep it on one line with an ellipsis.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<CsCopyToClipboard>
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, 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