BookmarkTreeNode constructor

BookmarkTreeNode({
  1. required String id,
  2. String? parentId,
  3. int? index,
  4. String? url,
  5. required String title,
  6. double? dateAdded,
  7. double? dateLastUsed,
  8. double? dateGroupModified,
  9. FolderType? folderType,
  10. BookmarkTreeNodeUnmodifiable? unmodifiable,
  11. required bool syncing,
  12. List<BookmarkTreeNode>? children,
})

Implementation

BookmarkTreeNode({
  /// The unique identifier for the node. IDs are unique within the current
  /// profile, and they remain valid even after the browser is restarted.
  required String id,

  /// The `id` of the parent folder.  Omitted for the root node.
  String? parentId,

  /// The 0-based position of this node within its parent folder.
  int? index,

  /// The URL navigated to when a user clicks the bookmark. Omitted for
  /// folders.
  String? url,

  /// The text displayed for the node.
  required String title,

  /// When this node was created, in milliseconds since the epoch (`new
  /// Date(dateAdded)`).
  double? dateAdded,

  /// When this node was last opened, in milliseconds since the epoch. Not set
  /// for folders.
  double? dateLastUsed,

  /// When the contents of this folder last changed, in milliseconds since the
  /// epoch.
  double? dateGroupModified,

  /// If present, this is a folder that is added by the browser and that
  /// cannot be modified by the user or the extension. Child nodes may be
  /// modified, if this node does not have the `unmodifiable` property set.
  /// Omitted if the node can be modified by the user and the extension
  /// (default).There may be zero, one or multiple nodes of each folder type.
  /// A folder may be added or removed by the browser, but not via the
  /// extensions API.
  FolderType? folderType,

  /// Indicates the reason why this node is unmodifiable. The [managed] value
  /// indicates that this node was configured by the system administrator or
  /// by the custodian of a supervised user. Omitted if the node can be
  /// modified by the user and the extension (default).
  BookmarkTreeNodeUnmodifiable? unmodifiable,

  /// Whether this node is synced with the user's remote account storage by
  /// the browser. This can be used to distinguish between account and
  /// local-only versions of the same [FolderType]. The value of this property
  /// may change for an existing node, for example as a result of user
  /// action.Note: this reflects whether the node is saved to the browser's
  /// built-in account provider. It is possible that a node could be synced
  /// via a third-party, even if this value is false.
  ///
  /// For managed nodes (nodes where `unmodifiable` is set to `true`), this
  /// property will always be `false`.
  required bool syncing,

  /// An ordered list of children of this node.
  List<BookmarkTreeNode>? children,
}) : _wrapped = $js.BookmarkTreeNode(
        id: id,
        parentId: parentId,
        index: index,
        url: url,
        title: title,
        dateAdded: dateAdded,
        dateLastUsed: dateLastUsed,
        dateGroupModified: dateGroupModified,
        folderType: folderType?.toJS,
        unmodifiable: unmodifiable?.toJS,
        syncing: syncing,
        children: children?.toJSArray((e) => e.toJS),
      );