when method

Widget when(
  1. bool condition
)

Uses when clause to render the widget only when the condition is true.

Implementation

Widget when(bool condition) => condition ? this : const VxNone();