Skip to content
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

Assert usage in dart code #211

Open
donpui opened this issue Dec 18, 2022 · 0 comments
Open

Assert usage in dart code #211

donpui opened this issue Dec 18, 2022 · 0 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@donpui
Copy link
Contributor

donpui commented Dec 18, 2022

We have several places where we use assert in dart flutter code:

assert(result?.files.length == 1);

All asserts: https://github.com/LeastAuthority/destiny/search?q=assert%28

If file is not selected (User cancel selection file), so this statement becomes false: assert(result?.files.length == 1);

image

Not fully sure if we should use here assert and just rewrite exception handling.

To may understanding, we have not enabled asserts in release mode.

@donpui donpui added the help wanted Extra attention is needed label Dec 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants