flutter-styleguide
flutter-styleguide copied to clipboard
Use SizedBox() as a no-op
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; }