ReactiveTextField.copyable constructor
ReactiveTextField with trailing copy button.
Implementation
factory ReactiveTextField.copyable({
Key? key,
required String text,
String? label,
}) => ReactiveTextField(
key: key,
state: TextFieldState(text: text, editable: false),
label: label,
floatingLabelBehavior: FloatingLabelBehavior.always,
trailing: WidgetButton(
onPressed: () {},
onPressedWithDetails: (u) {
PlatformUtils.copy(text: text);
MessagePopup.success('label_copied'.l10n, at: u.globalPosition);
},
child: Center(child: SvgIcon(SvgIcons.copy)),
),
);