copyable_widget 1.2.0
copyable_widget: ^1.2.0 copied to clipboard
Zero-boilerplate clipboard copy for any Flutter widget or text, with haptic feedback and SnackBar confirmation.
1.2.0 #
- New:
CopyableBuilderwidget — exposesisCopiedboolean state via builder function for fully custom copy UI (GitHub-style icon toggle, animated containers, etc.) - New:
clearAfterparameter onCopyableandCopyable.text— automatically overwrites clipboard after a specified duration. Designed for FinTech and crypto apps handling sensitive data. - New:
CopyableTheme—InheritedWidgetfor app-wide defaults. ControlssnackBarText,snackBarDuration, andclearAfter. Per-widget values always override theme. - New:
CopyableThemeData— data class backingCopyableTheme. - New:
onErrorcallback onCopyable,Copyable.text, andCopyableBuilder— called whenClipboard.setDatathrows, enabling error logging and recovery. - Fix:
CopyableFeedback.snackBar(text:)now accepts nullable text — resolves toCopyableTheme.snackBarTextwhen not provided.
1.1.0 #
Copyable.textnow accepts an optionalvalueparameter — display a label (e.g."Copy card number") while copying a different string to the clipboard- Default gesture mode is now
tapon all platforms (waslongPresson Android/iOS); passmode: CopyableActionMode.longPressexplicitly when long-press is needed - Fixed
ScaffoldMessenger.ofcrash when noScaffoldancestor is present (now usesmaybeOf) - Expanded widget-test suite with platform-channel mocking, clipboard-value interception, and label/value decoupling coverage
1.0.1 #
- Renamed package from
copyabletocopyable_widget - Fixed
Copyable.textfactory return type error - Centered SnackBar text
1.0.0 #
- Null safety: this version opts into sound null safety (previous versions did not)
- Initial release
Copyablewidget — wraps any widget with clipboard copy behaviorCopyable.text— drop-in Text replacement with copy on tap/long-pressCopyableFeedback.snackBar()— built-in SnackBar confirmation (default)CopyableFeedback.custom()— fully custom feedback via callbackCopyableFeedback.none()— silent copy with no UI feedbackCopyableActionMode.tap/.longPresswith auto-detection per platformCopyableEventpassed to custom feedback handler with value, timestamp, and modeHapticFeedbackStyleenum for configurable haptic response- Full platform support: Android, iOS, Web, macOS, Windows, Linux
- Zero external dependencies — Flutter SDK only