FileSystemNode constructor

FileSystemNode(
  1. FileSystemNodeType type,
  2. String path
)

Implementation

FileSystemNode(FileSystemNodeType type, this.path)
    : super(
        type: type.toString(),
        properties: {
          "path": path,
          "name": basename(path).isNotEmpty ? basename(path) : path,
        },
        labelProperty: "name",
        uniqueProperty: "path",
        urlProperty: "path",
        icon: NodeIcon(
          fontFamily: "MaterialIcons",
          codePoint: type == FileSystemNodeType.folder
              ? 0xe2a3 // https://api.flutter.dev/flutter/material/Icons/folder-constant.html
              : 0xe0a2, // https://api.flutter.dev/flutter/material/Icons/article-constant.html
        ),
      );