Link constructor

Link({
  1. String? id,
  2. required String href,
  3. bool templated = false,
  4. String? type,
  5. String? title,
  6. Set<String> rels = const {},
  7. dynamic properties,
  8. int? height,
  9. int? width,
  10. double? bitrate,
  11. double? duration,
  12. List<String> languages = const [],
  13. List<Link> alternates = const [],
  14. List<Link> children = const [],
})

Implementation

Link(
    {this.id,
    required this.href,
    this.templated = false,
    this.type,
    this.title,
    this.rels = const {},
    properties,
    this.height,
    this.width,
    this.bitrate,
    this.duration,
    this.languages = const [],
    this.alternates = const [],
    this.children = const []})
    : properties = properties ?? Properties() {
  List<String> parts = href.split('#');
  _hrefPart = parts[0];
  _elementId = (parts.length > 1) ? parts[1] : null;
}