title: On Flutter Parsing Json in The Background fails
body: <p>I try to implement the Parsing JSON in the background on <a href="https://flutter.io/cookbook/networking/background-parsing/" rel="nofollow noreferrer">https://flutter.io/cookbook/networking/background-parsing/</a> and I am getting bellow error. Error also same when I use the Android Emulator.</p>
  
  <p>I am using macOs HighSierra. I install IntelliJ and Fluter and Dark plugin. I test most examples on Flutter and it all worked. I also created a demo up and its working. I don't understand why this not working. Any Help please?</p>
  
  <p><strong>Code I am using:</strong></p>
  
  <pre><code>import 'dart:async';
  import 'dart:convert';
  import 'package:flutter/material.dart';
  import 'package:flutter/rendering.dart';
  import 'package:http/http.dart' as http;
  
  
  // JSON::WEATHER 
  Future&lt;String&gt; getWeatherData() async {
    var response = await http.get(
        Uri.encodeFull("http://api.openweathermap.org/data/2.5/forecast?q=San+Francisco&amp;units=metric&amp;APPID=14cc828bff4e71286219858975c3e89a"),
        headers: {
          'Accept': 'application/json'
        }
    );
  
    this.setState(() {
       weatherData = json.decode(response.body);
    });
  
    return 'Success!';
  }
  
  
  @override
  void initState() {
    // TODO: implement initState
    super.initState();;
    this.getWeatherData();
  }
  
  
  // USAGE
  new Text(
           weatherData['list'][0]['main']['temp_min'].toString(),
           style: new TextStyle(
              fontSize: 10.0,
              fontWeight: FontWeight.w400,
              color: Colors.white,
           ),
  ),
  </code></pre>
  
  <blockquote>
    <p>Launching lib/main.dart on SM G935F in debug mode...
        Initializing gradle...
        Resolving dependencies...
        Running 'gradlew assembleDebug'...
        Built build/app/outputs/apk/debug/app-debug.apk (31.4MB).
        I/FlutterActivityDelegate(26125): onResume setting current activity to this
        <strong>D/libGLESv2(26125): STS_GLApi : DTS is not allowed for Package : com.yourcompany.parsingjsonintheackground</strong>
        Syncing files to device SM G935F...
        F/flutter (26125): [FATAL:flutter/fml/message_loop.cc(23)] Check failed: loop != nullptr.
    MessageLoop::EnsureInitializedForCurrentThread was not called on this
    thread prior to message loop use.
        F/libc    (26125): Fatal signal 6 (SIGABRT), code -6 in tid 26165 (1.ui)
        <strong>* <em></strong> <strong></em> <em></strong> <strong></em> <em></strong> <strong></em> <em></strong> <strong></em> <em></strong> <strong></em> <em></strong> <strong></em> <em></strong> <strong></em> *</strong>
        Build fingerprint: 'samsung/hero2ltexx/hero2lte:7.0/NRD90M/G935FXXS2DRC3:user/release-keys'
        Revision: '9'
        ABI: 'arm64'
        pid: 26125, tid: 26165, name: 1.ui  >>> com.yourcompany.parsingjsonintheackground &lt;&lt;&lt;
        signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
        Abort message: '[FATAL:flutter/fml/message_loop.cc(23)] Check failed: loop != nullptr.
    MessageLoop::EnsureInitializedForCurrentThread was not called on this
    thread prior to message loop use.
        '
            x0   0000000000000000  x1   0000000000006635  x2   0000000000000006  x3   0000000000000008
            x4   000000000000015f  x5   0000000000000000  x6   0000007286ce8000  x7   0000000000000000
            x8   0000000000000083  x9   ffffffffffffffdf  x10  0000000000000000  x11  ffffffffffffffff
            x12  0000000000000018  x13  0000000000000000  x14  0000000000000000  x15  000bbc6bf4faa710
            x16  00000072840caee0  x17  0000007284073a28  x18  000000726095d160  x19  000000725d9ab4f8
            x20  0000000000000006  x21  000000725d9ab450  x22  0000000000000000  x23  000000725d9ab020
            x24  000000725d9ab038  x25  000000725d9ab040  x26  000000725d9ab060  x27  000000725d9ab098
            x28  000000725d9ab009  x29  000000725d9aab00  x30  0000007284070ebc
            sp   000000725d9aaae0  pc   0000007284073a30  pstate 0000000060000000
        backtrace:
            #00 pc 000000000006ca30  /system/lib64/libc.so (tgkill+8)
            #01 pc 0000000000069eb8  /system/lib64/libc.so (pthread_kill+64)
            #02 pc 0000000000024198  /system/lib64/libc.so (raise+24)
            #03 pc 000000000001c9b0  /system/lib64/libc.so (abort+52)
            #04 pc 00000000003a6d2c  /data/app/com.yourcompany.parsingjsonintheackground-1/lib/arm64/libflutter.so
            #05 pc 00000000003a7474  /data/app/com.yourcompany.parsingjsonintheackground-1/lib/arm64/libflutter.so
            #06 pc 000000000016dab4  /data/app/com.yourcompany.parsingjsonintheackground-1/lib/arm64/libflutter.so
            #07 pc 000000000015f404  /data/app/com.yourcompany.parsingjsonintheackground-1/lib/arm64/libflutter.so
            #08 pc 0000000000189b70  /data/app/com.yourcompany.parsingjsonintheackground-1/lib/arm64/libflutter.so
            #09 pc 0000000000190b50  /data/app/com.yourcompany.parsingjsonintheackground-1/lib/arm64/libflutter.so
            #10 pc 0000000000190674  /data/app/com.yourcompany.parsingjsonintheackground-1/lib/arm64/libflutter.so
            #11 pc 00000000001921e8  /data/app/com.yourcompany.parsingjsonintheackground-1/lib/arm64/libflutter.so
            #12 pc 00000000005dc220  /data/app/com.yourcompany.parsingjsonintheackground-1/lib/arm64/libflutter.so
            #13 pc 0000000000830f4c  /data/app/com.yourcompany.parsingjsonintheackground-1/lib/arm64/libflutter.so
            #14 pc 0000000000830df8  /data/app/com.yourcompany.parsingjsonintheackground-1/lib/arm64/libflutter.so
            #15 pc 000000000074d084  /data/app/com.yourcompany.parsingjsonintheackground-1/lib/arm64/libflutter.so
            #16 pc 00000000000696bc  /system/lib64/libc.so (_ZL15__pthread_startPv+196)
            #17 pc 000000000001dbf0  /system/lib64/libc.so (__start_thread+16)
        Lost connection to device.</p>
  </blockquote>