title: Update final fields only if not null in constructor dart
body: <p>I have a class called App with some fields.
  I want to initalize the final fields only if passed parameters to constructor are not null.</p>
  
  <p>e.g in below code I want to set config param only if it is not null.</p>
  
  <p>I tried below code but it is not working</p>
  
  <pre><code>@immutable
  class App {
      final AuthState auth;
      final RConfig config;
  
      App({AuthState auth, this.config}):
          auth = auth ?? new AuthState(), config = config != null ? config : this.config ;
  </code></pre>
  
  <p>Although I am quite new to dart, I know that I can't initalize final fields twice but there are app states due to which AppState get created again and RConfig may be null at that time.</p>
  
  <p>My question is as simple is this how to check multiple final fields validity e.g null or empty before assigning them.</p>