Skip to content

TbStorage interface changed incorrectly #54

@Jon-Salmon

Description

@Jon-Salmon

In commit 778f426 the TbStorage interface changed (seemingly to add support for non-string values). As a result of this change, the getItem field is no longer marked as returning a Future. As far as I can see, the value is still used to return futures in various instances (see _local_file_storage.dart), but as it stands the compiler/linter won't raise any errors if the use of this value isn't awaited in when used. I believe the interface should be updated/reverted to:

Future<E?> getItem(String key, {E? defaultValue});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions