title: Flutter: conditionals in initializer
body: <p>In most languages I can have a conditional like a <code>switch</code> block in a constructor to decide on what arguments to pass to the super constructor.
  How to do that in Dart?<br>
  My use case is passing a map to my constructor, depending on what <code>map['type']</code> is, I insert a different <code>Widget</code> to the layout as an argument to the super constructor by using a switch block.</p>