title: Failed Assertion: Boolean expression must not be null
body: <p>I stored <code>isQuick</code> value from the backend. I used sqflite to cache.
  Always result is <code>false</code></p>
  
  <p><strong>In my dashboard page,</strong></p>
  
  <pre><code> bool isQuick;
   @override
    void initState() {
   isQuick = false;
  
   timer1 = Timer.periodic(Duration(seconds: 5), (Timer t) {
    checkQuick(_url, tokens, isQuick);
  });
  
  timer = Timer.periodic(Duration(seconds: 10), (Timer t) {
        Future datas = HelperDatabase1().displayGetUserPreference();
        datas.then((v) =&gt; {
          data = v,
          print('new data ${data[0].data}'),
          data[0].data == 0 ? this.isQuick == false : this.isQuick == true,
          print(this.isQuick)
        });
        submitRequestSave(_url, tokens);
      });
      }
  </code></pre>
  
  <p><strong>in my build method,</strong></p>
  
  <pre><code> @override
    Widget build(BuildContext context) {
    return WillPopScope(
          onWillPop: () async =&gt; false,
          child: Scaffold(
            backgroundColor: Colors.white,
            appBar: AssetRegisterAppBar(context),
            body: makeBody(litems, litems_icon, _url, this.isQuick, isOffline,
                statusbarHeight, context),
          ));
  }
  </code></pre>
  
  <p><strong>checkQuick method,</strong></p>
  
  <pre><code>  Future checkQuick(String url, String token, bool isQuick) async {
      print('quick $isQuick');
      bool newQuick;
      final response = await http.get(
        '$url/nativeapi/v1.0/User/GetUserPreference',
        headers: {'Authorization': 'Bearer $token'},
      );
      final jsonResponse = json.decode(response.body);
      GetUserPreference model = GetUserPreference.fromJson(jsonResponse);
      var data = GetUserPreference(data: model.data);
      print(data.data);
      if (data.data == 0) {
        newQuick = false;
      } else {
        newQuick = true;
      }
      print('new quick $newQuick');
      if (isQuick != newQuick) {
        int newData;
        if (newQuick) {
          newData = 1;
        } else {
          newData = 0;
        }
        await HelperDatabase1().updateGetUserPreference(1, newData);
      }
    }
  </code></pre>