diff --git a/covas_mobile/lib/main.dart b/covas_mobile/lib/main.dart index 202509b..6673588 100644 --- a/covas_mobile/lib/main.dart +++ b/covas_mobile/lib/main.dart @@ -1,4 +1,7 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; +import 'package:http/http.dart' as http; void main() { runApp(const MyApp()); @@ -50,7 +53,12 @@ class MyHomePage extends StatefulWidget { class _MyHomePageState extends State { int _counter = 0; - void _incrementCounter() { + Future _incrementCounter() async { + var url = Uri.http("localhost:8083", "api/v1/token"); + var response = await http.get(url); + stderr.writeln('Response status: ${response.statusCode}'); + stderr.writeln('Response body: ${response.body}'); + setState(() { // This call to setState tells the Flutter framework that something has // changed in this State, which causes it to rerun the build method below