http: ^0.13.3
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'dart:convert';
void GoToNext(){
setState((){
Navigator.push(context,MaterialPageRoute(builder:(context){
return myTest();
}),);
});
}
void sendHttp() async {
var url = Uri.parse('');
var response = await http.get(url);
print('打印看看 body->${response.body}');
var hh=json.decode(response.body);
int iLen=hh['list'].length;
for (Map i in hh['list'])
{
//Map ppp;
//ppp=hh['list'][i];
print(i['remarkName']);
print(i['messageType']);
}
List fruits = ['apple', 'banana', 'orange'];
fruits.forEach((fruit) {
print('呢?是:$fruit');
});
int x=fruits.indexOf('apple');
List numbers = [1, 2, 3, 4, 5];
List evenNumbers = numbers.where((number) => number % 2 == 0).toList();
print('原始数字列表:$numbers');
print('偶数列表:$evenNumbers');
String sPost;
response = await http.post(Uri.parse(""), body: {"name": "zhangyuebin", "job": "Worker"});
print (response.body);
}
return Scaffold(
appBar:AppBar(title:Text("另一个页面"),),
body:Center(child: ListView(
shrinkWrap: true,
padding: const EdgeInsets.all(20.0),
itemExtent:40,
children: [
const Text('day to you'),