Alex Castro

Results 77 comments of Alex Castro

I particularly like the `if` syntax, it sounds natural and readable as `when`: - "`when` condition B meets, do B". - "`if` condition B meets, do B". --- `when`: We...

> This is about choosing the first of a list of possible cases whose boolean condition evaluates to true. I do agree. > That really is an if/else chain. Ifs...

Changing the formatter to allow something like this: ```dart final value = isAvailableA() ? getA() : isAvailableB() ? getB() : isAvailableC() ? getC() : null; ``` is going to solve...

Currently the only way I can do that is by: ```dart final isAvailableX = (() { // ... long expression with ifs and explicit returns })(); // instead of final...

This happens because of Flutter `EventChannel` implementation. Event channel in Flutter can handle 1 stream request at once, when a new request is made the previous one gets canceled. Unfortunately...

> maybe there are more efficient way to get persisted folders items count than use of 'listFiles'? The library [SimpleStore](https://github.com/anggrayudi/SimpleStorage) for native Android [is also using `listFiles` API](https://github.com/anggrayudi/SimpleStorage/blob/master/storage/src/main/java/com/anggrayudi/storage/file/DocumentFileExt.kt#L114-L145), exactly [here...

Hi! you can recursively call listFiles.

I would recommend checking if the WhatsApp app is installed or not instead of checking if their internal status folder exists. I recommend this approach because you can't know if...

Currently there is no way to convert path to URIs and vice-versa. I plan to add some improvements in the future to handle paths AND uris to make the library...

[saf] is actually a fork of [shared_storage] that hides the URI part. But they are also handling with URIs, they just hide it inside the `Saf` class, see https://github.com/ivehement/saf/blob/master/lib/src/storage_access_framework/saf.dart. But...