dart_cue library

dart_cue — Pure Dart CUE sheet parser.

Quick start

import 'package:dart_cue/dart_cue.dart';

void main() async {
  final sheet = await parseCueFile('album.cue');
  print(sheet?.title);
}

Classes

CueFile
A FILE entry and its associated tracks.
CueIssue
A single diagnostic emitted during parsing or post-parse validation.
CueSheet
The top-level CUE sheet.
CueTrack
A single track within a CUE file entry.
ParseResult
The result of parseCueSheetWithDiagnostics.

Enums

CueFileType
File type declared in a FILE command.
CueFlag
Track flags declared with the FLAGS command.
CueIssueSeverity
Severity of a single CueIssue.
CueTrackType
Track data type declared in a TRACK command.

Functions

formatMsf(Duration duration) String
Format a Duration as an MSF string (mm:ss:ff).
parseCueBytes(Uint8List bytes, {Encoding encoding = utf8}) CueSheet?
Parse a CUE sheet from raw bytes.
parseCueFile(String filePath) Future<CueSheet?>
Platform stub: on targets without a filesystem, loading a CUE sheet by path is not supported. Callers on the web should fetch the file's bytes themselves and use parseCueBytes instead.
parseCueSheet(String content) CueSheet?
Parse a CUE sheet from content.
parseCueSheetWithDiagnostics(String content) ParseResult
Parse content and return both the sheet (or null if there is none) and a list of diagnostics describing silently-dropped tokens, malformed timestamps, and post-parse structural problems.
parseMsf(String msf) Duration?
Parse an MSF string (mm:ss:ff) to a Duration.
toCueString(CueSheet sheet) String
Serialise sheet to a CUE-format string.
validateCueSheet(CueSheet sheet) List<CueIssue>
Check a parsed sheet for structural problems (missing INDEX 01, non-monotonic track numbers, malformed CATALOG / ISRC, …) and return the list of issues. Returns an empty list when the sheet is well-formed.