DirectoryTreeViewer class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- DirectoryTreeViewer
Constructors
-
DirectoryTreeViewer({Key? key, required String rootPath, void onFileTap(File, TapDownDetails)?, void onFileSecondaryTap(File, TapDownDetails)?, void onDirTap(Directory, TapDownDetails)?, void onDirSecondaryTap(Directory, TapDownDetails)?, List<
Widget> ? folderActions, List<Widget> ? fileActions, FolderStyle? folderStyle, FileStyle? fileStyle, bool isUnfoldedFirst = true, EditingFieldStyle? editingFieldStyle, bool enableCreateFileOption = false, bool enableCreateFolderOption = false, bool enableDeleteFileOption = false, bool enableDeleteFolderOption = false, Widget fileIconBuilder(String fileExtension)?}) -
Constructs a DirectoryTreeViewer with the given properties.
const
Properties
- editingFieldStyle → EditingFieldStyle?
-
Custom styling for text editing field.
final
- enableCreateFileOption → bool
-
Enables file creation option
final
- enableCreateFolderOption → bool
-
Enables folder creation option
final
- enableDeleteFileOption → bool
-
Enables file deletion option
final
- enableDeleteFolderOption → bool
-
Enables folder deletion option
final
-
fileActions
→ List<
Widget> ? -
Additional file action widgets
final
- fileIconBuilder → Widget Function(String fileExtension)?
-
A function that returns a custom file icon based on the file extension.
final
- fileStyle → FileStyle?
-
Customizable file styling
final
-
folderActions
→ List<
Widget> ? -
Additional folder action widgets
final
- folderStyle → FolderStyle?
-
Customizable folder styling
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isUnfoldedFirst → bool
-
Initial state of the DirectoryTreeViewer.
isUnfoldedFirst = true by defualt
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onDirSecondaryTap → void Function(Directory, TapDownDetails)?
-
Callback function when a directory is right-clicked.
final
- onDirTap → void Function(Directory, TapDownDetails)?
-
Callback function when a directory is tapped.
final
- onFileSecondaryTap → void Function(File, TapDownDetails)?
-
Callback function when a file is right-clicked.
final
- onFileTap → void Function(File, TapDownDetails)?
-
Callback function when a file is tapped. Accepts a File and TapDownDetails as parameters.
final
- rootPath → String
-
The root path of the directory to display.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited