Skip to content

Commit

Permalink
Add copy button function
Browse files Browse the repository at this point in the history
  • Loading branch information
Aegeontis committed Oct 18, 2024
1 parent 4ff7bc6 commit 269bb15
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/screens/result.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:fake_review_creator/backend/settings_manager.dart';
import 'package:fake_review_creator/screens/llm_settings.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

import '/backend/image_processor.dart';
import '/backend/llm_interface.dart';
Expand Down Expand Up @@ -216,7 +217,10 @@ class _ResultScreenState extends State<ResultScreen> {
builder: (context) => const LLMSettingsScreen())),
icon: Icon(Icons.settings, size: 30)),
// TODO: Add copy implementation
IconButton(onPressed: null, icon: Icon(Icons.copy, size: 30)),
IconButton(
onPressed: () => Clipboard.setData(
ClipboardData(text: widget.llmResponse ?? "")),
icon: Icon(Icons.copy, size: 30)),
]),
!loadingLLMQuery
? Expanded(
Expand Down

0 comments on commit 269bb15

Please # to comment.