RouteBookmarks.create constructor

RouteBookmarks.create(
  1. String name
)

Open or create a bookmarks collection with the provided name.

The factory creates or opens the underlying bookmarks database for the given name and returns a RouteBookmarks instance that operates on that collection.

Parameters

  • name: The name (path) of the bookmarks collection to open or create.

Implementation

factory RouteBookmarks.create(final String name) {
  final String encodedVal = jsonEncode(<String, String>{
    'class': 'RouteBookmarks',
    'args': name,
  });
  final String resultString = GemKitPlatform.instance.callCreateObject(
    encodedVal,
  );
  final dynamic decodedVal = jsonDecode(resultString);
  return RouteBookmarks.init(decodedVal['result']);
}