ScerIO / epubx.dart

Epub Reader and Writer for Dart
MIT License
41 stars 86 forks source link

https://github.com/PresKhaled/epubx #20

Open PresKhaled opened 1 year ago

PresKhaled commented 1 year ago

This version has been added some simple features to it, as follows: -

final epubx.EpubMetadataTitle? subtitle = titles.firstWhereOrNull( (epubx.EpubMetadataTitle? titleElement) { final epubx.EpubMetadataMeta? associatedMeta = _getMetaAssociatedWithTitle( metaItems: epubMetadata.MetaItems, titleElement: titleElement, );

    if (associatedMeta != null && associatedMeta.Scheme == null) {
      return (associatedMeta.Content == 'subtitle');
    }

    return false;
  },
);

static epubx.EpubMetadataMeta? _getMetaAssociatedWithTitle({ required List? metaItems, required epubx.EpubMetadataTitle? titleElement, }) { return metaItems?.firstWhereOrNull( (meta) => (meta.Refines == '#${titleElement?.Id}' && (meta.Property == 'title-type')), ); }


**The data coming from the package can be transferred to classes and stored as it is in a database that accepts this matter.**
**I do not like to use Pull Requests permanently.**