toJson method
Canonical JSON (fixed key order, colours as aarrggbb).
Implementation
Map<String, Object?> toJson() => {
'format': jsonFormat,
'seed': seed,
'family': family.id,
'engineVersion': engineVersion,
'variant': variant.name,
'heroId': heroId,
'seedHueTenths': ?seedHueTenths,
'intent': ?intent?.toJson(),
if (intentCentred) 'intentCentred': true,
'brightness': brightness.name,
'accessible': accessible,
'palette': palette.toJson(),
'keyShape': keyShape.toJson(),
'keyStyle': keyStyle.toJson(),
'type': type.toJson(),
'background': background.toJson(),
'motion': motion.toJson(),
'effects': effects.toJson(),
'sound': sound.name,
'name': name,
'nonColourOperatorCue': nonColourOperatorCue.name,
};