File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
lib/presentation/home/components Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 11import 'package:flutter/material.dart' ;
2+ import 'package:flutter/services.dart' ;
23import 'package:flutter_svg/svg.dart' ;
34import 'package:gap/gap.dart' ;
45import 'package:qack/layout/layout_handler.dart' ;
@@ -176,6 +177,19 @@ class TranslationCardView extends StatelessWidget {
176177 Padding (
177178 padding: translationMargin,
178179 child: InkWell (
180+ onLongPress: () {
181+ if (status == HomeStatus .success &&
182+ translationDetails.translatedText != null ) {
183+ Clipboard .setData (
184+ ClipboardData (text: translationText),
185+ );
186+ ScaffoldMessenger .of (context).showSnackBar (
187+ const SnackBar (
188+ content: Text ('Copied to clipboard' ),
189+ ),
190+ );
191+ }
192+ },
179193 onTap: () {
180194 if (status == HomeStatus .success &&
181195 translationDetails.translatedText != null ) {
You can’t perform that action at this time.
0 commit comments