unless function

ReactNode? unless(
  1. bool condition,
  2. ReactNode child
)

Returns child when condition is false, otherwise an empty node.

Implementation

ReactNode? unless(bool condition, ReactNode child) => when(!condition, child);