Skip to content

Commit

Permalink
Fix "This BuildContext is no longer valid." issue
Browse files Browse the repository at this point in the history
  • Loading branch information
erdemyerebasmaz committed Jul 13, 2023
1 parent 91531a8 commit 4d0fbfe
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ class _SendOptionsBottomSheetState extends State<SendOptionsBottomSheet> {
Future<void> _pasteFromClipboard(BuildContext context) async {
try {
final inputBloc = context.read<InputBloc>();
// Close bottom sheet
Navigator.of(context).pop();
_setLoading(true);
// Get clipboard data
await Clipboard.getData("text/plain").then(
(clipboardData) async {
// Close bottom sheet
Navigator.of(context).pop();
final clipboardText = clipboardData?.text;
_log.v("Clipboard text: $clipboardText");
if (clipboardText != null) {
Expand Down

0 comments on commit 4d0fbfe

Please sign in to comment.