solidui library

A UI library for building Solid applications with Flutter.

Copyright (C) 2025, Software Innovation Institute, ANU.

Licensed under the MIT License (the "License").

License: https://choosealicense.com/licenses/mit/.

Authors: Tony Chen

Classes

AboutConstants
About dialogue constants used throughout the application.
ActionColors
ChangeKeyButtonStyle
ContinueButtonStyle
DataFormatConfig
Configuration for data format specifications.
Colours used across dropdown dialogs and prompts.
EncKeyInputForm
EncKeyInputForm is a StatefulWidget that represents the form for entering the encryption key.
FileExplorerScreen
A simple file explorer class with two input parameters
FileItem
Represents a single file with its metadata.
FileOperations
A utility class for performing file system operations in the POD.
FileState
A model class to manage the state of file operations in the file service.
FileTypeConfig
Configuration for different file types.
GrantPermFormLayout
Layout constants used for Grant Permission Form Dialog.
GrantPermissionForm
Sharing (grant permission) form dialog function
GrantPermissionUi
A StatefulWidget for showing and editing access permissions to a resource. It displays the permission table of users with access, and allows the user to change access permissions: by granting access to others, changing a recipients access permissions or revoking access permissions.
GrantPermissionUiState
State class that manages permission data loading, searching and filtering, and permission granting and revoking.
GroupWebIdTextInput
A StatefulWidget dialog for entering a group of WebIDs.
HeadingStyle
Layout constants for headings.
ImagePdfParams
Parameters for generateImagePdf.
IndWebIdInputScreen
A screen that runs before opening the WebID input dialog, which retrieves the list of files in the owner's pod.
IndWebIdTextInput
A StatefulWidget dialog for entering an individual WebID.
InfoButtonStyle
InitialSetupScreen
Numeric variables used in initial setup page. A StatefulWidget for the initial setup screen of an application, handling the initial configuration and resource allocation.
InitialSetupScreenBody
A StatefulWidget that represents the initial setup screen.
InviteOthers
An icon button that triggers the Invite Others flow when pressed.
InviteOthersDialog
Static helpers for showing the Invite Others dialogue.
Languages
The Languages class provides a collection of language codes.
ListIconSize
Class for icon sizing in list items.
ListItemSize
Approximate size for grid items used for displaying text in list item.
LoadingDialogController
A controller that owns the lifetime of a modal "loading" dialog and guarantees it will be torn down once close is called.
LoginButtonStyle
LogoutDialog
A pop up widget for user to logout.
Navigation constants used throughout the application.
PermissionHistory
A StatefulWidget for listing the permission history of a resource.
PermissionTable
A StatefulWidget for listing the permissions of a resource.
PodButton
RecipientTextStyle
Text styles used for permission form.
RegisterButtonStyle
RevokePermissionButton
A StatefulWidget for the revoke permission icon button. Updates owner's ACL for resource, updates owner, granter, recipient logs, and calls updatePermissions() to refresh permission table data.
ScrollbarLayout
Layout constants for scrollbars.
SecretTextField
A StatefulWidget for user to enter a secret text.
SecurityColors
Colours used across security dialogs and prompts.
SecurityKeyNotifier
Global notifier for security key status.
SecurityKeyStatusChangedNotification
Notification sent when security key status changes.
SecurityKeyUI
A flexible StatefulWidget for security key operations with improved UI and WebID display.
SecurityLayout
Layout constants used across security dialogs and prompts.
SecurityStrings
Common text strings used across security dialogs and prompts.
SecurityTextStyles
Text styles used across security dialogs and prompts.
SecurityThemeColors
Helper class to obtain theme-aware colours for security UI components.
SecurityThemeTextStyles
Helper class to obtain theme-aware text styles for security UI components.
SelectRecipients
A StatefulWidget for a container of buttons for selecting recipients in the grant permission form.
SharedResourcesUi
A widget for the demonstration screen of the application.
SharedResourcesUiState
Class to build a UI for granting permission to a given file
ShareResourceButton
A StatefulWidget for sharing a resource, by either creating an access permission for a new recipient or updating the access permission of an existing recipient.
SharingPageLayout
Layout constants used for sharing page.
ShowSelectedRecipients
A StatelessWidget for showing selected recipients in the grant permission form.
SnackbarConfig
Configuration for snackbar notifications.
SolidAbout
A static helper for showing About dialogues programmatically.
SolidAboutButton
A button that shows an About dialogue when pressed.
SolidAboutConfig
Configuration for About dialog functionality in the Solid scaffold.
SolidAppBarAction
Configuration for an AppBar action button.
SolidAppBarActionIds
Standard AppBar action IDs used by SolidScaffold.
SolidAppBarActionItem
Represents an AppBar action item that can be reordered and configured for overflow behaviour.
SolidAppBarConfig
Comprehensive configuration for creating an AppBar.
SolidAuthConfig
Configuration for Solid authentication handling.
SolidAuthHandler
Centralised Solid authentication handler.
SolidConfig
Configuration constants for Solid POD servers.
SolidCustomStatusBarItem
Configuration for additional custom status bar items.
SolidDefaultLogin
A simplified wrapper around SolidLogin with sensible defaults.
SolidDynamicAuthButton
A dynamic authentication button that shows login or logout icon based on the current authentication state.
SolidDynamicLoginStatus
A dynamic login status widget that automatically checks and updates the login status based on the actual Solid POD authentication state.
SolidFeedbackConfig
Configuration for the Feedback entry shown inside the About dialogue.
SolidFile
A comprehensive file management widget combining file browser and upload functionality.
SolidFileBrowser
A file browser widget to interact with files and directories in user's POD.
SolidFileBrowserState
State class for the SolidFileBrowser widget.
SolidFileOperations
Unified interface for file operations in SolidUI widgets.
SolidFilePreviewCard
A card widget that displays file preview content with optional close functionality.
SolidFilePrintOperations
Print operations for the SolidUI file browser.
SolidFileUploadArea
A comprehensive file upload area with data operation buttons.
SolidFileUploadButtons
A collection of button builders for file upload operations.
SolidFileUploadCallbacks
Callbacks for file upload area operations.
SolidFileUploadConfig
Configuration for the file upload area.
SolidFileUploader
A widget that handles file upload functionality and preview.
SolidFileUploadState
State information for the upload area.
SolidFormatInfoCard
A card widget that displays data format information.
SolidInviteOthersConfig
Configuration for the Invite Others feature.
SolidLogin
A widget to login to a Solid server for a user's token to access their POD.
SolidLoginRequiredDialog
A reusable Login Required confirmation dialogue.
SolidLoginStatus
Configuration for login status in the status bar.
SolidLoginStatusNotifier
Global notifier broadcasting changes to the Solid login state.
SolidLoginTheme
Theme configuration for the SolidLogin widget.
SolidLoginThemeMode
Theme configuration for a single mode (light or dark).
SolidLogoutConfig
Configuration for logout functionality.
SolidMenuItem
Simplified menu item configuration.
SolidMenuPreferencesDialog
Dialogue for choosing whether navigation items appear in the bottom bar or the hamburger drawer on narrow screens.
SolidNavBar
A reusable navigation rail component designed for Solid POD applications.
SolidNavBottomBar
Bottom navigation bar showing main menu tabs on narrow screens.
SolidNavDrawer
A solid navigation drawer component.
SolidNavTab
Configuration for a navigation tab.
SolidNavThemeConfig
Configuration for theme toggle functionality.
SolidNavUserConfig
Configuration for navigation drawer user information.
SolidNavUserInfo
User information configuration for the navigation drawer.
SolidNotificationButton
An AppBar icon button that shows a notification bell with an unread count badge. Tapping it navigates to the SolidNotificationCentre. The badge count is refreshed when the button is mounted, periodically via a polling timer, and again after returning from the notification centre.
SolidNotificationCentre
Full-screen notification centre that lists every notification the user has received across all sender pairs, fetched via the per-pair pull model in solidpod. Notifications are displayed as cards with pagination and sorting controls.
SolidOverflowMenuItem
Configuration for an overflow menu item.
SolidOwnerAvatar
Displays a small circular avatar identifying the owner of a resource (typically the leading icon of a list item).
SolidOwnerColourPair
A pair of background + foreground colours used to render an owner's initials or placeholder icon.
SolidOwnerProfile
Snapshot of a remote POD owner's profile derived from publicly readable resources in their app profile folder.
SolidOwnerProfileService
Singleton that fetches and caches public profile data (avatar bytes + display name) for arbitrary POD owners, keyed by WebID.
SolidPopupLogin
A widget to pop up the login prompt if the user is not logged in.
SolidPreferencesConfig
Complete preferences configuration for SolidScaffold.
SolidPreferencesDialog
A dialogue widget for configuring user preferences including AppBar button ordering.
SolidPreferencesNotifier
Notifier for managing preferences state across the application.
SolidProfileAvatar
Displays a circular profile avatar sourced from solidProfileNotifier.
SolidProfileCropDialog
Lets the user pan/zoom an image beneath a circular window and returns the cropped result as PNG bytes when confirmed.
SolidProfileEditor
A dialog that lets the user upload/change/delete a profile picture and set a display name. Changes are persisted to the user's Solid POD.
SolidProfileNotifier
Holds the current profile state and notifies listeners on changes.
SolidProfileService
Manages reading, writing, and deleting profile data on the user's POD.
SolidScaffold
Simplified unified scaffold component that automatically handles responsive layout switching.
SolidScaffoldController
Controller for managing SolidScaffold subpage navigation.
SolidScaffoldHelpers
Helper class for Solid Scaffold operations.
SolidScaffoldInternalConfig
Configuration class to hold all SolidScaffold parameters. This helps reduce the main widget class size and improves maintainability.
SolidScaffoldState
SolidSecurityKeyCentralManager
Central manager for security key operations to prevent duplicate prompts.
SolidSecurityKeyManager
Security Key Manager.
SolidSecurityKeyManagerConfig
Configuration for the Security Key Manager.
SolidSecurityKeyManagerState
State class that powers SolidSecurityKeyManager widget.
SolidSecurityKeyService
Service for managing security keys used for POD encryption in Solid applications.
SolidSecurityKeyStatus
Configuration for security key status in the status bar.
SolidSecurityKeyUtils
Utility functions for security key status checking.
SolidSecurityKeyView
A widget to show the user all the encryption keys stored in their Solid Pod.
SolidServerField
A TextFormField with a tappable dropdown of known public Solid servers.
SolidServerInfo
Configuration for server information in the status bar.
SolidStatusBar
A responsive status bar component for Solid applications.
SolidStatusBarConfig
Comprehensive configuration for the Solid status bar.
SolidStatusBarItem
Configuration for a status bar item that displays interactive text.
SolidTheme
Theme constants for SolidUI applications.
SolidThemeApp
SolidThemeConfig
Configuration for customising SolidUI theme.
SolidThemeModeConfig
Configuration for theme mode availability in the theme toggle cycle.
SolidThemeNotifier
Notifier for managing theme state across the application.
SolidThemeToggleConfig
Configuration for theme toggle functionality in the Solid scaffold.
SolidVersionConfig
Configuration for version information display.
SubHeadingStyle
Layout constants for sub headings.
TextPdfParams
Parameters for generateTextPdf.
WebIdLayout
Layout constants used for WebId dialogs.
WebIdParts
Parsed identity details extracted from a Solid WebID.
WindowSize
Responsive layout helpers using LayoutBuilder constraints.

