Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

常用库展示

  1. http
  _get() async {
    var url = 'www.zouni.vip';
    // Await the http get response, then decode the json-formatted response.
    var response = await get(url);
    if (response.statusCode == 200) {
      var res = response.body.toString();
      print('Number of books about http: $res');
    } else {
      print('Request failed with status: $ {response.statusCode}.');
    }
  }
  1. url_launcher;
 _launchURL() async {
    const url = 'https://flutter.dev';
    if (await canLaunch(url)) {
      await launch(url);
    } else {
      throw 'Could not launch $url';
    }
  }