Skip to content

Use SizedBox() as a no-op #5

@rapPayne

Description

@rapPayne

When you don't want to show a "nothing", render a SizedBox().

For instance,

if (snapshot.connectionState == ConnectionState.none) {
return const SizedBox();
} else if (snapshot.hasData) {
return someOtherWidgets;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions