copyCurl method
Copies the generated cURL command to the clipboard and shows a snackbar.
This method generates a cURL command from the provided CurlModel request, copies it to the clipboard, and displays a snackbar notification in the given BuildContext.
Implementation
void copyCurl(CurlModel request, BuildContext context) {
final curl = getCurl(request);
final data = ClipboardData(text: curl);
Clipboard.setData(data);
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text('Curl copied to clipboard')),
);
}