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
parseCueBytesinstead. -
parseCueSheet(
String content) → CueSheet? -
Parse a CUE sheet from
content. -
parseCueSheetWithDiagnostics(
String content) → ParseResult -
Parse
contentand return both the sheet (ornullif 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
sheetto a CUE-format string. -
validateCueSheet(
CueSheet sheet) → List< CueIssue> -
Check a parsed
sheetfor structural problems (missingINDEX 01, non-monotonic track numbers, malformedCATALOG/ISRC, …) and return the list of issues. Returns an empty list when the sheet is well-formed.