Enums

FileSortOption
Sorting options for files and directories in the file browser.
Indicator
34 different types animation enums.
SecurityKeyDisplayMode
Display mode for the SecurityKeyUI widget.
SolidProfilePrivacy
Visibility mode for a user's profile data on their POD.
SolidStatusBarLayout
Layout mode for the status bar based on screen width.

Extensions

BrowserNavigation on SolidFileBrowserState
Extension grouping navigation and data-loading methods on SolidFileBrowserState.

Constants

accessibleOwnerColourPalette → const List<SolidOwnerColourPair>
Accessible colour palette used to distinguish between different POD owners who happen to share the same initials (or first WebID letters).
allowedProfileExtensions → const Set<String>
Allowed MIME extensions for profile pictures.
darkBlue → const Color
Colour variables used in initial setup screen.
defaultAlertMaxCharsPerLine → const int
Default character-per-line cap applied to alert dialogs raised by alert. ~90 characters keeps long error messages readable on wide desktop windows without forcing short messages to look awkwardly narrow on phones; it also matches the 80–100 character convention familiar from prose and source-code line lengths.
defaultButtonBackground → const Color
Button styles used in the Solid Login widget.
defaultButtonForeground → const Color
defaultChangeKeyButtonText → const String
defaultContinueButtonText → const String
defaultContinueTooltip → const String
defaultInfoButtonText → const String
defaultInfoTooltip → const String
defaultLoginButtonText → const String
defaultLoginTooltip → const String
defaultRegisterButtonText → const String
defaultRegisterTooltip → const String
defaultServerTooltip → const String
failureMsg → const String
granterRecipientTypes → const List<RecipientType>
Relevant recipient types for resource sharing by the resource granter (i.e. an entity with control access).
imagePrintableExtensions → const Set<String>
Image-based extensions.
initialStructureTitle → const String
Text string variables as the title of the message box.
initialStructureTitleLine1 → const String
Colour variables used in initial setup screen. Padding value for initial setup screen. First line of the welcome title, shown on its own for clarity.
initialStructureTitleLine2Setup → const String
Second line of the welcome title for a first-time setup.
initialStructureTitleLine2Update → const String
Second line of the welcome title when the user already has an app directory but is missing resources (e.g. a newly required folder).
kKnownSolidServers → const List<String>
Known public Solid Pod servers listed at solidproject.org/get_a_pod. pods.solidcommunity.au is listed first and used as the default.
largeGapV → const SizedBox
Large vertical spacing for widgets.
lightBlue → const Color
Colour variables used in initial loading screen.
lightGreen → const Color
Colour variables used in initial setup screen.
loginButtonBackground → const Color
loginButtonForeground → const Color
maxProfilePictureBytes → const int
Maximum allowed upload size for profile pictures (2 MB).
mediumGapV → const SizedBox
Medium vertical spacing for the widget.
narrowScreenLimit → const int
noAclMsg → const String
normalLoadingScreenHeight → const double
Normal height for data loading screens.
notoSansFontName → const String
Font cache key for Noto Sans Regular.
notoSansFontUrl → const String
Noto Sans Regular – used for page headers in printed documents.
notoSansMonoFontName → const String
Font cache key for Noto Sans Mono Regular.
notoSansMonoFontUrl → const String
Noto Sans Mono Regular – used for body text in printed documents.
ownerRecipientTypes → const List<RecipientType>
Relevant recipients types for resource sharing by the resource owner.
podNotInitMsg → const String
printableExtensions → const Set<String>
File extensions supported for printing.
recipientToolTips → const Map<RecipientType, String>
Tooltip strings for each recipient type shown in the sharing UI.
registerButtonBackground → const Color
registerButtonForeground → const Color
securityKeyRetypeTooltip → const String
securityKeyStr → const String
The string key of input form for the input of security key
securityKeyStrReType → const String
The string key of the input form for retyping the security key.
securityKeyTooltip → const String
Markdown tooltip text for the security key input field.
smallGapV → const SizedBox
Small vertical spacing for widgets.
solidReadNotificationsKey → const String
SharedPreferences key for tracking which notification ids the user has already viewed.
successMsg → const String
textPrintableExtensions → const Set<String>
Text-based extensions rendered as formatted text.
updatePermissionMsg → const String
veryNarrowScreenLimit → const int
vSmallGapV → const SizedBox
Very small vertical spacing for the widget.

