Skip to main content
NextYou're reading unreleased docs. Features and APIs may change before release.View latestv1.1.x
Back to Flutter

SharedFlowList

The SharedFlowList widget lists the flows shared with an organization unit, the flows it owns, or both. Choosing a flow calls onSelect, so your app decides what to open, for example FlowVariablesForm for that flow.

SharedFlowList requires a ThunderIDProvider ancestor. The signed-in user's access token needs the permissions the server requires to list flows.

Note

The widget strings are available in English only. See FlowVariablesForm.

Usage​

dart
import 'package:thunderid_flutter/thunderid_flutter.dart';

class DelegatedAdmin extends StatefulWidget {
const DelegatedAdmin({super.key, required this.ouId});

final String ouId;

@override
State<DelegatedAdmin> createState() => _DelegatedAdminState();
}

class _DelegatedAdminState extends State<DelegatedAdmin> {
String? _flowId;

@override
Widget build(BuildContext context) {
return Column(
children: [
SharedFlowList(
ouId: widget.ouId,
selectedFlowId: _flowId,
onSelect: (flow) => setState(() => _flowId = flow.id),
),
if (_flowId != null)
FlowVariablesForm(
key: ValueKey(_flowId),
flowId: _flowId!,
ouId: widget.ouId,
),
],
);
}
}

Parameters​

ParameterTypeRequiredDefaultDescription
ouIdString✅The organization unit to list the flows of.
ownershipSharedFlowOwnership❌SharedFlowOwnership.sharedWhich flows to list: shared for the ones shared with the unit, owned for the ones it owns, or all for both.
flowTypeString?❌nullRestricts the list to one flow type. See FlowTypes.
limitint❌20Page size.
onSelectValueChanged<ManagedFlow>?❌Called when a flow is chosen. Rows are selectable only when set.
selectedFlowIdString?❌Identifier of the flow to highlight.
titleString?❌Heading of the list. Pass an empty string to hide it.
descriptionString?❌Text under the heading.
actionsList<Widget>❌[]Controls rendered next to the title.
preferencesThunderIDPreferences?❌Internationalization preferences.
builderAdminWidgetBuilder<AdminListState<ManagedFlow>>?❌Builds custom UI in place of the default list.

Ownership and Paging​

The server cannot filter a flow list by ownership. For shared and owned, the widget reads the unit's flows, up to 100, and filters on each flow's isOwnedByOU value on the device, then pages through the matches. A unit with more than 100 flows therefore lists matches from the first 100 flows only. For all, the widget pages on the server and has no such limit.

BaseSharedFlowList​

BaseSharedFlowList is the presentational list. It holds no data of its own: pass the page of flows and handle selection and pagination. The list shows each flow's name, handle, and type.

dart
BaseSharedFlowList(
flows: flows,
totalResults: total,
onSelect: (flow) => open(flow),
)

BaseSharedFlowList Parameters​

ParameterTypeRequiredDefaultDescription
flowsList<ManagedFlow>✅The page of flows to show.
isLoadingbool❌falseShows a loading state.
errorString?❌nullAn already-translated error message. Never pass the server's text here.
limitint❌20Page size.
offsetint❌0Offset of the current page.
totalResultsint?❌flows.lengthTotal number of flows, used for pagination.
onPageChangeValueChanged<int>?❌Called with the offset of the page to show. Pagination is hidden when omitted.
onSelectValueChanged<ManagedFlow>?❌Called when a flow is chosen. Rows are selectable only when set.
selectedFlowIdString?❌Identifier of the flow to highlight.
titleString?❌Heading of the list. Pass an empty string to hide it.
descriptionString?❌Text under the heading.
actionsList<Widget>❌[]Controls rendered next to the title.
preferencesThunderIDPreferences?❌Internationalization preferences.
builderAdminWidgetBuilder<AdminListState<ManagedFlow>>?❌Builds custom UI in place of the default list.

The builder receives an AdminListState<ManagedFlow> with the rows, the isLoading and error state, limit, offset, totalResults, selectedId, onPageChange, and onSelect.

Internationalization​

The title, empty message, and error message come from the admin.flows.list keys in the SDK's built-in strings, which are English only. Override them through preferences.

Explore with AI

ThunderID LogoThunderID Logo

Product

DocsAPIsSDKs
© Copyright Linux Foundation Europe.For web site terms of use, trademark policy and other project policies please see https://linuxfoundation.eu/en/policies.