dart-gde/chrome.dart

children attribute of BookmarkTreeNode is always null

Conchylicultor opened this issue · 0 comments

Hi,
I don't know why but it seems that we cannot get the children directly from a BookmarkTreeNode.

import 'dart:async';
import 'package:chrome/chrome_ext.dart' as chrome;

void main() async {
  // Get the folder node
  chrome.BookmarkTreeNode folder = (await chrome.bookmarks.search("FolderName")).first;

  print(folder.children); // Children is null. Why ???

  // Get the children
  List<chrome.BookmarkTreeNode> childrenList = await chrome.bookmarks.getChildren(folder.id);

  print(childrenList); // Here is not
}

Console output:

    null
    [[object Object], [object Object], ... , [object Object]]