rtchat icon indicating copy to clipboard operation
rtchat copied to clipboard

fix: analyzer warning in quicklinks_listview.dart

Open kevmo314 opened this issue 1 year ago • 1 comments

Fix the analyzer warning about using 'BuildContext' across async gaps in lib/components/drawer/quicklinks_listview.dart.

  • Convert onLongPress to an async function.
  • Replace the .then() call with await for Clipboard.setData.
  • Add a check for mounted before calling ScaffoldMessenger.of(context).showSnackBar.

For more details, open the Copilot Workspace session.

kevmo314 avatar Aug 12 '24 19:08 kevmo314

@kevmo314 If this looks good feel free to merge it

SputNikPlop avatar Aug 13 '24 20:08 SputNikPlop

@kevmo314 Ok I tried another attempt at finishing this off lemme know if it works

SputNikPlop avatar Aug 20 '24 05:08 SputNikPlop