CloudFolderScreen class
A ready-to-use, full-featured folder browser backed by CloudStorage.
Embeddable, not a page. The widget is not a Scaffold and does
not host ScaffoldMessenger snackbars itself — put it anywhere in
your widget tree. Wrap it in your own Scaffold when using it as a
top-level screen; drop it inside a tab, a split-view pane, or a
sheet without wrapping.
Self-navigating. Tapping a subfolder does NOT push a new route
— it updates the current folder in place. An internal history stack
backs the CloudPathBar's back button, and the OS back button is
intercepted via PopScope to walk that history before propagating
to the outer navigator.
Ships with everything a typical file-manager screen needs:
- Optional in-body AppBar via appBar
- Path bar beneath the AppBar — current path + back/up buttons
- Grid of subfolders + files (with thumbnails when available)
- Long-press context menu — Open, Download, Rename, Move to…, Info, Delete
- FABs — Select / Create folder / Add link / Upload, positioned
bottom-end via a
Stackoverlay (no Scaffold slot needed) - Upload progress dialog with a Cancel button
If you want a completely different UX, build your own screen using the lower-level widgets (CloudFolderGrid, CloudPathBar, CloudFolderBreadcrumb, CloudMediaViewer, CloudUploadDialog, pickCloudFolder, generateThumbnails).
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CloudFolderScreen
Constructors
-
CloudFolderScreen({Key? key, required CloudStorage storage, String folderId = kRootFolderId, List<
CloudNode> ? initialChain, PreferredSizeWidget? appBar, String? rootLabel, bool readOnly = false}) -
const
Properties
- appBar → PreferredSizeWidget?
-
Optional AppBar to render above the built-in path bar. Consumers
wire this to whatever they need — title, theme actions, back to
their outer navigator. Passing null renders the widget without an
AppBar (the path bar becomes the top of the screen).
final
- folderId → String
-
The folder to start on. The screen then manages its own internal
navigation (folder taps, back, up) without pushing routes.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
initialChain
→ List<
CloudNode> ? -
Ancestor chain (root → ... → folderId) as a cold-start hint.
When null, the chain is fetched on first show.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- readOnly → bool
-
When true, hides the write-oriented UI:
final
- rootLabel → String?
-
Label shown for the root folder in the path bar breadcrumb. When
null, the localized default (
CloudGalleryLocalizations.of(context) .rootLabel) is used.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- storage → CloudStorage
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< CloudFolderScreen> -
Creates the mutable state for this widget at a given location in the tree.
override
-
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