import 'package:aves/widgets/viewer/info/metadata/xmp_namespaces.dart'; import 'package:aves/widgets/viewer/info/metadata/xmp_structs.dart'; import 'package:flutter/material.dart'; class XmpDarktableNamespace extends XmpNamespace { static const ns = 'darktable'; static final historyPattern = RegExp(r'darktable:history\[(\d+)\]/(.*)'); final history = >{}; XmpDarktableNamespace(Map rawProps) : super(ns, rawProps); @override bool extractData(XmpProp prop) => extractIndexedStruct(prop, historyPattern, history); @override List buildFromExtractedData() => [ if (history.isNotEmpty) XmpStructArrayCard( title: 'History', structByIndex: history, ), ]; }