userRecords static method

Future<List<DNSRecord>> userRecords()

userRecords()

  • Returns List<DNSRecord> of User Records
  • Sets User Name if Provided Optional : SName

Implementation

static Future<List<DNSRecord>> userRecords() async {
  // Refresh Records
  final result = await refresh();

  // Check if user name is set
  if (hasUserName) {
    // Fetch Records
    final records = result.records.where(
      (e) => e.host.toLowerCase() == userName || e.name.toLowerCase() == userName,
    );
    return records.toList();
  }
  return [];
}