doesFieldExist method

Future<bool> doesFieldExist(
  1. String fieldAlias
)

Implementation

Future<bool> doesFieldExist(String fieldAlias) async {
  final fields = await getCurrentFields();

  // Loop through fields to find if any field has the alias matching fieldAlias
  for (var field in fields.values) {
    if (field['alias'] == fieldAlias) {
      return true; // Field with the specified alias exists
    }
  }
  return false; // No field with the specified alias found
}