Properties

isDesktop bool
Test if we are running on a desktop platform but not in a browser.
no setter
listIconShape ShapeDecoration
Icon shape decoration for list items.
getter/setter pair
securityKeyNotifier SecurityKeyNotifier
Global instance of the security key notifier.
final
solidLoginStatusNotifier SolidLoginStatusNotifier
Global singleton instance shared by the package.
final
solidPreferencesNotifier SolidPreferencesNotifier
Global instance of the preferences notifier.
final
solidProfileNotifier SolidProfileNotifier
Global singleton instance used throughout the application.
final
solidThemeNotifier SolidThemeNotifier
Global instance of the theme notifier.
final

Functions

alert(BuildContext context, String msg, [String title = 'Alert']) Future<void>
Pop up a dismissable alert dialog with the given msg.
alertMaxWidthForCharsPerLine(int maxCharsPerLine) double
Convert a "characters per line" budget into a logical-pixel maxWidth suitable for use with BoxConstraints. Shared by alert and any custom alert dialogs that want a consistent reading width.
buildHeading({required String text, required double fontSize, FontWeight? fontWeight, Color? color, double? padding}) Row
Build a heading widget with customisable style.
buildMsgBox(BuildContext context, String msgType, String title, String msg) Container
Builds a custom message box widget with adaptive layout and dynamic styling.
buildSharedResourcesTable(BuildContext context, Map sharedResMap, Widget parentWidget) Widget
Build the permission table widget. Function call requires the following inputs context is the BuildContext from which this function is called. sharedResMap is the map containing data of shared resources. parentWidget is the widget to return to after an action Eg: deletion of a permission
changeKeyPopup(BuildContext context, Widget child) Future<bool>
Displays a dialog for changing the security key.
computeOwnerInitials({String? displayName, String? webId}) String
Computes a short text label (the "initials") to display when no avatar image is available for a POD owner.
debugPrintException(Object e, StackTrace stackTrace) → void
debugPrintFailure(String fileName, List? finalWebIdList, List<String> permissionList) → void
decodeContentBytes(String content) Uint8List
Tries to base64-decode content; falls back to raw UTF-8 bytes.
defaultAppBar(BuildContext context, String title, Color backgroundColor, Widget child, {VoidCallback? onNavigateBack, bool getResult()?}) PreferredSizeWidget
A default app bar that is used when user does not define an app bar for the UI
generateImagePdf(ImagePdfParams p) Future<Uint8List>
Generates a single-page image PDF.
generateTextPdf(TextPdfParams p) Future<Uint8List>
Generates a paginated text PDF.
getContentColour(String contentType) Color
Returns a color based on the given content type.
getEffectiveExtension(String fileName) String
Returns the effective file extension after stripping the .enc.ttl suffix used by solidpod for encrypted files.
getExceptionMsg(Object e) String
getFailureMsg(String fileName) String
getKeyFromUserIfRequired(BuildContext context, Widget child) Future<void>
Ask for the security key from the user if the security key is not available or cannot be verfied using the verification key stored in PODs.
getPermissionCheckBoxes(List<AccessMode> accessModes, {required Map<AccessMode, bool> modeSwitches, required Function onUpdate}) List<Widget>
Build a list of permission check-box widgets for the given accessModes.
getPermissionMsg(List<String> permissionList) String
getRecipientMsg(List? finalWebIdList) String
getResourceForm({required TextEditingController formController, required bool isFile, required void onResourceTypeChange(bool)}) Widget
Build a resource form widget with a text field and a file/directory toggle.
getSolidServerTooltip(TextEditingController webIdController, SolidLoginThemeMode themeMode, {FocusNode? focusNode, ValueChanged<String>? onFieldSubmitted}) → MarkdownTooltip
Return a MarkdownTooltip for Solid server text input
getStackTraceMsg(StackTrace stackTrace) String
getThemeToggleTooltip(ThemeMode currentThemeMode, {required void onPressed()}) Widget
Return a Widget for the theme toggle button with adaptive toggle logic. Uses MediaQuery for real-time system brightness detection.
indWebIdFormatError(String text) String?
Returns a human-readable error describing why text is not a valid WebID, or null if text is well-formed.
initialSetupWelcome(BuildContext context, String appName, String? webId, {required String serverName, bool isUpdate = false}) SizedBox
Get the height of screen. Get the width of screen. A widget displaying an alert for the user noting that they have probably a newly created Solid Pod or their App's Pod is missing resources.
initialStructureMsg(String appName, String serverName) String
Message shown when the user is connecting the app to their POD for the first time and the POD needs to be initialised.
initialStructureSnackbarMsg(String appName) String
Snackbar text displayed when the app detects the POD is not yet set up for this app and starts the setup wizard.
initialStructureTitleLine3(String appName) String
Third line of the welcome title; includes the app name so the user knows which app's POD is being configured.
initialUpdateMsg(String appName) String
Message shown when the user's POD already has an app directory but is missing one or more resources (e.g. a newly required folder for a new app feature). Only prompts for the existing security key once.
initialUpdateSnackbarMsg(String appName) String
Snackbar text displayed when the POD already has the app folder but is missing some resources and the update wizard is about to run.
isImagePrintableFile(String fileName) bool
Whether fileName is an image-based printable file.
isNarrowLoginScreen(BuildContext context) bool
isPdfFile(String fileName) bool
Whether fileName is a PDF file.
isPhone() bool
Checks the platform type to determine whether running on a mobile device.
isPrintableFile(String fileName) bool
Whether fileName has a printable file extension.
isTextFile(String filePath) bool
Checks if a file is a text file based on its extension.
isTextPrintableFile(String fileName) bool
Whether fileName is a text-based printable file.
isVeryNarrowLoginScreen(BuildContext context) bool
loadingScreen(double height) Widget
Creates a loading screen widget.
loginIfRequired({required BuildContext context, required String clientId, required List<String> redirectUris, List<String> postLogoutRedirectUris = const []}) Future<bool>
Login if the user has not done so.
loginWebIdInputDialog({required BuildContext context, required String clientId, required List<String> redirectUris, List<String> postLogoutRedirectUris = const []}) Future
A dialog for adding an individual webId. Function call requires the following inputs context is the BuildContext from which this function is called.
logoutButtonTooltip(String appName) String
Tooltip text for the LOGOUT button.
logoutPopup(BuildContext context, Widget child, {VoidCallback? onLogoutSuccess}) Future<void>
Display a pop up dialog for logging out.
makeHeading(String text, {bool bold = true, bool addColor = true, bool addPadding = true}) Widget
Make a heading using HeadingStyle as default.
makeSharingTitleStr({List<String>? resourceNames, bool isFile = false}) String
Get title of sharing page.
makeSubHeading(String text, {bool bold = true, bool addColor = true, bool addPadding = true}) Widget
Make a sub heading using SubHeadingStyle as default.
ownerColourPairFor(String? webId) SolidOwnerColourPair?
Returns a stable accent colour pair for webId drawn from accessibleOwnerColourPalette.
parseEncKeyContent(String fileInfo) Map
Parses enc-key file information and extracts content into a map.
permissionCheckbox(AccessMode accessMode, bool checkboxChecked, Function updateCheckBox) → MarkdownTooltip
Checkbox widget to display different access mode selections. Function call requires the following inputs accessMode is the AccessMode instance for the checkbox checkboxChecked is the boolean controller for the checkbox press updateCheckBox is the function to update the checkbox data when pressed
pushReplacement(BuildContext context, Widget destinationWidget) Future<void>
Utility function for navigation
resCreateFormSubmission(GlobalKey<FormBuilderState> formKey, BuildContext context, List<String> resFileNames, List<String> resFoldersLink, List<String> resFilesLink, Widget child) ElevatedButton
A button to submit form widget
resourcesButtonTooltip(String appName) String
Tooltip text for the RESOURCES button.
screenWidth(BuildContext context) double
showAnimationDialog(BuildContext context, int animationIndex, String alertMsg, bool showPathBackground, VoidCallback? updateStateCallback, {List<Color>? colors, double strokeWidth = 100.0, double width = 200, double height = 290, bool showCancelButton = true, Indicator? indicatorType}) Future<void>
An asynchronous utility designed to display a custom animation dialog.
showSnackBar(BuildContext context, String msg, Color bgColor, {Duration duration = const Duration(seconds: 4)}) → void
Displays a snack bar with a custom message.
submitButtonTooltip(String appName) String
Tooltip text for the SUBMIT button.

Typedefs

FileTypeResolver = FileTypeConfig? Function(String normalisedPath, String? basePath)
A callback type for resolving file type configurations from a path.