class _HomePageState extends State<HomePage>
{ Future<String> getData () async{
http.Response response = await http.get( ("http://localhost/prestashop/api/products/1?output_format=JSON"),
headers: { "Authorization": basicAuthenticationHeader('EZH8CRBMY6W791QE8Y1IBMZUN9R56A7X', ''),
"Accept" :"application/json", } ); }
@override
Widget build(BuildContext context)
{ return new Scaffold( body: new Center(
child: new RaisedButton(
child: new Text("Get data"),
onPressed: getData, ), ), ); } }