isNativeDataset property

bool get isNativeDataset

Returns whether the loaded dataset is native to the active riwayah.

If true, the verse keys (e.g., ":") in the phoneme dataset already correspond directly to the active riwayah's verses and counting system, so no ayahMapper transformation or Hafs-fallback translation is needed.

Implementation

bool get isNativeDataset {
  final ds = _service.datasetRiwayah;
  if (ds == null) {
    // Default bundled dataset is Hafs (Kufi)
    return _riwayah == null || _riwayah == QuranRiwayah.hafs;
  }
  if (_riwayah == null) return false;
  return _riwayah!.id.toLowerCase() == ds ||
      _riwayah!.nameEn.toLowerCase() == ds;
}