Skip to content

[linter][discarded_futures] undiscarded futures gets a warning #60418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
stephane-archer opened this issue Mar 27, 2025 · 3 comments
Closed

[linter][discarded_futures] undiscarded futures gets a warning #60418

stephane-archer opened this issue Mar 27, 2025 · 3 comments
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.

Comments

@stephane-archer
Copy link

Future<bool> _unimportLutFolder(WidgetRef ref, Directory currentDirectory) {
// ...
}

// build function
return Dismissible(
              direction: DismissDirection.startToEnd,
              background: Container(
                color: Colors.red,
              ),
              confirmDismiss: (final DismissDirection dissmissDirection) {
                return _unimportLutFolder(ref, currentDirectory);
              },
              key: Key(currentDirectory.path),
              child: _MyRow(_treeEntry, _treeController),
            );

{Future<bool?> Function(DismissDirection)? confirmDismiss}

the linter thinks the future of _unimportLutFolder is discarded but confirmDismiss expects a Future<bool?>

@stephane-archer stephane-archer added the legacy-area-analyzer Use area-devexp instead. label Mar 27, 2025
@lrhn lrhn added area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. and removed legacy-area-analyzer Use area-devexp instead. labels Mar 27, 2025
@FMorschel
Copy link
Contributor

The main CL for #59887 has landed already which should address this. See the referenced issues on the description for this one.

P.S.: I can't close this myself.

@stephane-archer
Copy link
Author

@FMorschel thanks, I will close my issue, any idea when it will be shipped?

@FMorschel
Copy link
Contributor

If you are on the browser you can see the tags for this commit which should indicate this will be available as of Dart 3.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.
Projects
None yet
Development

No branches or pull requests

3 participants