I have checked this code in library.
Future<List?> _fetchSupportedBanks() async {
const url =
'https://api.paystack.co/bank?gateway=emandate&pay_with_bank=true';
try {
http.Response response = await http.get(url.toUri());
Map<String, dynamic> body = json.decode(response.body);
var data = body['data'];
List banks = [];
for (var bank in data) {
banks.add(new Bank(bank['name'], bank['id']));
}
return banks;
} catch (e) {}
return null;
}