Buenas, tengo el siguiente error usando el código fuente de gpayment que está en GitHub, a la hora de pasarlo en mi aplicación me lanza el siguiente error:
The argument type ‘String’ can’t be assigned to the parameter type ‘Uri’.
library gpayments;
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:http/http.dart' as http;
class GPayments {
// TODO: Integrate the pending methods from GPayments API
final apiUrl = "https://api.payments.4geeks.io";
/// Generate authentication token
static Future<dynamic> _getToken(String clientId, String clientSecret, String apiUrl) async {
final response = await http.post(
"$apiUrl/authentication/token/", //el error está en esta parte
headers: {"content-type": "application/json"},
body: json.encode({
"client_id": clientId,
"client_secret": clientSecret,
"grant_type": "client_credentials",
})
);