fundTestAccount static method

Future<bool> fundTestAccount(
  1. String accountId
)

Ask the friendly bot to fund your testnet account given by accountId.

Implementation

static Future<bool> fundTestAccount(String accountId) async {
  var url = Uri.parse("https://friendbot.stellar.org/?addr=$accountId");
  return await http.get(url, headers: RequestBuilder.headers).then((response) {
    switch (response.statusCode) {
      case 200:
        return true;
      default:
        return false;
    }
  });
}