gap icon indicating copy to clipboard operation
gap copied to clipboard

[Feature] A constructor optimized for empty widget ?

Open EArminjon opened this issue 1 year ago • 1 comments

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(); 
  }

EArminjon avatar Apr 04 '24 13:04 EArminjon

Suggestion : https://github.com/letsar/nil/blob/main/lib/src/nil.dart

EArminjon avatar Jun 12 '24 07:06 EArminjon