destiny
destiny copied to clipboard
Assert usage in dart code
We have several places where we use assert in dart flutter code: https://github.com/LeastAuthority/destiny/blob/cdc4b6964b74eba6a6ab3a079161b9212eba8a49/lib/views/shared/file_picker.dart#L107
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);
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.