follow dart examples on if/else