Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Feature] A constructor optimized for empty widget ? #24

@EArminjon

Description

@EArminjon

As a developer i want to use Gap to display an empty widget.

Previously for spacing i used many SizedBox() and Gap() successfully replace them.
But for empty spacing / widget, can we use Gap ? Is Gap as performance as SizedBox ? (Is Gap(0) a good practice ?)

  @override
  Widget build(BuildContext context) {
    if (enabled) return child;
    return const Gap(0); 
    // return const SizedBox(); 
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions